~ubuntu-branches/ubuntu/oneiric/qwt/oneiric-proposed

« back to all changes in this revision

Viewing changes to doc/man/man3/QwtCounter.3

  • Committer: Bazaar Package Importer
  • Author(s): Fathi Boudra
  • Date: 2011-06-10 11:22:47 UTC
  • mfrom: (1.1.6 upstream) (2.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20110610112247-0i1019vvmzaq6p86
Tags: 6.0.0-1
* New upstream release (Closes: #624107):
  - drop Qt3 support. (Closes: #604379, #626868)
* Register documentation with doc-base. (Closes: #626567)
* Drop patches:
  - 01_makefiles.diff
  - 02_add_missing_warnings.diff
  - 03_qwt_branch_pull_r544.diff
* Add qwt_install_paths.patch to fix the hardcoded installation paths.
* Update debian/control:
  - drop libqt3-mt-dev build dependency.
  - bump Standards-Version to 3.9.2 (no changes).
  - drop Qt3 related packages.
  - due to bump soname (and as we dropper Qt3 support):
    - libqwt5-qt4-dev -> libqwt-dev
    - libqwt5-qt4 -> libqwt6
    - libqwt5-doc -> libqwt-doc
* Update debian/copyright file.
* Update debian/rules: drop Qt3 packages support.

Show diffs side-by-side

added added

removed removed

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