NDEVR
API Documentation
QCustomLineEdit

A line edit allows users to enter and edit a single line of plain text with useful editing functions, including undo and redo, cut and paste, and drag and drop. More...

Inheritance diagram for QCustomLineEdit:
[legend]
Collaboration diagram for QCustomLineEdit:
[legend]

Public Member Functions

 QCustomLineEdit (const QString &value, QWidget *parent=Q_NULLPTR)
 Constructs a QCustomLineEdit with an initial value and the given parent widget.
 QCustomLineEdit (QWidget *parent=Q_NULLPTR)
 Constructs a QCustomLineEdit with the given parent widget.
 ~QCustomLineEdit ()
 Destroys the line edit and its resources.
RGBColor backgroundColor () const
 Returns the current background color of the line edit.
void clearBackgroundColor ()
 Clears any custom background color, reverting to the default.
void clearInputHint ()
 Clears the input hint text.
void clearValue ()
 Clears the current value of the line edit.
QCustomValidatorcustomValidator ()
 Returns a mutable reference to the custom validator used for input validation.
const QCustomValidatorcustomValidator () const
 Returns a const reference to the custom validator used for input validation.
void editedSignal ()
 Emitted when the text is edited by the user.
void editingFinishedSignal ()
 Emitted when the user finishes editing (focus lost or enter pressed).
bool event (QEvent *event) override
 Handles generic events such as tooltip and theme updates.
void forceValue (const StringView &forced_value)
 Ignores validation steps, password encoding, etc.
template<class t_type>
t_type getAs () const
 Returns the current value converted to the requested type.
template<class t_type>
t_type getAs (bool allow_placeholder) const
 Returns the current value converted to the requested type.
template<class t_angle_type = fltp08>
Angle< t_angle_type > getUnitAngle (bool allow_placeholder=true) const
 Returns the current value as an Angle in internal representation.
fltp08 getUnitValue (bool allow_placeholder=true) const
 Returns the current value as a floating-point number in user-facing units.
String getValue () const
 Returns the current text value of the line edit.
String getValue (bool allow_placeholder) const
 Returns the current text value of the line edit.
bool hasUserFocus () const
 Returns whether the line edit currently has user focus (keyboard or touch).
const TranslatedStringinputHint () const
 Returns the current input hint text.
void inputHintChangedSignal ()
 Emitted when the input hint text changes.
bool isEditable () const
 Returns whether the line edit is currently editable.
bool isEditing () const
 Returns whether the user is currently editing this line edit.
bool isPassword () const
 Returns whether this line edit is in password mode.
bool isValid () const
 Returns whether the current text passes validation.
QSize minimumSizeHint () const override
 Returns the minimum size hint for layout purposes.
void onEdited ()
 Slot invoked when the text has been edited by the user.
void onFinishedSlot ()
 Slot invoked when editing is finished, to commit the value.
const StringpasswordEncoder () const
 Returns the password encoder string used for cross-session password storage.
void setAllowPlaceholderAsValue (bool allow)
 Sets whether the placeholder text should be treated as a valid value when the field is empty.
void setAsKeyboardFocus ()
 Sets this line edit as the primary keyboard focus target.
void setAutoShowTooltip (bool auto_show_tooltip)
 Sets whether the tooltip should automatically update to show the current value.
void setBackgroundColor (const RGBColor &color)
 Sets the background color of the line edit.
void setBold (bool is_bold)
 Sets whether the line edit text is rendered in bold.
void setConstantUnit (const ConstPointer< Unit > &unit, uint01 dimension=Constant< uint01 >::Invalid)
 Sets a constant unit for value formatting and conversion.
void setCustomUnit (const StringView &unit, UnitCategory fallback_unit, uint01 dimension=Constant< uint01 >::Invalid)
 Sets a custom unit string with a fallback unit category.
void setEditable (bool editable)
 Sets whether the line edit is editable by the user.
void setFontMultiplier (fltp04 font_multiplier)
 Sets a multiplier applied to the base font size.
void setInputHint (const TranslatedString &hint)
 Sets an input hint displayed to guide the user on expected input.
void setIsPassword (bool is_password, const StringView &encoder=StringView())
 Sets this widget to be a password.
void setPlaceholderText (const QString &value)
 Sets the placeholder text displayed when the field is empty.
void setPlaceHolderUnitValue (fltp08 value)
 Sets the placeholder value as a floating-point number in user-facing units.
