~l3on/ubuntu/oneiric/qwt/fix-921430

« back to all changes in this revision

Viewing changes to qwt-5.0.1/doc/man/man3/QwtCounter.3

  • Committer: Bazaar Package Importer
  • Author(s): Fathi Boudra
  • Date: 2007-10-05 15:20:41 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20071005152041-qmybqh4fj9jejyo2
Tags: 5.0.2-2
* Handle nostrip build option. (Closes: #437877)
* Build libqwt5-doc package in binary-indep target. (Closes: #443110)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.TH "QwtCounter" 3 "26 Feb 2007" "Version 5.0.1" "Qwt User's Guide" \" -*- nroff -*-
2
 
.ad l
3
 
.nh
4
 
.SH NAME
5
 
QwtCounter \- 
6
 
.SH SYNOPSIS
7
 
.br
8
 
.PP
9
 
Inherits \fBQwtDoubleRange\fP.
10
 
.PP
11
 
.SH "Detailed Description"
12
 
.PP 
13
 
The Counter Widget. 
14
 
 
15
 
A Counter consists of a label displaying a number and one ore more (up to three) push buttons on each side of the label which can be used to increment or decrement the counter's value.
16
 
.PP
17
 
A Counter has a range from a minimum value to a maximum value and a step size. The range can be specified using QwtDblRange::setRange(). The counter's value is an integer multiple of the step size. The number of steps by which a button increments or decrements the value can be specified using \fBQwtCounter::setIncSteps()\fP. The number of buttons can be changed with \fBQwtCounter::setNumButtons()\fP.
18
 
.PP
19
 
Holding the space bar down with focus on a button is the fastest method to step through the counter values. When the counter underflows/overflows, the focus is set to the smallest up/down button and counting is disabled. Counting is re-enabled on a button release event (mouse or space bar).
20
 
.PP
21
 
Example: 
22
 
.PP
23
 
.nf
24
 
#include '../include/qwt_counter.h>
25
 
 
26
 
QwtCounter *cnt;
27
 
 
28
 
cnt = new QwtCounter(parent, name);
29
 
 
30
 
cnt->setRange(0.0, 100.0, 1.0);             // From 0.0 to 100, step 1.0
31
 
cnt->setNumButtons(2);                      // Two buttons each side
32
 
cnt->setIncSteps(QwtCounter::Button1, 1);   // Button 1 increments 1 step
33
 
cnt->setIncSteps(QwtCounter::Button2, 20);  // Button 2 increments 20 steps
34
 
 
35
 
connect(cnt, SIGNAL(valueChanged(double)), my_class, SLOT(newValue(double)));
36
 
 
37
 
.fi
38
 
.PP
39
 
 
40
 
.PP
41
 
Definition at line 60 of file qwt_counter.h.
42
 
.SS "Public Types"
43
 
 
44
 
.in +1c
45
 
.ti -1c
46
 
.RI "enum \fBButton\fP { \fBButton1\fP, \fBButton2\fP, \fBButton3\fP, \fBButtonCnt\fP }"
47
 
.br
48
 
.in -1c
49
 
.SS "Signals"
50
 
 
51
 
.in +1c
52
 
.ti -1c
53
 
.RI "void \fBbuttonReleased\fP (double value)"
54
 
.br
55
 
.ti -1c
56
 
.RI "void \fBvalueChanged\fP (double value)"
57
 
.br
58
 
.in -1c
59
 
.SS "Public Member Functions"
60
 
 
61
 
.in +1c
62
 
.ti -1c
63
 
.RI "\fBQwtCounter\fP (QWidget *parent=NULL)"
64
 
.br
65
 
.ti -1c
66
 
.RI "virtual \fB~QwtCounter\fP ()"
67
 
.br
68
 
.ti -1c
69
 
.RI "bool \fBeditable\fP () const "
70
 
.br
71
 
.ti -1c
72
 
.RI "void \fBsetEditable\fP (bool)"
73
 
.br
74
 
.ti -1c
75
 
.RI "void \fBsetNumButtons\fP (int n)"
76
 
.br
77
 
.ti -1c
78
 
.RI "int \fBnumButtons\fP () const "
79
 
.br
80
 
.ti -1c
81
 
.RI "void \fBsetIncSteps\fP (\fBQwtCounter::Button\fP btn, int nSteps)"
82
 
.br
83
 
.ti -1c
84
 
.RI "int \fBincSteps\fP (\fBQwtCounter::Button\fP btn) const "
85
 
.br
86
 
.ti -1c
87
 
.RI "virtual void \fBsetValue\fP (double)"
88
 
.br
89
 
.ti -1c
90
 
.RI "virtual QSize \fBsizeHint\fP () const "
91
 
.br
92
 
.ti -1c
93
 
.RI "virtual void \fBpolish\fP ()"
94
 
.br
95
 
.ti -1c
96
 
.RI "double \fBstep\fP () const "
97
 
.br
98
 
.ti -1c
99
 
.RI "void \fBsetStep\fP (double s)"
100
 
.br
101
 
.ti -1c
102
 
.RI "double \fBminVal\fP () const "
103
 
.br
104
 
.ti -1c
105
 
.RI "void \fBsetMinValue\fP (double m)"
106
 
.br
107
 
.ti -1c
108
 
.RI "double \fBmaxVal\fP () const "
109
 
.br
110
 
.ti -1c
111
 
.RI "void \fBsetMaxValue\fP (double m)"
112
 
.br
113
 
.ti -1c
114
 
.RI "void \fBsetStepButton1\fP (int nSteps)"
115
 
.br
116
 
.ti -1c
117
 
.RI "int \fBstepButton1\fP () const "
118
 
.br
119
 
.ti -1c
120
 
.RI "void \fBsetStepButton2\fP (int nSteps)"
121
 
.br
122
 
.ti -1c
123
 
.RI "int \fBstepButton2\fP () const "
124
 
.br
125
 
.ti -1c
126
 
.RI "void \fBsetStepButton3\fP (int nSteps)"
127
 
.br
128
 
.ti -1c
129
 
.RI "int \fBstepButton3\fP () const "
130
 
.br
131
 
.ti -1c
132
 
.RI "virtual double \fBvalue\fP () const "
133
 
.br
134
 
.in -1c
135
 
.SS "Protected Member Functions"
136
 
 
137
 
.in +1c
138
 
.ti -1c
139
 
.RI "virtual bool \fBevent\fP (QEvent *)"
140
 
.br
141
 
.ti -1c
142
 
.RI "virtual void \fBwheelEvent\fP (QWheelEvent *)"
143
 
.br
144
 
.ti -1c
145
 
.RI "virtual void \fBkeyPressEvent\fP (QKeyEvent *)"
146
 
.br
147
 
.ti -1c
148
 
.RI "virtual void \fBrangeChange\fP ()"
149
 
.br
150
 
.in -1c
151
 
.SH "Member Enumeration Documentation"
152
 
.PP 
153
 
.SS "enum \fBQwtCounter::Button\fP"
154
 
.PP
155
 
Button index 
156
 
.PP
157
 
Definition at line 79 of file qwt_counter.h.
158
 
.SH "Constructor & Destructor Documentation"
159
 
.PP 
160
 
.SS "QwtCounter::QwtCounter (QWidget * parent = \fCNULL\fP)\fC [explicit]\fP"
161
 
.PP
162
 
The default number of buttons is set to 2. The default increments are: 
163
 
.PD 0
164
 
 
165
 
.IP "\(bu" 2
166
 
Button 1: 1 step 
167
 
.IP "\(bu" 2
168
 
Button 2: 10 steps 
169
 
.IP "\(bu" 2
170
 
Button 3: 100 steps
171
 
.PP
172
 
\fBParameters:\fP
173
 
.RS 4
174
 
\fIparent\fP 
175
 
.RE
176
 
.PP
177
 
 
178
 
.PP
179
 
Definition at line 50 of file qwt_counter.cpp.
180
 
.SS "QwtCounter::~QwtCounter ()\fC [virtual]\fP"
181
 
.PP
182
 
Destructor. 
183
 
.PP
184
 
Definition at line 143 of file qwt_counter.cpp.
185
 
.SH "Member Function Documentation"
186
 
.PP 
187
 
.SS "void QwtCounter::buttonReleased (double value)\fC [signal]\fP"
188
 
.PP
189
 
This signal is emitted when a button has been released 
190
 
.PP
191
 
\fBParameters:\fP
192
 
.RS 4
193
 
\fIvalue\fP The new value 
194
 
.RE
195
 
.PP
196
 
 
197
 
.SS "bool QwtCounter::editable () const"
198
 
.PP
199
 
returns whether the line edit is edatble. (default is yes) 
200
 
.PP
201
 
Definition at line 198 of file qwt_counter.cpp.
202
 
.SS "bool QwtCounter::event (QEvent * e)\fC [protected, virtual]\fP"
203
 
.PP
204
 
Handle PolishRequest events 
205
 
.PP
206
 
Definition at line 206 of file qwt_counter.cpp.
207
 
.PP
208
 
References polish().
209
 
.SS "int QwtCounter::incSteps (\fBQwtCounter::Button\fP btn) const"
210
 
.PP
211
 
\fBReturns:\fP
212
 
.RS 4
213
 
the number of steps by which a specified button increments the value or 0 if the button is invalid. 
214
 
.RE
215
 
.PP
216
 
\fBParameters:\fP
217
 
.RS 4
218
 
\fIbtn\fP One of \fCQwtCounter::Button1\fP, \fCQwtCounter::Button2\fP, \fCQwtCounter::Button3\fP 
219
 
.RE
220
 
.PP
221
 
 
222
 
.PP
223
 
Definition at line 367 of file qwt_counter.cpp.
224
 
.PP
225
 
Referenced by stepButton1(), stepButton2(), and stepButton3().
226
 
.SS "void QwtCounter::keyPressEvent (QKeyEvent * e)\fC [protected, virtual]\fP"
227
 
.PP
228
 
Handles key events
229
 
.PP
230
 
.IP "\(bu" 2
231
 
Ctrl + Qt::Key_Home Step to \fBminValue()\fP
232
 
.IP "\(bu" 2
233
 
Ctrl + Qt::Key_End Step to \fBmaxValue()\fP
234
 
.IP "\(bu" 2
235
 
Qt::Key_Up Increment by incSteps(QwtCounter::Button1)
236
 
.IP "\(bu" 2
237
 
Qt::Key_Down Decrement by incSteps(QwtCounter::Button1)
238
 
.IP "\(bu" 2
239
 
Qt::Key_PageUp Increment by incSteps(QwtCounter::Button2)
240
 
.IP "\(bu" 2
241
 
Qt::Key_PageDown Decrement by incSteps(QwtCounter::Button2)
242
 
.IP "\(bu" 2
243
 
Shift + Qt::Key_PageUp Increment by incSteps(QwtCounter::Button3)
244
 
.IP "\(bu" 2
245
 
Shift + Qt::Key_PageDown Decrement by incSteps(QwtCounter::Button3) 
246
 
.PP
247
 
 
248
 
.PP
249
 
Definition at line 236 of file qwt_counter.cpp.
250
 
.PP
251
 
References QwtDoubleRange::incValue(), QwtDoubleRange::maxValue(), QwtDoubleRange::minValue(), and setValue().
252
 
.SS "double QwtCounter::maxVal () const"
253
 
.PP
254
 
returns the maximum value of the range 
255
 
.PP
256
 
Definition at line 574 of file qwt_counter.cpp.
257
 
.PP
258
 
References QwtDoubleRange::maxValue().
259
 
.SS "double QwtCounter::minVal () const"
260
 
.PP
261
 
returns the minimum value of the range 
262
 
.PP
263
 
Definition at line 562 of file qwt_counter.cpp.
264
 
.PP
265
 
References QwtDoubleRange::minValue().
266
 
.SS "int QwtCounter::numButtons () const"
267
 
.PP
268
 
\fBReturns:\fP
269
 
.RS 4
270
 
The number of buttons on each side of the widget. 
271
 
.RE
272
 
.PP
273
 
 
274
 
.PP
275
 
Definition at line 466 of file qwt_counter.cpp.
276
 
.SS "void QwtCounter::polish ()\fC [virtual]\fP"
277
 
.PP
278
 
Sets the minimum width for the buttons 
279
 
.PP
280
 
Definition at line 151 of file qwt_counter.cpp.
281
 
.PP
282
 
Referenced by event().
283
 
.SS "void QwtCounter::rangeChange ()\fC [protected, virtual]\fP"
284
 
.PP
285
 
Notify change of range. 
286
 
.PP
287
 
This function updates the enabled property of all buttons contained in \fBQwtCounter\fP. 
288
 
.PP
289
 
Reimplemented from \fBQwtDoubleRange\fP.
290
 
.PP
291
 
Definition at line 507 of file qwt_counter.cpp.
292
 
.SS "void QwtCounter::setEditable (bool editable)"
293
 
.PP
294
 
Allow/disallow the user to manually edit the value. 
295
 
.PP
296
 
\fBParameters:\fP
297
 
.RS 4
298
 
\fIeditable\fP true enables editing 
299
 
.RE
300
 
.PP
301
 
\fBSee also:\fP
302
 
.RS 4
303
 
\fBeditable()\fP 
304
 
.RE
305
 
.PP
306
 
 
307
 
.PP
308
 
Definition at line 185 of file qwt_counter.cpp.
309
 
.SS "void QwtCounter::setIncSteps (\fBQwtCounter::Button\fP btn, int nSteps)"
310
 
.PP
311
 
Specify the number of steps by which the value is incremented or decremented when a specified button is pushed.
312
 
.PP
313
 
\fBParameters:\fP
314
 
.RS 4
315
 
\fIbtn\fP One of \fCQwtCounter::Button1\fP, \fCQwtCounter::Button2\fP, \fCQwtCounter::Button3\fP 
316
 
.br
317
 
\fInSteps\fP Number of steps 
318
 
.RE
319
 
.PP
320
 
 
321
 
.PP
322
 
Definition at line 355 of file qwt_counter.cpp.
323
 
.PP
324
 
Referenced by setStepButton1(), setStepButton2(), and setStepButton3().
325
 
.SS "void QwtCounter::setMaxValue (double m)"
326
 
.PP
327
 
sets the maximum value of the range 
328
 
.PP
329
 
Definition at line 580 of file qwt_counter.cpp.
330
 
.PP
331
 
References QwtDoubleRange::minValue(), QwtDoubleRange::setRange(), and step().
332
 
.SS "void QwtCounter::setMinValue (double m)"
333
 
.PP
334
 
sets the minimum value of the range 
335
 
.PP
336
 
Definition at line 568 of file qwt_counter.cpp.
337
 
.PP
338
 
References QwtDoubleRange::maxValue(), QwtDoubleRange::setRange(), and step().
339
 
.SS "void QwtCounter::setNumButtons (int n)"
340
 
.PP
341
 
Specify the number of buttons on each side of the label. 
342
 
.PP
343
 
\fBParameters:\fP
344
 
.RS 4
345
 
\fIn\fP Number of buttons 
346
 
.RE
347
 
.PP
348
 
 
349
 
.PP
350
 
Definition at line 441 of file qwt_counter.cpp.
351
 
.SS "void QwtCounter::setStep (double s)"
352
 
.PP
353
 
sets the step size 
354
 
.PP
355
 
Reimplemented from \fBQwtDoubleRange\fP.
356
 
.PP
357
 
Definition at line 556 of file qwt_counter.cpp.
358
 
.PP
359
 
References QwtDoubleRange::setStep().
360
 
.SS "void QwtCounter::setStepButton1 (int nSteps)"
361
 
.PP
362
 
set the number of increment steps for button 1 
363
 
.PP
364
 
Definition at line 586 of file qwt_counter.cpp.
365
 
.PP
366
 
References setIncSteps().
367
 
.SS "void QwtCounter::setStepButton2 (int nSteps)"
368
 
.PP
369
 
set the number of increment steps for button 2 
370
 
.PP
371
 
Definition at line 598 of file qwt_counter.cpp.
372
 
.PP
373
 
References setIncSteps().
374
 
.SS "void QwtCounter::setStepButton3 (int nSteps)"
375
 
.PP
376
 
set the number of increment steps for button 3 
377
 
.PP
378
 
Definition at line 610 of file qwt_counter.cpp.
379
 
.PP
380
 
References setIncSteps().
381
 
.SS "void QwtCounter::setValue (double v)\fC [virtual]\fP"
382
 
.PP
383
 
Set a new value. 
384
 
.PP
385
 
\fBParameters:\fP
386
 
.RS 4
387
 
\fIv\fP new value Calls \fBQwtDoubleRange::setValue\fP and does all visual updates. 
388
 
.RE
389
 
.PP
390
 
\fBSee also:\fP
391
 
.RS 4
392
 
\fBQwtDoubleRange::setValue\fP 
393
 
.RE
394
 
.PP
395
 
 
396
 
.PP
397
 
Reimplemented from \fBQwtDoubleRange\fP.
398
 
.PP
399
 
Definition at line 382 of file qwt_counter.cpp.
400
 
.PP
401
 
References QwtDoubleRange::setValue(), and value().
402
 
.PP
403
 
Referenced by keyPressEvent().
404
 
.SS "QSize QwtCounter::sizeHint () const\fC [virtual]\fP"
405
 
.PP
406
 
A size hint. 
407
 
.PP
408
 
Definition at line 513 of file qwt_counter.cpp.
409
 
.PP
410
 
References QwtDoubleRange::maxValue(), QwtDoubleRange::minValue(), and step().
411
 
.SS "double QwtCounter::step () const"
412
 
.PP
413
 
returns the step size 
414
 
.PP
415
 
Reimplemented from \fBQwtDoubleRange\fP.
416
 
.PP
417
 
Definition at line 550 of file qwt_counter.cpp.
418
 
.PP
419
 
References QwtDoubleRange::step().
420
 
.PP
421
 
Referenced by setMaxValue(), setMinValue(), and sizeHint().
422
 
.SS "int QwtCounter::stepButton1 () const"
423
 
.PP
424
 
returns the number of increment steps for button 1 
425
 
.PP
426
 
Definition at line 592 of file qwt_counter.cpp.
427
 
.PP
428
 
References incSteps().
429
 
.SS "int QwtCounter::stepButton2 () const"
430
 
.PP
431
 
returns the number of increment steps for button 2 
432
 
.PP
433
 
Definition at line 604 of file qwt_counter.cpp.
434
 
.PP
435
 
References incSteps().
436
 
.SS "int QwtCounter::stepButton3 () const"
437
 
.PP
438
 
returns the number of increment steps for button 3 
439
 
.PP
440
 
Definition at line 616 of file qwt_counter.cpp.
441
 
.PP
442
 
References incSteps().
443
 
.SS "double QwtCounter::value () const\fC [virtual]\fP"
444
 
.PP
445
 
Returns the current value. 
446
 
.PP
447
 
Reimplemented from \fBQwtDoubleRange\fP.
448
 
.PP
449
 
Definition at line 621 of file qwt_counter.cpp.
450
 
.PP
451
 
References QwtDoubleRange::value().
452
 
.PP
453
 
Referenced by setValue().
454
 
.SS "void QwtCounter::valueChanged (double value)\fC [signal]\fP"
455
 
.PP
456
 
This signal is emitted when the counter's value has changed 
457
 
.PP
458
 
\fBParameters:\fP
459
 
.RS 4
460
 
\fIvalue\fP The new value 
461
 
.RE
462
 
.PP
463
 
 
464
 
 
465
 
.SH "Author"
466
 
.PP 
467
 
Generated automatically by Doxygen for Qwt User's Guide from the source code.