Albert
Loading...
Searching...
No Matches

Description

UI utility.

Classes

class  albert::OAuthConfigWidget
 Ready to use OAuth login widget. More...
 

Message boxes

bool albert::question (const QString &text, QWidget *parent=nullptr)
 Shows a question message box with Yes and No buttons.
 
void albert::information (const QString &text, QWidget *parent=nullptr)
 Shows an information message box with a single Ok button.
 
void albert::warning (const QString &text, QWidget *parent=nullptr)
 Shows a warning message box with a single Ok button.
 
void albert::critical (const QString &text, QWidget *parent=nullptr)
 Shows a critical message box with a single Ok button.
 

Property editor bindings

template<typename T , typename GET , typename SET >
void albert::bindWidget (QCheckBox *checkbox, T *object, GET get, SET set)
 Binds a property of type bool of object to checkbox.
 
template<typename T , typename GET , typename SET , typename SIG >
void albert::bindWidget (QCheckBox *checkbox, T *object, GET get, SET set, SIG sig)
 Binds a property of type bool of object to checkbox.
 
template<typename T , typename GET , typename SET >
void albert::bindWidget (QLineEdit *lineedit, T *object, GET get, SET set)
 Binds a property of type QString of object to lineedit.
 
template<typename T , typename GET , typename SET , typename SIG >
void albert::bindWidget (QLineEdit *lineedit, T *object, GET get, SET set, SIG sig)
 Binds a property of type QString of object to lineedit.
 
template<typename T , typename GET , typename SET >
void albert::bindWidget (QSpinBox *spinbox, T *object, GET get, SET set)
 Binds a property of type int of object to spinbox.
 
template<typename T , typename GET , typename SET , typename SIG >
void albert::bindWidget (QSpinBox *spinbox, T *object, GET get, SET set, SIG sig)
 Binds a property of type int of object to spinbox.
 
template<typename T , typename GET , typename SET >
void albert::bindWidget (QDoubleSpinBox *spinbox, T *object, GET get, SET set)
 Binds a property of type double of object to spinbox.
 
template<typename T , typename GET , typename SET , typename SIG >
void albert::bindWidget (QDoubleSpinBox *spinbox, T *object, GET get, SET set, SIG sig)
 Binds a property of type double of object to spinbox.
 

Function Documentation

◆ bindWidget() [1/8]

template<typename T , typename GET , typename SET >
void albert::bindWidget ( QCheckBox *  checkbox,
T *  object,
GET  get,
SET  set 
)

Binds a property of type bool of object to checkbox.

Initializes checkbox using get and connects the toggled signal to set.

◆ bindWidget() [2/8]

template<typename T , typename GET , typename SET , typename SIG >
void albert::bindWidget ( QCheckBox *  checkbox,
T *  object,
GET  get,
SET  set,
SIG  sig 
)

Binds a property of type bool of object to checkbox.

Initializes checkbox using get, connects the toggled signal to set and connects the signal sig to setChecked.

◆ bindWidget() [3/8]

template<typename T , typename GET , typename SET >
void albert::bindWidget ( QDoubleSpinBox *  spinbox,
T *  object,
GET  get,
SET  set 
)

Binds a property of type double of object to spinbox.

Initializes spinbox using get and connects the valueChanged signal to set.

◆ bindWidget() [4/8]

template<typename T , typename GET , typename SET , typename SIG >
void albert::bindWidget ( QDoubleSpinBox *  spinbox,
T *  object,
GET  get,
SET  set,
SIG  sig 
)

Binds a property of type double of object to spinbox.

Initializes spinbox using get, connects the valueChanged signal to set and connects the signal sig to setValue.

◆ bindWidget() [5/8]

template<typename T , typename GET , typename SET >
void albert::bindWidget ( QLineEdit *  lineedit,
T *  object,
GET  get,
SET  set 
)

Binds a property of type QString of object to lineedit.

Initializes lineedit using get and connects the editingFinished signal to set.

◆ bindWidget() [6/8]

template<typename T , typename GET , typename SET , typename SIG >
void albert::bindWidget ( QLineEdit *  lineedit,
T *  object,
GET  get,
SET  set,
SIG  sig 
)

Binds a property of type QString of object to lineedit.

Initializes lineedit using get, connects the editingFinished signal to set and connects the signal sig to setText.

◆ bindWidget() [7/8]

template<typename T , typename GET , typename SET >
void albert::bindWidget ( QSpinBox *  spinbox,
T *  object,
GET  get,
SET  set 
)

Binds a property of type int of object to spinbox.

Initializes spinbox using get and connects the valueChanged signal to set.

◆ bindWidget() [8/8]

template<typename T , typename GET , typename SET , typename SIG >
void albert::bindWidget ( QSpinBox *  spinbox,
T *  object,
GET  get,
SET  set,
SIG  sig 
)

Binds a property of type int of object to spinbox.

Initializes spinbox using get, connects the valueChanged signal to set and connects the signal sig to setValue.

◆ critical()

void albert::critical ( const QString &  text,
QWidget *  parent = nullptr 
)

Shows a critical message box with a single Ok button.

The title of the message box is set to the application name and the message to text. The message box will appear modal to parent or the main window if undefined.

◆ information()

void albert::information ( const QString &  text,
QWidget *  parent = nullptr 
)

Shows an information message box with a single Ok button.

The title of the message box is set to the application name and the message to text. The message box will appear modal to parent or the main window if undefined.

◆ question()

bool albert::question ( const QString &  text,
QWidget *  parent = nullptr 
)

Shows a question message box with Yes and No buttons.

The title of the message box is set to the application name and the message to text. The message box will appear modal to parent or the main window if undefined. Returns true if the user pressed yes, false otherwise.

◆ warning()

void albert::warning ( const QString &  text,
QWidget *  parent = nullptr 
)

Shows a warning message box with a single Ok button.

The title of the message box is set to the application name and the message to text. The message box will appear modal to parent or the main window if undefined.