template<class t_type>
void setPlaceholderValue (const t_type &input_value, bool allow_placeholder_as_value=true)
 Sets a placeholder value displayed when the field is empty.
void setPlaceholderValue (const TranslatedString &input_value, bool allow_placeholder_as_value=true)
 Sets a translated placeholder value displayed when the field is empty.
void setRegex (const StringView &regex)
 Sets a custom regex pattern for input validation.
void setStep (fltp08 step)
 Sets the step increment used when scrolling or using arrow keys on numeric values.
virtual void setTitle (const TranslatedString &title)
 Sets the display title for the line edit, used as a label or placeholder context.
void setToolTip (const TranslatedString &tooltip)
 Sets the tooltip text for the line edit.
void setUnitType (UnitCategory unit, uint01 dimension=Constant< uint01 >::Invalid)
 Sets the unit type used for value formatting and conversion.
template<class t_angle_type>
void setUnitValue (Angle< t_angle_type > value)
 Sets the value as an angle, converting to internal representation first.
void setUnitValue (fltp08 value)
 Sets the value as a floating-point number in user-facing units.
template<class t_type>
void setup (ApplicationOption< t_type > &option)
 Sets up the line edit from an ApplicationOption, using its label and resource.
template<class t_type>
void setup (const TranslatedString &title)
 Sets up the line edit for a specific type with a title, configuring validation accordingly.
void setup (const TranslatedString &title, const TypeInfo &type)
 Sets up the line edit with a title and type info for validation.
void setup (const TranslatedString &title, Resource< String > &resource)
 Sets up the line edit bound to a String resource with a title.
template<class t_type>
void setup (const TranslatedString &title, Resource< t_type > &resource)
 Sets up two-way binding between this line edit and a Resource.
void setup (const TranslatedString &title, UnitCategory unit_type, uint01 dim=Constant< uint01 >::Invalid)
 Sets up the line edit with a title and unit type.
void setup (GenericOption &option)
 Sets up the line edit from a GenericOption, binding title, type, and resource.
void setup (Resource< String > &resource)
 Sets up the line edit bound to a String resource, using the resource name as the title.
void setValue (const Angle< fltp08 > &input_value)
 Sets the value from an Angle<fltp08>.
void setValue (const Angle< sint04 > &input_value)
 Sets the value from an Angle<sint04>.
void setValue (const PasswordString &input_value)
 Sets the value from a PasswordString.
void setValue (const StringView &input_value)
 Sets the value from a StringView.
template<class t_type>
std::enable_if< ObjectInfo< t_type >::Number, void >::type setValue (const t_type &input_value)
 Sets the value from a numeric type, applying unit formatting if configured.
void setValue (const TimeSpan &input_value)
 Sets the value from a TimeSpan.
void setValue (const TranslatedString &input_value)
 Sets the value from a TranslatedString.
QSize sizeHint () const override
 Returns the recommended size for the line edit.
void startUserEdit (bool select_all=true)
 Begins user editing of the line edit, optionally selecting all text.
void updateColor ()
 Slot to update the line edit color based on validation state.
void wheelEvent (QWheelEvent *event) override
 Handles mouse wheel events for incrementing or decrementing numeric values.

Static Public Member Functions

static bool UseKeypad ()
 Returns whether the touch keypad should be used for input.

Protected Attributes

TranslatedString m_title
 The display title for the line edit.
TranslatedString m_tooltip
 The tooltip text.

Private Member Functions

virtual void creatUnitLister ()
 Creates a unit lister popup for selecting units.
virtual void focusInEvent (QFocusEvent *e) override
 Handles focus-in events to begin editing state.
virtual void focusOutEvent (QFocusEvent *e) override
 Handles focus-out events to finalize editing.
virtual void mousePressEvent (QMouseEvent *e) override
 Handles mouse press events to initiate editing or show the keypad.
void paintEvent (QPaintEvent *event) override
 Custom paint event for rendering the line edit with background color and decorations.

Detailed Description

A line edit allows users to enter and edit a single line of plain text with useful editing functions, including undo and redo, cut and paste, and drag and drop.


In touch mode, a popup Keypad will appear based on the type of data being input.

See also
QCustomComboBox, QCustomLabel, QCustomValidator

Definition at line 191 of file QCustomLineEdit.h.

Constructor & Destructor Documentation

◆ QCustomLineEdit() [1/2]

QCustomLineEdit::QCustomLineEdit ( QWidget * parent = Q_NULLPTR)
explicit

Constructs a QCustomLineEdit with the given parent widget.

Parameters
[in]parentThe parent widget.

