A widget that is used to edit and display both plain and rich text in a multi-lined format.
More...
|
| | QCustomTextEdit (QWidget *parent=nullptr) |
| | Constructs a multi-line text edit widget.
|
|
void | editedSignal () |
| | Signal emitted when the user edits the text content.
|
|
void | editingFinishedSignal () |
| | Signal emitted when the user finishes editing (focus lost or Enter pressed).
|
| virtual void | focusInEvent (QFocusEvent *e) override |
| | Handles focus-in events to update placeholder and input hint state.
|
| String | getValue () const |
| | Returns the current text content as an NDEVR String.
|
|
void | inputHintChangedSignal () |
| | Signal emitted when the input hint changes due to focus or content changes.
|
| void | keyPressEvent (QKeyEvent *e) override |
| | Handles key press events, including special handling for Enter/Return keys.
|
| QSize | minimumSizeHint () const override |
| | Returns the minimum recommended size for the text edit.
|
| virtual void | mousePressEvent (QMouseEvent *e) override |
| | Handles mouse press events for touch-friendly interaction.
|
| void | setEditable (bool is_editable) |
| | Sets whether the text edit is editable by the user.
|
| void | setHeightMultiplier (fltp04 multiplier) |
| | Sets a multiplier for the height component of the size hint.
|
| void | setTitle (const TranslatedString &title) |
| | Sets the title used as a placeholder or label for the text edit.
|
| void | setup (const TranslatedString &title, Resource< String > &value) |
| | Sets up the text edit with a title and two-way binding to a string resource.
|
| void | setup (GenericOption &option) |
| | Sets up the text edit from a GenericOption, binding the value and title.
|
| void | setValue (const String &text) |
| | Sets the text content of the text edit.
|
| QSize | sizeHint () const override |
| | Returns the recommended size for the text edit.
|
|
| bool | event (QEvent *event) override |
| | Handles general events including tooltip and palette change events.
|
|
void | onUserEditedCore () |
| | Processes user edits, emitting signals and updating bound resources.
|
|
|
fltp04 | m_height_hint_multiplier = 1.0f |
| | Multiplier applied to the height component of size hints.
|
|
QTResourceListener * | m_resource_changed_listener = nullptr |
| | Listener for external resource changes to update the text.
|
|
TranslatedString | m_title |
| | The title text used as a placeholder label.
|
A widget that is used to edit and display both plain and rich text in a multi-lined format.
Definition at line 48 of file QCustomTextEdit.h.
◆ QCustomTextEdit()
| QCustomTextEdit::QCustomTextEdit |
( |
QWidget * | parent = nullptr | ) |
|
Constructs a multi-line text edit widget.
- Parameters
-
| [in] | parent | The parent widget, or nullptr for no parent. |
References QCustomTextEdit().
Referenced by QCustomTextEdit().
◆ event()
| bool QCustomTextEdit::event |
( |
QEvent * | event | ) |
|
|
overrideprotected |
Handles general events including tooltip and palette change events.
- Parameters
-
| [in] | event | The event to handle. |
- Returns
- True if the event was handled, false otherwise.
References event().
Referenced by event().
◆ focusInEvent()
| virtual void QCustomTextEdit::focusInEvent |
( |
QFocusEvent * | e | ) |
|
|
overridevirtual |
Handles focus-in events to update placeholder and input hint state.
- Parameters
-
◆ getValue()
| String QCustomTextEdit::getValue |
( |
| ) |
const |
Returns the current text content as an NDEVR String.
- Returns
- The current text value.
◆ keyPressEvent()
| void QCustomTextEdit::keyPressEvent |
( |
QKeyEvent * | e | ) |
|
|
override |
Handles key press events, including special handling for Enter/Return keys.
- Parameters
-
| [in] | e | The key press event. |
◆ minimumSizeHint()
| QSize QCustomTextEdit::minimumSizeHint |
( |
| ) |
const |
|
override |
Returns the minimum recommended size for the text edit.
- Returns
- The minimum QSize for layout calculations.
◆ mousePressEvent()
| virtual void QCustomTextEdit::mousePressEvent |
( |
QMouseEvent * | e | ) |
|
|
overridevirtual |
Handles mouse press events for touch-friendly interaction.
- Parameters
-
| [in] | e | The mouse press event. |
◆ setEditable()
| void QCustomTextEdit::setEditable |
( |
bool | is_editable | ) |
|
Sets whether the text edit is editable by the user.
- Parameters
-
| [in] | is_editable | True to allow editing, false for read-only. |
◆ setHeightMultiplier()
| void QCustomTextEdit::setHeightMultiplier |
( |
fltp04 | multiplier | ) |
|
Sets a multiplier for the height component of the size hint.
- Parameters
-
| [in] | multiplier | The height multiplier to apply. |
◆ setTitle()
Sets the title used as a placeholder or label for the text edit.
- Parameters
-
| [in] | title | The translated title text. |
◆ setup() [1/2]
Sets up the text edit with a title and two-way binding to a string resource.
- Parameters
-
| [in] | title | The translated title text. |
| [in] | value | The string resource to bind to. |
◆ setup() [2/2]
Sets up the text edit from a GenericOption, binding the value and title.
- Parameters
-
| [in] | option | The generic option to configure from. |
◆ setValue()
| void QCustomTextEdit::setValue |
( |
const String & | text | ) |
|
Sets the text content of the text edit.
- Parameters
-
| [in] | text | The new text value. |
◆ sizeHint()
| QSize QCustomTextEdit::sizeHint |
( |
| ) |
const |
|
override |
Returns the recommended size for the text edit.
- Returns
- The recommended QSize for layout calculations.
The documentation for this class was generated from the following file: