CDPBaseNumPad Class
The Numpad is a numeric input dialog that only accepts numeric input and an optional minus or decimal separator. More...
Header: | #include <CDPBaseWidgets/CDPBaseNumPad.h> |
Inherits: | CDPBaseDialog and |
Public Functions
CDPBaseNumPad(QWidget *parent = 0, bool optInfo = false) | |
~CDPBaseNumPad() | |
QString | displayValue() |
void | setDisplayText(QString value) override |
void | setEchoMode(QLineEdit::EchoMode mode) override |
void | setMaxValue(double value) override |
void | setMinValue(double value) override |
void | setOptionalInfoText1(const QString &text) override |
void | setOptionalInfoText2(const QString &text) override |
void | showKeyPad(QPoint startpos) override |
Reimplemented Public Functions
virtual void | setTitle(const QString &text) override |
- 13 public functions inherited from CDPBaseDialog
- 19 public functions inherited from RenderPixWidget
- 3 public functions inherited from RoutingReplacer
- 3 public functions inherited from RoutingContainerBase
Public Slots
virtual void | hideAnimated() |
- 10 public slots inherited from CDPBaseDialog
- 10 public slots inherited from RenderPixWidget
Signals
void | signalAcceptedValue(double value) |
void | signalAcceptedValue(QString value) |
- 1 signal inherited from RenderPixWidget
Protected Functions
virtual void | keyReleaseEvent(QKeyEvent *) |
void | updateHeightDueToWidget(QWidget *pInfo, bool bHide) |
Reimplemented Protected Functions
virtual void | changeEvent(QEvent *e) |
- 8 protected functions inherited from CDPBaseDialog
- 5 protected functions inherited from RenderPixWidget
Protected Slots
void | ToggleSign() |
void | acceptValue() |
void | addToDisplay(QString value) |
void | backspace() |
void | updateHeigtDueToInfoTexts() |
- 1 protected slot inherited from RenderPixWidget
Additional Inherited Members
- 9 properties inherited from CDPBaseDialog
- 8 properties inherited from RenderPixWidget
- 1 static public member inherited from CDPBaseDialog
- 3 static public members inherited from RoutingContainerBase
Detailed Description
The Numpad is a numeric input dialog that only accepts numeric input and an optional minus or decimal separator.
The class implements the ICDPKeyPad interface and is set as global when the class name is configured in the numPadName property located in CDPBaseMainWindow.
All widgets contained within the num pad is styled according to the default styles. For instance, if the default button svg is changed in a theme, this is what will style the buttons in the widget.
There are two optional info texts that can be used if supported by the selected num pad class. The default CDPBaseNumPad does not show the texts by default, even when the texts are configured in the pad launch properties. For instance, CDPBaseButton::padInfoText1 and CDPBaseButton::padInfoText1. To enable the info texts, the user will have to configure CDPBaseMainWindow::numPadName with for instance CDPBaseNumPadOptInfo.
The optional text backgrounds are not styled by themes unless adding a css file in themes/<theme_name>/general/optInfo.css. The css styling syntax will be different based on the container type. For instance, the current css styling of CDPBaseNumPadOptInfo is based on QWidget:
border-style: solid; border-width: 1px; border-radius: 4px; border-color: gray;
Member Function Documentation
CDPBaseNumPad::CDPBaseNumPad(QWidget *parent = 0, bool optInfo = false)
Default constructs an instance of CDPBaseNumPad.
CDPBaseNumPad::~CDPBaseNumPad()
Destroys the instance of CDPBaseNumPad.
[protected slot]
void CDPBaseNumPad::ToggleSign()
[protected slot]
void CDPBaseNumPad::acceptValue()
[protected slot]
void CDPBaseNumPad::addToDisplay(QString value)
[protected slot]
void CDPBaseNumPad::backspace()
[virtual protected]
void CDPBaseNumPad::changeEvent(QEvent *e)
QString CDPBaseNumPad::displayValue()
[virtual slot]
void CDPBaseNumPad::hideAnimated()
[virtual protected]
void CDPBaseNumPad::keyReleaseEvent(QKeyEvent *)
void CDPBaseNumPad::setDisplayText(QString value)
void CDPBaseNumPad::setEchoMode(QLineEdit::EchoMode mode)
void CDPBaseNumPad::setMaxValue(double value)
void CDPBaseNumPad::setMinValue(double value)
void CDPBaseNumPad::setOptionalInfoText1(const QString &text)
void CDPBaseNumPad::setOptionalInfoText2(const QString &text)
[override virtual]
void CDPBaseNumPad::setTitle(const QString &text)
void CDPBaseNumPad::showKeyPad(QPoint startpos)
[signal]
void CDPBaseNumPad::signalAcceptedValue(double value)
Note: Signal signalAcceptedValue is overloaded in this class. To connect to this one using the function pointer syntax, you must specify the signal type in a static cast, as shown in this example:
connect(cDPBaseNumPad, static_cast<void(CDPBaseNumPad::*)(double)>(&CDPBaseNumPad::signalAcceptedValue), [=](double value){ /* ... */ });
[signal]
void CDPBaseNumPad::signalAcceptedValue(QString value)
Note: Signal signalAcceptedValue is overloaded in this class. To connect to this one using the function pointer syntax, you must specify the signal type in a static cast, as shown in this example:
connect(cDPBaseNumPad, static_cast<void(CDPBaseNumPad::*)(QString)>(&CDPBaseNumPad::signalAcceptedValue), [=](QString value){ /* ... */ });
[protected]
void CDPBaseNumPad::updateHeightDueToWidget(QWidget *pInfo, bool bHide)
[protected slot]
void CDPBaseNumPad::updateHeigtDueToInfoTexts()
Get started with CDP Studio today
Let us help you take your great ideas and turn them into the products your customer will love.