Referenced by DesignObjectSearchWidget::DesignObjectSearchWidget(), and DesignObjectStringWidget::DesignObjectStringWidget().

◆ QCustomLineEdit() [2/2]

QCustomLineEdit::QCustomLineEdit ( const QString & value,
QWidget * parent = Q_NULLPTR )
explicit

Constructs a QCustomLineEdit with an initial value and the given parent widget.

Parameters
[in]valueThe initial text value.
[in]parentThe parent widget.

Member Function Documentation

◆ backgroundColor()

RGBColor QCustomLineEdit::backgroundColor ( ) const

Returns the current background color of the line edit.

Returns
The background color.

◆ customValidator() [1/2]

QCustomValidator & QCustomLineEdit::customValidator ( )

Returns a mutable reference to the custom validator used for input validation.

Returns
A mutable reference to the QCustomValidator.

Referenced by DesignObjectSearchWidget::DesignObjectSearchWidget(), DesignObjectStringWidget::DesignObjectStringWidget(), DesignObjectSearchWidget::setNDPO(), DesignObjectStringWidget::setNDPO(), and setup().

◆ customValidator() [2/2]

const QCustomValidator & QCustomLineEdit::customValidator ( ) const

Returns a const reference to the custom validator used for input validation.

Returns
A const reference to the QCustomValidator.

◆ event()

bool QCustomLineEdit::event ( QEvent * event)
override

Handles generic events such as tooltip and theme updates.

Parameters
[in]eventThe event to handle.
Returns
True if the event was handled, false otherwise.

References event().

Referenced by event(), paintEvent(), and wheelEvent().

◆ focusInEvent()

virtual void QCustomLineEdit::focusInEvent ( QFocusEvent * e)
overrideprivatevirtual

Handles focus-in events to begin editing state.

Parameters
[in]eThe focus event.

◆ focusOutEvent()

virtual void QCustomLineEdit::focusOutEvent ( QFocusEvent * e)
overrideprivatevirtual

Handles focus-out events to finalize editing.

Parameters
[in]eThe focus event.

◆ forceValue()

void QCustomLineEdit::forceValue ( const StringView & forced_value)

Ignores validation steps, password encoding, etc.


The value will be this

Warning
Should not be used under normal conditions.

◆ getAs() [1/2]

template<class t_type>
t_type QCustomLineEdit::getAs ( ) const
inline

Returns the current value converted to the requested type.

Returns
The current value converted to t_type.

Definition at line 482 of file QCustomLineEdit.h.

References getValue().

◆ getAs() [2/2]

template<class t_type>
t_type QCustomLineEdit::getAs ( bool allow_placeholder) const
inline

Returns the current value converted to the requested type.

Parameters
[in]allow_placeholderWhether to use the placeholder value if the field is empty.
Returns
The current value converted to t_type.

Definition at line 473 of file QCustomLineEdit.h.

References getValue().

Referenced by DesignObjectStringWidget::setNDPO(), and setup().

◆ getUnitAngle()

template<class t_angle_type = fltp08>
Angle< t_angle_type > QCustomLineEdit::getUnitAngle ( bool allow_placeholder = true) const
inline

Returns the current value as an Angle in internal representation.

Parameters
[in]allow_placeholderWhether to use the placeholder value if the field is empty.
Returns
The unit-converted angle value.

Definition at line 349 of file QCustomLineEdit.h.

References getUnitValue(), and INTERNAL_ANGLE.

◆ getUnitValue()

fltp08 QCustomLineEdit::getUnitValue ( bool allow_placeholder = true) const

Returns the current value as a floating-point number in user-facing units.

Parameters
[in]allow_placeholderWhether to use the placeholder value if the field is empty.
Returns
The unit-converted floating-point value.

Referenced by getUnitAngle(), and setup().

◆ getValue() [1/2]

String QCustomLineEdit::getValue ( ) const

Returns the current text value of the line edit.

Returns
The current value as a String.

◆ getValue() [2/2]

String QCustomLineEdit::getValue ( bool allow_placeholder) const

Returns the current text value of the line edit.

Parameters
[in]allow_placeholderWhether to return the placeholder value if the field is empty.
Returns
The current value as a String.

Referenced by getAs(), getAs(), DesignObjectSearchWidget::getObjectsBeginningWithSearch(), and DesignObjectSearchWidget::getObjectsContainingSearch().

◆ hasUserFocus()

bool QCustomLineEdit::hasUserFocus ( ) const

Returns whether the line edit currently has user focus (keyboard or touch).

