pqLineEdit is a specialization of QLineEdit which provide a new property 'text2'. More...
#include <pqLineEdit.h>
Public Slots | |
void | setTextAndResetCursor (const QString &text) |
Same as QLineEdit::setText() except that it reset the cursor position to 0. More... | |
void | setResetCursorPositionOnEditingFinished (bool val) |
To enable/disable whether the cursor position is reset to 0 after editingFinished() is fired, use the resetCursorPositionOnEditingFinished property (default: true). More... | |
Signals | |
void | textChangedAndEditingFinished () |
Unlike QLineEdit::editingFinished() which gets fired whenever the widget looses focus irrespective of if the text actually was edited, textChangedAndEditingFinished() is fired only when the text was changed as well. More... | |
void | blank () |
This signal is never fired. More... | |
Public Member Functions | |
pqLineEdit (QWidget *parent=nullptr) | |
pqLineEdit (const QString &contents, QWidget *parent=nullptr) | |
~pqLineEdit () override | |
bool | resetCursorPositionOnEditingFinished () const |
To enable/disable whether the cursor position is reset to 0 after editingFinished() is fired, use the resetCursorPositionOnEditingFinished property (default: true). More... | |
Protected Member Functions | |
void | triggerTextChangedAndEditingFinished () |
this is called by pqLineEditEventPlayer during event playback to ensure that the textChangedAndEditingFinished() signal is fired when text is changed using setText() in playback. More... | |
void | focusInEvent (QFocusEvent *event) override |
Properties | |
QString | text2 |
bool | resetCursorPositionOnEditingFinished |
Friends | |
class | pqLineEditEventPlayer |
pqLineEdit is a specialization of QLineEdit which provide a new property 'text2'.
When the text on the line widget is set using this 'text2' property (or using setTextAndResetCursor()), the after the set, the cursor position is reset to 0.
Additional, this provides a true editingFinished() signal under the name of textChangedAndEditingFinished(). Unlike QLineEdit::editingFinished() which gets fired whenever the widget looses focus irrespective of if the text actually was edited, textChangedAndEditingFinished() is fired only when the text was changed as well.
To enable/disable whether the cursor position is reset to 0 after textChangedAndEditingFinished() if fired, use the resetCursorPositionOnEditingFinished property (default: true).
Definition at line 25 of file pqLineEdit.h.
pqLineEdit::pqLineEdit | ( | QWidget * | parent = nullptr | ) |
pqLineEdit::pqLineEdit | ( | const QString & | contents, |
QWidget * | parent = nullptr |
||
) |
|
override |
|
inline |
To enable/disable whether the cursor position is reset to 0 after editingFinished() is fired, use the resetCursorPositionOnEditingFinished property (default: true).
Definition at line 45 of file pqLineEdit.h.
|
signal |
Unlike QLineEdit::editingFinished() which gets fired whenever the widget looses focus irrespective of if the text actually was edited, textChangedAndEditingFinished() is fired only when the text was changed as well.
|
signal |
This signal is never fired.
It exists so that you can add a unidirectional property link, where an information-only property updates the pqLineEdit contents, but user edits to the pqLineEdit never update the property.
|
slot |
Same as QLineEdit::setText() except that it reset the cursor position to 0.
This is useful with the pqLineEdit is used for showing numbers were the digits on the left are more significant on the right.
|
inlineslot |
To enable/disable whether the cursor position is reset to 0 after editingFinished() is fired, use the resetCursorPositionOnEditingFinished property (default: true).
Definition at line 84 of file pqLineEdit.h.
|
protected |
this is called by pqLineEditEventPlayer during event playback to ensure that the textChangedAndEditingFinished() signal is fired when text is changed using setText() in playback.
|
overrideprotected |
|
friend |
Definition at line 94 of file pqLineEdit.h.
|
readwrite |
Definition at line 28 of file pqLineEdit.h.
|
readwrite |
Definition at line 30 of file pqLineEdit.h.