|
QGIS API Documentation
2.8.2-Wien
|
The QgsSpinBox is a spin box with a clear button that will set the value to the defined clear value. More...
#include <qgsspinbox.h>
Public Types | |
| enum | ClearValueMode { MinimumValue, MaximumValue, CustomValue } |
Public Member Functions | |
| QgsSpinBox (QWidget *parent=0) | |
| virtual void | clear () override |
| Set the current value to the value defined by the clear value. | |
| int | clearValue () const |
| returns the value used when clear() is called. | |
| bool | expressionsEnabled () const |
| Returns whether the widget will allow entry of simple expressions, which are evaluated and then discarded. | |
| void | setClearValue (int customValue, QString clearValueText=QString()) |
| setClearValue defines the clear value for the widget and will automatically set the clear value mode to CustomValue | |
| void | setClearValueMode (ClearValueMode mode, QString clearValueText=QString()) |
| setClearValueMode defines if the clear value should be the minimum or maximum values of the widget or a custom value | |
| void | setExpressionsEnabled (const bool enabled) |
| Sets if the widget will allow entry of simple expressions, which are evaluated and then discarded. | |
| void | setShowClearButton (const bool showClearButton) |
| determines if the widget will show a clear button | |
| bool | showClearButton () const |
| virtual QValidator::State | validate (QString &input, int &pos) const override |
| virtual int | valueFromText (const QString &text) const override |
Protected Member Functions | |
| virtual void | changeEvent (QEvent *event) override |
| virtual void | paintEvent (QPaintEvent *event) override |
| virtual void | resizeEvent (QResizeEvent *event) override |
Properties | |
| bool | showClearButton |
The QgsSpinBox is a spin box with a clear button that will set the value to the defined clear value.
The clear value can be either the minimum or the maiximum value of the spin box or a custom value. This value can then be handled by a special value text.
Definition at line 27 of file qgsspinbox.h.
Definition at line 33 of file qgsspinbox.h.
|
explicit |
Definition at line 27 of file qgsspinbox.cpp.
|
overrideprotectedvirtual |
Definition at line 60 of file qgsspinbox.cpp.
|
overridevirtual |
Set the current value to the value defined by the clear value.
Definition at line 77 of file qgsspinbox.cpp.
| int QgsSpinBox::clearValue | ( | ) | const |
returns the value used when clear() is called.
Definition at line 110 of file qgsspinbox.cpp.
|
inline |
Returns whether the widget will allow entry of simple expressions, which are evaluated and then discarded.
Definition at line 58 of file qgsspinbox.h.
|
overrideprotectedvirtual |
Definition at line 66 of file qgsspinbox.cpp.
|
overrideprotectedvirtual |
Definition at line 191 of file qgsspinbox.cpp.
| void QgsSpinBox::setClearValue | ( | int | customValue, |
| QString | clearValueText = QString() |
||
| ) |
setClearValue defines the clear value for the widget and will automatically set the clear value mode to CustomValue
| customValue | defines the numerical value used as the clear value |
| clearValueText | is the text displayed when the spin box is at the clear value. If not specified, no special value text is used. |
Definition at line 82 of file qgsspinbox.cpp.
| void QgsSpinBox::setClearValueMode | ( | QgsSpinBox::ClearValueMode | mode, |
| QString | clearValueText = QString() |
||
| ) |
setClearValueMode defines if the clear value should be the minimum or maximum values of the widget or a custom value
| mode | mode to user for clear value |
| clearValueText | is the text displayed when the spin box is at the clear value. If not specified, no special value text is used. |
Definition at line 96 of file qgsspinbox.cpp.
| void QgsSpinBox::setExpressionsEnabled | ( | const bool | enabled | ) |
Sets if the widget will allow entry of simple expressions, which are evaluated and then discarded.
| enabled | set to true to allow expression entry |
Definition at line 55 of file qgsspinbox.cpp.
| void QgsSpinBox::setShowClearButton | ( | const bool | showClearButton | ) |
determines if the widget will show a clear button
Definition at line 49 of file qgsspinbox.cpp.
|
inline |
Definition at line 45 of file qgsspinbox.h.
|
overridevirtual |
Definition at line 136 of file qgsspinbox.cpp.
|
overridevirtual |
Definition at line 120 of file qgsspinbox.cpp.
|
readwrite |
Definition at line 30 of file qgsspinbox.h.
1.8.1.2