Returns
True if the line edit has user focus, false otherwise.

Referenced by setValue().

◆ inputHint()

const TranslatedString & QCustomLineEdit::inputHint ( ) const

Returns the current input hint text.

Returns
A const reference to the input hint TranslatedString.

◆ isEditable()

bool QCustomLineEdit::isEditable ( ) const
inline

Returns whether the line edit is currently editable.

Returns
True if editable, false otherwise.

Definition at line 263 of file QCustomLineEdit.h.

◆ isEditing()

bool QCustomLineEdit::isEditing ( ) const

Returns whether the user is currently editing this line edit.

Returns
True if the user is actively editing, false otherwise.

◆ isPassword()

bool QCustomLineEdit::isPassword ( ) const

Returns whether this line edit is in password mode.

Returns
True if the line edit is in password mode, false otherwise.

◆ isValid()

bool QCustomLineEdit::isValid ( ) const

Returns whether the current text passes validation.

Returns
True if the current value is valid, false otherwise.

◆ minimumSizeHint()

QSize QCustomLineEdit::minimumSizeHint ( ) const
override

Returns the minimum size hint for layout purposes.

Returns
The minimum size hint.

◆ mousePressEvent()

virtual void QCustomLineEdit::mousePressEvent ( QMouseEvent * e)
overrideprivatevirtual

Handles mouse press events to initiate editing or show the keypad.

Parameters
[in]eThe mouse event.

◆ paintEvent()

void QCustomLineEdit::paintEvent ( QPaintEvent * event)
overrideprivate

Custom paint event for rendering the line edit with background color and decorations.

Parameters
[in]eventThe paint event.

References event().

◆ passwordEncoder()

const String & QCustomLineEdit::passwordEncoder ( ) const

Returns the password encoder string used for cross-session password storage.

Returns
A const reference to the encoder String.

◆ setAllowPlaceholderAsValue()

void QCustomLineEdit::setAllowPlaceholderAsValue ( bool allow)

Sets whether the placeholder text should be treated as a valid value when the field is empty.

Parameters
[in]allowWhether to allow the placeholder as a value.

Referenced by DesignObjectStringWidget::DesignObjectStringWidget(), and setPlaceholderValue().

◆ setAutoShowTooltip()

void QCustomLineEdit::setAutoShowTooltip ( bool auto_show_tooltip)
inline

Sets whether the tooltip should automatically update to show the current value.

Parameters
[in]auto_show_tooltipWhether to enable automatic tooltip updates.

Definition at line 610 of file QCustomLineEdit.h.

◆ setBackgroundColor()

void QCustomLineEdit::setBackgroundColor ( const RGBColor & color)

Sets the background color of the line edit.

Parameters
[in]colorThe background color to apply.

◆ setBold()

void QCustomLineEdit::setBold ( bool is_bold)

Sets whether the line edit text is rendered in bold.

Parameters
[in]is_boldWhether the text should be bold.

◆ setConstantUnit()

void QCustomLineEdit::setConstantUnit ( const ConstPointer< Unit > & unit,
uint01 dimension = Constantuint01 >::Invalid )

Sets a constant unit for value formatting and conversion.

Parameters
[in]unitThe constant unit pointer to use.
[in]dimensionThe specific unit dimension, or Invalid for default.

◆ setCustomUnit()

void QCustomLineEdit::setCustomUnit ( const StringView & unit,
UnitCategory fallback_unit,
uint01 dimension = Constantuint01 >::Invalid )

Sets a custom unit string with a fallback unit category.

Parameters
[in]unitThe custom unit string.
[in]fallback_unitThe fallback unit category if the custom unit is not recognized.
[in]dimensionThe specific unit dimension, or Invalid for default.

◆ setEditable()

void QCustomLineEdit::setEditable ( bool editable)

Sets whether the line edit is editable by the user.

Parameters
[in]editableWhether the line edit should be editable.

◆ setFontMultiplier()

void QCustomLineEdit::setFontMultiplier ( fltp04 font_multiplier)

Sets a multiplier applied to the base font size.

Parameters
[in]font_multiplierThe font size multiplier.

◆ setInputHint()

void QCustomLineEdit::setInputHint ( const TranslatedString & hint)

Sets an input hint displayed to guide the user on expected input.

Parameters
[in]hintThe hint text to display.

◆ setIsPassword()

void QCustomLineEdit::setIsPassword ( bool is_password,
const StringView & encoder = StringView() )

Sets this widget to be a password.

