⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qwtcounter.3

📁 linux下qt的第三方的一个类
💻 3
字号:
.TH "QwtCounter" 3 "16 Nov 2004" "Version 4.2.0" "Qwt User's Guide" \" -*- nroff -*-.ad l.nh.SH NAMEQwtCounter \- .SH SYNOPSIS.br.PPInherits \fBQwtDblRange\fP..PP.SH "Detailed Description".PP The Counter Widget. 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..PPA Counter has a range from a minimum value to a maximum value and a step size. The range can be specified using \fBQwtDblRange::setRange()\fP. 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..PPHolding 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)..PPExample: .PP.nf#include '../include/qwt_counter.h>QwtCounter *cnt;cnt = new QwtCounter(parent, name);cnt->setRange(0.0, 100.0, 1.0);             // From 0.0 to 100, step 1.0cnt->setNumButtons(2);                      // Two buttons each sidecnt->setIncSteps(QwtCounter::Button1, 1);   // Button 1 increments 1 stepcnt->setIncSteps(QwtCounter::Button2, 20);  // Button 2 increments 20 stepsconnect(cnt, SIGNAL(valueChanged(double)), my_class, SLOT(newValue(double)));.fi.PP.PPDefinition at line 63 of file qwt_counter.h..SS "Public Types".in +1c.ti -1c.RI "enum \fBButton\fP { \fBButton1\fP, \fBButton2\fP, \fBButton3\fP, \fBButtonCnt\fP }".br.in -1c.SS "Signals".in +1c.ti -1c.RI "void \fBbuttonReleased\fP (double value)".br.ti -1c.RI "void \fBvalueChanged\fP (double value)".br.in -1c.SS "Public Member Functions".in +1c.ti -1c.RI "\fBQwtCounter\fP (QWidget *parent=0, const char *name=0)".br.ti -1c.RI "double \fBstep\fP () const".br.ti -1c.RI "void \fBsetStep\fP (double s)".br.ti -1c.RI "double \fBminVal\fP () const".br.ti -1c.RI "void \fBsetMinValue\fP (double m)".br.ti -1c.RI "double \fBmaxVal\fP () const".br.ti -1c.RI "void \fBsetMaxValue\fP (double m)".br.ti -1c.RI "void \fBsetStepButton1\fP (int nSteps)".br.ti -1c.RI "int \fBstepButton1\fP () const".br.ti -1c.RI "void \fBsetStepButton2\fP (int nSteps)".br.ti -1c.RI "int \fBstepButton2\fP () const".br.ti -1c.RI "void \fBsetStepButton3\fP (int nSteps)".br.ti -1c.RI "int \fBstepButton3\fP () const".br.ti -1c.RI "virtual double \fBvalue\fP () const".br.ti -1c.RI "void \fBsetNumButtons\fP (int n)".br.ti -1c.RI "int \fBnumButtons\fP () const".br.ti -1c.RI "void \fBsetIncSteps\fP (\fBQwtCounter::Button\fP btn, int nSteps)".br.ti -1c.RI "int \fBincSteps\fP (\fBQwtCounter::Button\fP btn) const".br.ti -1c.RI "virtual void \fBsetValue\fP (double)".br.ti -1c.RI "virtual QSizePolicy \fBsizePolicy\fP () const".br.ti -1c.RI "virtual QSize \fBsizeHint\fP () const".br.ti -1c.RI "virtual bool \fBeventFilter\fP (QObject *, QEvent *)".br.in -1c.SS "Protected Member Functions".in +1c.ti -1c.RI "virtual void \fBrangeChange\fP ()".br.ti -1c.RI "virtual void \fBfontChange\fP (const QFont &f)".br.in -1c.SH "Member Enumeration Documentation".PP .SS "enum \fBQwtCounter::Button\fP".PPButton index Definition at line 81 of file qwt_counter.h..SH "Constructor & Destructor Documentation".PP .SS "QwtCounter::QwtCounter (QWidget * parent = \fC0\fP, const char * name = \fC0\fP)".PPThe default number of buttons is set to 2. The default increments are: .PD 0.IP "\(bu" 2Button 1: 1 step .IP "\(bu" 2Button 2: 10 steps .IP "\(bu" 2Button 3: 100 steps.PP\fBParameters:\fP.RS 4\fIparent\fP .br\fIname\fP Forwarded to QWidget's ctor. .RE.PPDefinition at line 27 of file qwt_counter.cpp..PPReferences setNumButtons(), QwtDblRange::setRange(), and setValue()..SH "Member Function Documentation".PP .SS "void QwtCounter::buttonReleased (double value)\fC [signal]\fP".PPThis signal is emitted when a button has been released .PP\fBParameters:\fP.RS 4\fIvalue\fP The new value .RE.PP.SS "bool QwtCounter::eventFilter (QObject *, QEvent *)\fC [virtual]\fP".PPKeep track of key press and release events. .PPDefinition at line 78 of file qwt_counter.cpp..SS "void QwtCounter::fontChange (const QFont & f)\fC [protected, virtual]\fP".PPNotify change of font. .PPThis function updates the fonts of all widgets contained in QwtCounter. .PP\fBParameters:\fP.RS 4\fIf\fP new font .RE.PPDefinition at line 308 of file qwt_counter.cpp..SS "int QwtCounter::incSteps (\fBQwtCounter::Button\fP btn) const".PP\fBReturns:\fP.RS 4the number of steps by which a specified button increments the value or 0 if the button is invalid. .RE.PP\fBParameters:\fP.RS 4\fIbtn\fP One of \fCQwtCounter::Button1\fP, \fCQwtCounter::Button2\fP, \fCQwtCounter::Button3\fP .RE.PPDefinition at line 127 of file qwt_counter.cpp..SS "double QwtCounter::maxVal () const".PPreturns the maximum value of the range .PPDefinition at line 94 of file qwt_counter.h..PPReferences QwtDblRange::maxValue()..SS "double QwtCounter::minVal () const".PPreturns the minimum value of the range .PPDefinition at line 90 of file qwt_counter.h..PPReferences QwtDblRange::minValue()..SS "int QwtCounter::numButtons () const".PP\fBReturns:\fP.RS 4The number of buttons on each side of the widget. .RE.PPDefinition at line 247 of file qwt_counter.cpp..SS "void QwtCounter::rangeChange ()\fC [protected, virtual]\fP".PPNotify change of range. .PPThis function updates the enabled property of all buttons contained in QwtCounter. .PPReimplemented from \fBQwtDblRange\fP..PPDefinition at line 296 of file qwt_counter.cpp..SS "void QwtCounter::setIncSteps (\fBQwtCounter::Button\fP btn, int nSteps)".PPSpecify the number of steps by which the value is incremented or decremented when a specified button is pushed..PP\fBParameters:\fP.RS 4\fIbtn\fP One of \fCQwtCounter::Button1\fP, \fCQwtCounter::Button2\fP, \fCQwtCounter::Button3\fP .br\fInSteps\fP Number of steps .RE.PPDefinition at line 115 of file qwt_counter.cpp..SS "void QwtCounter::setMaxValue (double m)".PPsets the maximum value of the range .PPDefinition at line 96 of file qwt_counter.h..PPReferences QwtDblRange::minValue(), QwtDblRange::setRange(), and QwtDblRange::step()..SS "void QwtCounter::setMinValue (double m)".PPsets the minimum value of the range .PPDefinition at line 92 of file qwt_counter.h..PPReferences QwtDblRange::maxValue(), QwtDblRange::setRange(), and QwtDblRange::step()..SS "void QwtCounter::setNumButtons (int n)".PPSpecify the number of buttons on each side of the label. .PP\fBParameters:\fP.RS 4\fIn\fP Number of buttons .RE.PPDefinition at line 222 of file qwt_counter.cpp..PPReferenced by QwtCounter()..SS "void QwtCounter::setStep (double s)".PPsets the step size .PPReimplemented from \fBQwtDblRange\fP..PPDefinition at line 88 of file qwt_counter.h..PPReferences QwtDblRange::setStep()..SS "void QwtCounter::setStepButton1 (int nSteps)".PPset the number of increment steps for button 1 .PPDefinition at line 98 of file qwt_counter.h..SS "void QwtCounter::setStepButton2 (int nSteps)".PPset the number of increment steps for button 2 .PPDefinition at line 102 of file qwt_counter.h..SS "void QwtCounter::setStepButton3 (int nSteps)".PPset the number of increment steps for button 3 .PPDefinition at line 106 of file qwt_counter.h..SS "void QwtCounter::setValue (double v)\fC [virtual]\fP".PPSet a new value. .PP\fBParameters:\fP.RS 4\fIv\fP new value Calls \fBQwtDblRange::setValue\fP and does all visual updates. .RE.PP\fBSee also:\fP.RS 4\fBQwtDblRange::setValue\fP .RE.PP.PPReimplemented from \fBQwtDblRange\fP..PPDefinition at line 142 of file qwt_counter.cpp..PPReferences QwtDblRange::setValue(), and value()..PPReferenced by QwtCounter()..SS "QSize QwtCounter::sizeHint () const\fC [virtual]\fP".PPA size hint. .PPDefinition at line 315 of file qwt_counter.cpp..PPReferences step()..SS "QSizePolicy QwtCounter::sizePolicy () const\fC [virtual]\fP".PPPreferred/Fixed. .PPDefinition at line 350 of file qwt_counter.cpp..SS "double QwtCounter::step () const".PPreturns the step size .PPReimplemented from \fBQwtDblRange\fP..PPDefinition at line 86 of file qwt_counter.h..PPReferences QwtDblRange::step()..PPReferenced by sizeHint()..SS "int QwtCounter::stepButton1 () const".PPreturns the number of increment steps for button 1 .PPDefinition at line 100 of file qwt_counter.h..SS "int QwtCounter::stepButton2 () const".PPreturns the number of increment steps for button 2 .PPDefinition at line 104 of file qwt_counter.h..SS "int QwtCounter::stepButton3 () const".PPreturns the number of increment steps for button 3 .PPDefinition at line 108 of file qwt_counter.h..SS "virtual double QwtCounter::value () const\fC [virtual]\fP".PPReturns the current value. .PPReimplemented from \fBQwtDblRange\fP..PPDefinition at line 109 of file qwt_counter.h..PPReferences QwtDblRange::value()..PPReferenced by setValue()..SS "void QwtCounter::valueChanged (double value)\fC [signal]\fP".PPThis signal is emitted when the counter's value has changed .PP\fBParameters:\fP.RS 4\fIvalue\fP The new value .RE.PP.SH "Author".PP Generated automatically by Doxygen for Qwt User's Guide from the source code.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -