qTox
Version: nightly | Commit: bc751c8e1cac455f9690654fcfe0f560d2d7dfdd
|
Go to the documentation of this file.
27 class GUI :
public QObject
36 static void showInfo(
const QString& title,
const QString& msg);
37 static void showWarning(
const QString& title,
const QString& msg);
38 static void showError(
const QString& title,
const QString& msg);
39 static bool askQuestion(
const QString& title,
const QString& msg,
bool defaultAns =
false,
40 bool warning =
true,
bool yesno =
true);
42 static bool askQuestion(
const QString& title,
const QString& msg,
const QString& button1,
43 const QString& button2,
bool defaultAns =
false,
bool warning =
true);
47 explicit GUI(QObject* parent =
nullptr);
53 void _showInfo(
const QString& title,
const QString& msg);
54 void _showWarning(
const QString& title,
const QString& msg);
55 void _showError(
const QString& title,
const QString& msg);
56 bool _askQuestion(
const QString& title,
const QString& msg,
bool defaultAns =
false,
57 bool warning =
true,
bool yesno =
true);
58 bool _askQuestion(
const QString& title,
const QString& msg,
const QString& button1,
59 const QString& button2,
bool defaultAns =
false,
bool warning =
true);
static void setEnabled(bool state)
Will enable or disable the GUI.
void _showWarning(const QString &title, const QString &msg)
static bool askQuestion(const QString &title, const QString &msg, bool defaultAns=false, bool warning=true, bool yesno=true)
Asks the user a question with Ok/Cancel or Yes/No buttons.
bool _askQuestion(const QString &title, const QString &msg, bool defaultAns=false, bool warning=true, bool yesno=true)
Abstracts the GUI from the target backend (DesktopGUI, ...)
static void setWindowTitle(const QString &title)
Change the title of the main window.
static GUI & getInstance()
Returns the singleton instance.
void _showError(const QString &title, const QString &msg)
static void showInfo(const QString &title, const QString &msg)
Show some text to the user.
static QWidget * getMainWidget()
Get the main widget.
void _showInfo(const QString &title, const QString &msg)
static void reloadTheme()
Reloads the application theme and redraw the window.
static void showError(const QString &title, const QString &msg)
Show an error to the user.
static void showWarning(const QString &title, const QString &msg)
Show a warning to the user.
void _setEnabled(bool state)
void _setWindowTitle(const QString &title)
GUI(QObject *parent=nullptr)