No input will be logged, and data will be stored as a PasswordString.

Parameters
[in]is_passwordWhether or not the LineEdit should be treated as a password.
[in]encoderA special encoder in case the password should be used across sessions.

◆ setPlaceholderText()

void QCustomLineEdit::setPlaceholderText ( const QString & value)

Sets the placeholder text displayed when the field is empty.

Parameters
[in]valueThe placeholder text.

Referenced by DesignObjectSearchWidget::DesignObjectSearchWidget(), and setPlaceholderValue().

◆ setPlaceHolderUnitValue()

void QCustomLineEdit::setPlaceHolderUnitValue ( fltp08 value)

Sets the placeholder value as a floating-point number in user-facing units.

Parameters
[in]valueThe placeholder unit value.

◆ setPlaceholderValue() [1/2]

template<class t_type>
void QCustomLineEdit::setPlaceholderValue ( const t_type & input_value,
bool allow_placeholder_as_value = true )
inline

Sets a placeholder value displayed when the field is empty.

Parameters
[in]input_valueThe placeholder value to display.
[in]allow_placeholder_as_valueWhether the placeholder counts as a valid value.

Definition at line 557 of file QCustomLineEdit.h.

References StringView::getAs(), setAllowPlaceholderAsValue(), and setPlaceholderText().

◆ setPlaceholderValue() [2/2]

void QCustomLineEdit::setPlaceholderValue ( const TranslatedString & input_value,
bool allow_placeholder_as_value = true )

Sets a translated placeholder value displayed when the field is empty.

Parameters
[in]input_valueThe translated placeholder value.
[in]allow_placeholder_as_valueWhether the placeholder counts as a valid value.

◆ setRegex()

void QCustomLineEdit::setRegex ( const StringView & regex)
inline

Sets a custom regex pattern for input validation.

Parameters
[in]regexThe regex pattern string.

Definition at line 375 of file QCustomLineEdit.h.

◆ setStep()

void QCustomLineEdit::setStep ( fltp08 step)

Sets the step increment used when scrolling or using arrow keys on numeric values.

Parameters
[in]stepThe step increment value.

◆ setTitle()

virtual void QCustomLineEdit::setTitle ( const TranslatedString & title)
virtual

Sets the display title for the line edit, used as a label or placeholder context.

Parameters
[in]titleThe title to display.

Reimplemented in DesignObjectStringWidget.

Referenced by DesignObjectStringWidget::setTitle(), and setup().

◆ setToolTip()

void QCustomLineEdit::setToolTip ( const TranslatedString & tooltip)

Sets the tooltip text for the line edit.

Parameters
[in]tooltipThe tooltip text to display.

◆ setUnitType()

void QCustomLineEdit::setUnitType ( UnitCategory unit,
uint01 dimension = Constantuint01 >::Invalid )

Sets the unit type used for value formatting and conversion.

Parameters
[in]unitThe unit category to use.
[in]dimensionThe specific unit dimension, or Invalid for default.

◆ setUnitValue() [1/2]

template<class t_angle_type>
void QCustomLineEdit::setUnitValue ( Angle< t_angle_type > value)
inline

Sets the value as an angle, converting to internal representation first.

Parameters
[in]valueThe angle value to set.

Definition at line 329 of file QCustomLineEdit.h.

References setUnitValue().

Referenced by setUnitValue(), and setup().

◆ setUnitValue() [2/2]

void QCustomLineEdit::setUnitValue ( fltp08 value)

Sets the value as a floating-point number in user-facing units.

Parameters
[in]valueThe unit value to set.

◆ setup() [1/8]

template<class t_type>
void QCustomLineEdit::setup ( ApplicationOption< t_type > & option)
inline

Sets up the line edit from an ApplicationOption, using its label and resource.

Parameters
[in]optionThe application option to bind to.

Definition at line 403 of file QCustomLineEdit.h.

References ApplicationOption< t_type >::getResource(), ApplicationOption< t_type >::label(), and setup().

◆ setup() [2/8]

template<class t_type>
void QCustomLineEdit::setup ( const TranslatedString & title)
inline

Sets up the line edit for a specific type with a title, configuring validation accordingly.

Parameters
[in]titleThe display title for the line edit.

Definition at line 364 of file QCustomLineEdit.h.

References GetTypeInfo(), StringStream< t_type >::getValidRegex(), and setTitle().

Referenced by setup(), and setup().

◆ setup() [3/8]

void QCustomLineEdit::setup ( const TranslatedString & title,
const TypeInfo & type )

