|
QWT API (English) 7.0.1
Qt Widget Library for Technical Applications - English API Documentation
|
The Counter Widget. More...
#include <qwt_counter.h>
Classes | |
| class | PrivateData |
Public Types | |
| enum | Button { Button1 , Button2 , Button3 , ButtonCnt } |
| Button index . More... | |
Public Slots | |
| void | setValue (double) |
| Set a new value without adjusting to the step raster. | |
Signals | |
| void | buttonReleased (double value) |
| Signal emitted when a button has been released. | |
| void | valueChanged (double value) |
| Signal emitted when the counter's value has changed. | |
Public Member Functions | |
| QwtCounter (QWidget *parent=nullptr) | |
| Constructor. | |
| virtual | ~QwtCounter () |
| Destructor. | |
| void | setValid (bool) |
| Set the counter to be in valid/invalid state. | |
| bool | isValid () const |
| Return true if the value is valid. | |
| void | setWrapping (bool) |
| Enable or disable wrapping. | |
| bool | wrapping () const |
| Return true if wrapping is enabled. | |
| bool | isReadOnly () const |
| Return true if the counter is read only. | |
| void | setReadOnly (bool) |
| Set the counter to read only mode. | |
| void | setNumButtons (int) |
| Set the number of buttons on each side. | |
| int | numButtons () const |
| Return the number of buttons. | |
| void | setIncSteps (QwtCounter::Button, int numSteps) |
| Set the number of increment steps for a button. | |
| int | incSteps (QwtCounter::Button) const |
| Return the number of increment steps for a button. | |
| virtual QSize | sizeHint () const override |
| Return a size hint. | |
| double | singleStep () const |
| Return the single step size. | |
| void | setSingleStep (double stepSize) |
| Set the single step size. | |
| void | setRange (double min, double max) |
| Set the range of the counter. | |
| double | minimum () const |
| Return the minimum value. | |
| void | setMinimum (double) |
| Set the minimum value. | |
| double | maximum () const |
| Return the maximum value. | |
| void | setMaximum (double) |
| Set the maximum value. | |
| void | setStepButton1 (int nSteps) |
| Set the number of increment steps for button 1. | |
| int | stepButton1 () const |
| Return the number of increment steps for button 1. | |
| void | setStepButton2 (int nSteps) |
| Set the number of increment steps for button 2. | |
| int | stepButton2 () const |
| Return the number of increment steps for button 2. | |
| void | setStepButton3 (int nSteps) |
| Set the number of increment steps for button 3. | |
| int | stepButton3 () const |
| Return the number of increment steps for button 3. | |
| double | value () const |
| Return the current value. | |
Protected Member Functions | |
| virtual bool | event (QEvent *) override |
| Handle QEvent::PolishRequest events. | |
| virtual void | wheelEvent (QWheelEvent *) override |
| Handle wheel events. | |
| virtual void | keyPressEvent (QKeyEvent *) override |
| Handle key events. | |
Properties | |
| double | value |
| double | minimum |
| double | maximum |
| double | singleStep |
| int | numButtons |
| int | stepButton1 |
| int | stepButton2 |
| int | stepButton3 |
| bool | readOnly |
| bool | wrapping |
The Counter Widget.
| enum QwtCounter::Button |
|
explicit |
Constructor.
|
virtual |
Destructor.
Destructor .
|
signal |
Signal emitted when a button has been released.
|
overrideprotectedvirtual |
Handle QEvent::PolishRequest events.
| event | Event |
| int QwtCounter::incSteps | ( | QwtCounter::Button | button | ) | const |
Return the number of increment steps for a button.
Return the number of steps by which a specified button increments the value, or 0 if the button is invalid.
| bool QwtCounter::isReadOnly | ( | ) | const |
Return true if the counter is read only.
Return true when the line edit is read only.
| bool QwtCounter::isValid | ( | ) | const |
Return true if the value is valid.
|
overrideprotectedvirtual |
Handle key events.
| event | Key event |
| double QwtCounter::maximum | ( | ) | const |
Return the maximum value.
Return the maximum of the range.
| double QwtCounter::minimum | ( | ) | const |
Return the minimum value.
Return the minimum of the range.
| int QwtCounter::numButtons | ( | ) | const |
Return the number of buttons.
Return the number of buttons on each side of the widget.
| void QwtCounter::setIncSteps | ( | QwtCounter::Button | button, |
| int | numSteps | ||
| ) |
Set the number of increment steps for a button.
Specify the number of steps by which the value is incremented or decremented when a specified button is pushed.
| void QwtCounter::setMaximum | ( | double | value | ) |
Set the maximum value.
Set the maximum value of the range.
| void QwtCounter::setMinimum | ( | double | value | ) |
Set the minimum value.
Set the minimum value of the range.
| void QwtCounter::setNumButtons | ( | int | numButtons | ) |
Set the number of buttons on each side.
Specify the number of buttons on each side of the label.
| void QwtCounter::setRange | ( | double | min, |
| double | max | ||
| ) |
Set the range of the counter.
Set the minimum and maximum values.
| void QwtCounter::setReadOnly | ( | bool | on | ) |
Set the counter to read only mode.
Allow/disallow the user to manually edit the value.
| void QwtCounter::setSingleStep | ( | double | stepSize | ) |
Set the single step size.
Set the step size of the counter.
| void QwtCounter::setStepButton1 | ( | int | nSteps | ) |
Set the number of increment steps for button 1.
| void QwtCounter::setStepButton2 | ( | int | nSteps | ) |
Set the number of increment steps for button 2.
| void QwtCounter::setStepButton3 | ( | int | nSteps | ) |
Set the number of increment steps for button 3.
| void QwtCounter::setValid | ( | bool | on | ) |
Set the counter to be in valid/invalid state.
|
slot |
Set a new value without adjusting to the step raster.
| void QwtCounter::setWrapping | ( | bool | on | ) |
Enable or disable wrapping.
Enable/disable wrapping.
| double QwtCounter::singleStep | ( | ) | const |
Return the single step size.
Return single step size.
|
overridevirtual |
Return a size hint.
Return a size hint .
| int QwtCounter::stepButton1 | ( | ) | const |
Return the number of increment steps for button 1.
| int QwtCounter::stepButton2 | ( | ) | const |
Return the number of increment steps for button 2.
| int QwtCounter::stepButton3 | ( | ) | const |
Return the number of increment steps for button 3.
| double QwtCounter::value | ( | ) | const |
Return the current value.
Return current value of the counter.
|
signal |
Signal emitted when the counter's value has changed.
|
overrideprotectedvirtual |
Handle wheel events.
| event | Wheel event |
| bool QwtCounter::wrapping | ( | ) | const |
Return true if wrapping is enabled.
Return true when wrapping is set.