CFx SDK Documentation
2022 SP0
|
#include <FxUITextEdit.h>
Additional Inherited Members | |
Public Types inherited from CFxUIBaseView | |
enum | TextAlignment { AlignLeft = 0x0001 , AlignRight = 0x0002 , AlignHCenter = 0x0004 , AlignJustify = 0x0008 , AlignTop = 0x0020 , AlignBottom = 0x0040 , AlignVCenter = 0x0080 , AlignBaseline = 0x0100 , AlignCenter = AlignVCenter | AlignHCenter } |
enum | FocusPolicyType { eNoFocus = 0 , eTabFocus = 0x1 , eClickFocus = 0x2 , eStrongFocus = eTabFocus | eClickFocus | 0x8 , eWheelFocus = eStrongFocus | 0x4 , eKeyboardOnSetfocus = 0x10 } |
enum | UIWidthSizePolicy { eXS = 0 , eS , eM , eL , eXL } |
Static Public Member Functions inherited from CFxUIBaseView | |
static void | setTabOrder (CFxUIObject *first, CFxUIObject *second) |
Protected Member Functions inherited from CFxUIObject | |
CFxUIObject * | sender () |
Protected Attributes inherited from CFxUIObject | |
CFxUIObjectImpl * | m_pImpl |
CFxUIObjectData * | m_pData |
Class CFxUITextEdit is a one-line text editor.
Definition at line 37 of file FxUITextEdit.h.
|
explicit |
Constructor
width | Input .Default vale for width is eM i.e. medium |
CFxUITextEdit::~CFxUITextEdit | ( | ) |
Destructor
void CFxUITextEdit::clear | ( | ) |
Clears the content of text editor.
CFxUISignal<void(void)>& CFxUITextEdit::editingFinished | ( | ) |
Signal is emitted whenever the editing is finished i.e. when focusOut event occurs.
CFxUIString CFxUITextEdit::inputMask | ( | ) | const |
Return the validation mask of text edit.
If no mask is set, inputMask() returns an empty string.
bool CFxUITextEdit::isClearButtonEnabled | ( | ) | const |
Return if clear button is enabled in text edit.
CFxUISignal<void( int, int )>& CFxUITextEdit::keyPressed | ( | ) |
Signal is emitted whenever a key is pressed.
void CFxUITextEdit::moveCursor | ( | QTextCursor::MoveOperation | operation, |
QTextCursor::MoveMode | mode = QTextCursor::MoveAnchor |
||
) |
Moves the cursor by performing the given operation.
operation | It indicates to move the cursor as per enum defined for QTextCursor::MoveOperation. |
mode | It indicates to move the anchor as per enum defined for QTextCursor::MoveMode. |
CFxUIString CFxUITextEdit::placeholderText | ( | ) | const |
Return the placeholder text.
void CFxUITextEdit::selectAll | ( | ) |
Selects all the text (i.e. highlights it)
void CFxUITextEdit::setClearButtonEnabled | ( | bool | bEnable | ) |
Sets clear button enabled
The text edit displays a clear button when it is not empty.
bEnable | The clear button is visible when parameter is true, otherwise hidden. |
Sets the line edit's echo mode.
The echo mode determines how the text entered in the line edit is displayed (or echoed) to the user.
By default, the echoMode is set to eNormal. The possible echoModes are eNormal and ePassword.
void CFxUITextEdit::setFocus | ( | ) |
Sets the focus to text edit.
Cursor is set to the text edit.
void CFxUITextEdit::setInputMask | ( | const CFxUIString & | str | ) |
Sets the validation mask for text edit.
str | Input. The input string consists of a string of mask characters and separators, optionally followed by a semicolon and the character used for blanks. |
void CFxUITextEdit::setInputType | ( | int | type | ) |
Sets the input type of text edit.
type | Input. |
void CFxUITextEdit::setPlaceholderText | ( | const CFxUIString & | str | ) |
Sets the placeholder text.
This setting display a grayed-out placeholder text as long as the text() is empty and the widget doesn't have focus.
str | Input |
void CFxUITextEdit::setPlainText | ( | const CFxUIString & | sText | ) |
Sets the text editor's contents as plain text.
sText | Input. |
void CFxUITextEdit::setReadOnly | ( | bool | readOnly | ) |
Sets the content of text edit to read-only mode.
In read-only mode, the user can still copy the text to the clipboard, or drag and drop the text (if echoMode() is Normal), but cannot edit it.
readOnly | The content is read only if parameter passed is true. |
void CFxUITextEdit::setText | ( | const CFxUIString & | str | ) |
Sets the text in text editor.
str | Input |
void CFxUITextEdit::setTextAlignment | ( | TextAlignment | iAlignment | ) |
Sets alignment of text.
iAlignment | The value is to be from enums defined in TextAlignment. |
CFxUIString CFxUITextEdit::text | ( | ) | const |
Returns the text.
CFxUISignal<void(const QString )>& CFxUITextEdit::textChanged | ( | ) |
Signal is emitted whenever the content of text edit is changed.
CFxUISignal<void(const QString )>& CFxUITextEdit::textEdited | ( | ) |
Signal is emitted whenever the text is edited. The text argument is the new text.
Unlike textChanged(), this signal is not emitted when the text is changed programmatically, for example, by calling setText().
CFxUIString CFxUITextEdit::toPlainText | ( | ) | const |
Returns the text editor's content as plain text.
If the text editor has another content type, it will not be replaced by plain text if you call toPlainText().