Sets up the line edit with a title and type info for validation.

Parameters
[in]titleThe display title.
[in]typeThe type information for validation.

◆ setup() [4/8]

void QCustomLineEdit::setup ( const TranslatedString & title,
Resource< String > & resource )

Sets up the line edit bound to a String resource with a title.

Parameters
[in]titleThe display title.
[in]resourceThe string resource to bind to.

◆ setup() [5/8]

template<class t_type>
void QCustomLineEdit::setup ( const TranslatedString & title,
Resource< t_type > & resource )
inline

Sets up two-way binding between this line edit and a Resource.

When the line edit value changes, the resource is updated. When the resource changes externally, the line edit display is updated.

Parameters
[in]titleThe display title for the line edit.
[in]resourceThe resource to bind to.

Definition at line 416 of file QCustomLineEdit.h.

References ResourceBase::addListener(), customValidator(), editingFinishedSignal(), Resource< T >::get(), getAs(), getUnitValue(), Resource< T >::set(), setUnitValue(), setup(), and setValue().

◆ setup() [6/8]

void QCustomLineEdit::setup ( const TranslatedString & title,
UnitCategory unit_type,
uint01 dim = Constantuint01 >::Invalid )

Sets up the line edit with a title and unit type.

Parameters
[in]titleThe display title.
[in]unit_typeThe unit category for formatting.
[in]dimThe unit dimension, or Invalid for default.

◆ setup() [7/8]

void QCustomLineEdit::setup ( GenericOption & option)

Sets up the line edit from a GenericOption, binding title, type, and resource.

Parameters
[in]optionThe generic option to bind to.

◆ setup() [8/8]

void QCustomLineEdit::setup ( Resource< String > & resource)

Sets up the line edit bound to a String resource, using the resource name as the title.

Parameters
[in]resourceThe string resource to bind to.

◆ setValue() [1/7]

void QCustomLineEdit::setValue ( const Angle< fltp08 > & input_value)
inline

Sets the value from an Angle<fltp08>.

Parameters
[in]input_valueThe angle value to set.

Definition at line 537 of file QCustomLineEdit.h.

References setValue().

◆ setValue() [2/7]

void QCustomLineEdit::setValue ( const Angle< sint04 > & input_value)
inline

Sets the value from an Angle<sint04>.

Parameters
[in]input_valueThe angle value to set.

Definition at line 529 of file QCustomLineEdit.h.

References setValue().

◆ setValue() [3/7]

void QCustomLineEdit::setValue ( const PasswordString & input_value)

Sets the value from a PasswordString.

Parameters
[in]input_valueThe password value to set.

◆ setValue() [4/7]

void QCustomLineEdit::setValue ( const StringView & input_value)

Sets the value from a StringView.

Parameters
[in]input_valueThe string value to set.

◆ setValue() [5/7]

template<class t_type>
std::enable_if< ObjectInfo< t_type >::Number, void >::type QCustomLineEdit::setValue ( const t_type & input_value)
inline

Sets the value from a numeric type, applying unit formatting if configured.

Parameters
[in]input_valueThe numeric value to set.

Definition at line 491 of file QCustomLineEdit.h.

References hasUserFocus(), and IsValid().

Referenced by setup(), setValue(), and setValue().

◆ setValue() [6/7]

void QCustomLineEdit::setValue ( const TimeSpan & input_value)

Sets the value from a TimeSpan.

Parameters
[in]input_valueThe time span value to set.

◆ setValue() [7/7]

void QCustomLineEdit::setValue ( const TranslatedString & input_value)

Sets the value from a TranslatedString.

Parameters
[in]input_valueThe translated string value to set.

◆ sizeHint()

QSize QCustomLineEdit::sizeHint ( ) const
override

Returns the recommended size for the line edit.

Returns
The size hint.

◆ startUserEdit()

void QCustomLineEdit::startUserEdit ( bool select_all = true)

Begins user editing of the line edit, optionally selecting all text.

Parameters
[in]select_allWhether to select all text when entering edit mode.

◆ UseKeypad()

bool QCustomLineEdit::UseKeypad ( )
static

Returns whether the touch keypad should be used for input.

Returns
True if the keypad should be shown, false otherwise.

◆ wheelEvent()

void QCustomLineEdit::wheelEvent ( QWheelEvent * event)
override

Handles mouse wheel events for incrementing or decrementing numeric values.

Parameters
[in]eventThe wheel event.

References event().


The documentation for this class was generated from the following file: