QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
QgsHighlightableLineEdit Class Reference

A QgsFilterLineEdit subclass with the ability to "highlight" the edges of the widget. More...

#include <qgshighlightablelineedit.h>

Inheritance diagram for QgsHighlightableLineEdit:
Inheritance graph
[legend]

Public Member Functions

 QgsHighlightableLineEdit (QWidget *parent=nullptr)
 Constructor for QgsHighlightableLineEdit, with the specified parent widget.
 
bool isHighlighted () const
 Returns true if the line edit is currently highlighted.
 
void setHighlighted (bool highlighted)
 Sets whether the line edit is currently highlighted.
 
- Public Member Functions inherited from QgsFilterLineEdit
 QgsFilterLineEdit (QWidget *parent=nullptr, const QString &nullValue=QString())
 Constructor for QgsFilterLineEdit.
 
ClearMode clearMode () const
 Returns the clear mode for the widget.
 
QString defaultValue () const
 Returns the default value for the widget.
 
bool event (QEvent *event) override
 Reimplemented to enable/disable the clear action depending on read-only status.
 
bool hasStateStored () const
 Returns if a state is already saved.
 
bool isNull () const
 Determine if the current text represents null.
 
QString nullValue () const
 Returns the string used for representing null values in the widget.
 
bool selectOnFocus () const
 Will select all text when this widget receives the focus.
 
void setClearMode (ClearMode mode)
 Sets the clear mode for the widget.
 
void setDefaultValue (const QString &defaultValue)
 Sets the default value for the widget.
 
void setNullValue (const QString &nullValue)
 Sets the string representation for null values in the widget.
 
void setSelectOnFocus (bool selectOnFocus)
 Will select all text when this widget receives the focus.
 
void setShowClearButton (bool visible)
 Sets whether the widget's clear button is visible.
 
void setShowSearchIcon (bool visible)
 Define if a search icon shall be shown on the left of the image when no text is entered.
 
void setShowSpinner (bool showSpinner)
 Show a spinner icon.
 
void setValue (const QString &value)
 Sets the current text for the widget with support for handling null values.
 
bool showClearButton () const
 Returns true if the widget's clear button is visible.
 
bool showSearchIcon () const
 Returns if a search icon shall be shown on the left of the image when no text is entered.
 
bool showSpinner () const
 Show a spinner icon.
 
QString value () const
 Returns the text of this edit with support for handling null values.
 

Protected Member Functions

void paintEvent (QPaintEvent *e) override
 
- Protected Member Functions inherited from QgsFilterLineEdit
void focusInEvent (QFocusEvent *e) override
 
void mouseReleaseEvent (QMouseEvent *e) override
 

Additional Inherited Members

- Public Types inherited from QgsFilterLineEdit
enum  ClearMode { ClearToNull = 0 , ClearToDefault }
 Behavior when clearing value of widget. More...
 
- Public Slots inherited from QgsFilterLineEdit
virtual void clearValue ()
 Clears the widget and resets it to the null value.
 
void restoreState ()
 Restores the current state of the line edit (selection and cursor position)
 
void storeState ()
 Stores the current state of the line edit (selection and cursor position)
 
- Signals inherited from QgsFilterLineEdit
void cleared ()
 Emitted when the widget is cleared.
 
void selectOnFocusChanged ()
 Will select all text when this widget receives the focus.
 
void showSpinnerChanged ()
 Show a spinner icon.
 
void valueChanged (const QString &value)
 Same as textChanged() but with support for null values.
 
- Properties inherited from QgsFilterLineEdit
ClearMode clearMode
 
QString defaultValue
 
QString nullValue
 
bool showClearButton
 
bool showSearchIcon
 
bool showSpinner
 
QString value
 

Detailed Description

A QgsFilterLineEdit subclass with the ability to "highlight" the edges of the widget.

Since
QGIS 3.14

Definition at line 33 of file qgshighlightablelineedit.h.

Constructor & Destructor Documentation

◆ QgsHighlightableLineEdit()

QgsHighlightableLineEdit::QgsHighlightableLineEdit ( QWidget *  parent = nullptr)

Constructor for QgsHighlightableLineEdit, with the specified parent widget.

Definition at line 21 of file qgshighlightablelineedit.cpp.

Member Function Documentation

◆ isHighlighted()

bool QgsHighlightableLineEdit::isHighlighted ( ) const
inline

Returns true if the line edit is currently highlighted.

See also
setHighlighted()

Definition at line 48 of file qgshighlightablelineedit.h.

◆ paintEvent()

void QgsHighlightableLineEdit::paintEvent ( QPaintEvent *  e)
overrideprotected

Definition at line 25 of file qgshighlightablelineedit.cpp.

◆ setHighlighted()

void QgsHighlightableLineEdit::setHighlighted ( bool  highlighted)

Sets whether the line edit is currently highlighted.

See also
isHighlighted()

Definition at line 38 of file qgshighlightablelineedit.cpp.


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