Open 3D Engine AzQtComponents API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AzQtComponents::LineEdit Class Reference

Class to handle styling and painting of QLineEdit widgets. More...

#include <LineEdit.h>

Classes

struct  Config
 Style configuration for the LineEdit class. More...
 

Static Public Member Functions

static void applySearchStyle (QLineEdit *lineEdit)
 Applies the "Search" style class to a QLineEdit.
 
static void removeSearchStyle (QLineEdit *lineEdit)
 Removes the "Search" style class from a QLineEdit.
 
static void applyDropTargetStyle (QLineEdit *lineEdit, bool valid)
 
static void removeDropTargetStyle (QLineEdit *lineEdit)
 Removes the "DropTarget" style class from a QLineEdit.
 
static Config loadConfig (QSettings &settings)
 
static Config defaultConfig ()
 Gets the default LineEdit style configuration.
 
static void setErrorMessage (QLineEdit *lineEdit, const QString &error)
 
static void setExternalError (QLineEdit *lineEdit, bool hasExternalError)
 
static void setErrorIconEnabled (QLineEdit *lineEdit, bool enabled)
 
static bool errorIconEnabled (QLineEdit *lineEdit)
 Returns true if the error icon will be shown if an error state is detected.
 
static QToolButton * getClearButton (const QLineEdit *lineEdit)
 
static void setEnableClearButtonWhenReadOnly (QLineEdit *lineEdit, bool enabled)
 Enables the clear button to be displayed on read-only LineEdits. Default value is false.
 

Friends

class BrowseEdit
 
class Style
 

Detailed Description

Class to handle styling and painting of QLineEdit widgets.

Member Function Documentation

◆ applyDropTargetStyle()

static void AzQtComponents::LineEdit::applyDropTargetStyle ( QLineEdit *  lineEdit,
bool  valid 
)
static

Applies the "DropTarget" style class to a QLineEdit.

Parameters
validWhether the QLineEdit is a valid drop target or not.

◆ getClearButton()

static QToolButton * AzQtComponents::LineEdit::getClearButton ( const QLineEdit *  lineEdit)
static

Returns a pointer to the QToolButton created when QLineEdit::setClearButtonEnabled(true) is called. Returns nullptr if the clear button has not been created yet.

◆ loadConfig()

static Config AzQtComponents::LineEdit::loadConfig ( QSettings &  settings)
static

Sets the LineEdit style configuration.

Parameters
settingsThe settings object to load the configuration from.
Returns
The new configuration of the LineEdit.

◆ setErrorIconEnabled()

static void AzQtComponents::LineEdit::setErrorIconEnabled ( QLineEdit *  lineEdit,
bool  enabled 
)
static

Sets whether an error icon and message should be displayed when the LineEdit is in an error state. Default value is true.

◆ setErrorMessage()

static void AzQtComponents::LineEdit::setErrorMessage ( QLineEdit *  lineEdit,
const QString &  error 
)
static

Sets the message to display in a tooltip if the QLineEdit validator detects an error.

◆ setExternalError()

static void AzQtComponents::LineEdit::setExternalError ( QLineEdit *  lineEdit,
bool  hasExternalError 
)
static

Set external error state. The global error state is calculated by an OR operation between external error state, validator and inputMask.


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