Maki
Formally verfied low-code orchestration
Loading...
Searching...
No Matches
maki::SearchWidget Class Reference

A widget providing a search input field with an icon and dismiss support. More...

#include <widget_factory.h>

Inheritance diagram for maki::SearchWidget:

Signals

void valueChanged (const QString &value)
 Emitted when the search text changes.
void dismissed ()
 Emitted when the search widget is dismissed or cleared by the user.

Public Member Functions

 SearchWidget (const QString &placeholder, QWidget *parent)
 Constructs a search widget.
void addDescription (const QString &label)
 Adds a descriptive label or help text to the widget.
void setValue (const QString &value)
 Sets the current search text.
QString getValue () const
 Returns the current search text.
QLineEdit * widget () const
 Returns the underlying line edit used for text input.

Private Attributes

QLineEdit * mInputField
 Line edit used to enter the search text.
QLabel * mIcon
 Label displaying the search icon.
QString mValue
 Cached search text.

Detailed Description

A widget providing a search input field with an icon and dismiss support.

Constructor & Destructor Documentation

◆ SearchWidget()

maki::SearchWidget::SearchWidget ( const QString & placeholder,
QWidget * parent )

Constructs a search widget.

Parameters
placeholderThe placeholder text shown in the search field.
parentThe parent widget.

Member Function Documentation

◆ addDescription()

void maki::SearchWidget::addDescription ( const QString & label)

Adds a descriptive label or help text to the widget.

Parameters
labelThe description text.

◆ getValue()

QString maki::SearchWidget::getValue ( ) const

Returns the current search text.

Returns
The current value.

◆ setValue()

void maki::SearchWidget::setValue ( const QString & value)

Sets the current search text.

Parameters
valueThe text to set.

◆ valueChanged

void maki::SearchWidget::valueChanged ( const QString & value)
signal

Emitted when the search text changes.

Parameters
valueThe new search text.

◆ widget()

QLineEdit * maki::SearchWidget::widget ( ) const

Returns the underlying line edit used for text input.

Returns
The line edit widget.

The documentation for this class was generated from the following files:
  • /__w/maki/maki/app/widgets/widget_factory.h
  • /__w/maki/maki/app/widgets/widget_factory.cpp