|
The TipDialog is a dialog to show tips/hints to the user, which are optionally only shown once. More...
#include <ArmarXGui/libraries/ArmarXGuiBase/widgets/TipDialog.h>
Public Member Functions | |
QStringList | getBlackListedStrings () const |
Returns all currently blacklisted strings. More... | |
bool | isBlackListed (const QString &stringId) const |
Checks whether a specific string is blacklisted. More... | |
void | setBlackListedStrings (const QStringList &strings) |
Sets list of blacklisted strings. More... | |
void | showMessage (const QString &tipText, const QString &windowTitle, const QString &stringIdentifier="") |
Shows this dialog and shows the message, if it was not blacklisted. More... | |
TipDialog (QWidget *parent=0) | |
~TipDialog () override | |
Protected Member Functions | |
void | hideEvent (QHideEvent *) override |
The TipDialog is a dialog to show tips/hints to the user, which are optionally only shown once.
This dialog contains a textfield in which the developer can show a tip to the user. It also contains a checkbox "Do not show again", which upon selection puts the shown string into a blacklist of messages, which are not shown again.
To show the dialog use the function showMessage(). The dialog should only be created once and passed around or the blacklist must be passed on each creation to the dialog via setBlackListedStrings().
Definition at line 47 of file TipDialog.h.
|
explicit |
Definition at line 32 of file TipDialog.cpp.
|
override |
Definition at line 39 of file TipDialog.cpp.
QStringList getBlackListedStrings | ( | ) | const |
Returns all currently blacklisted strings.
Definition at line 64 of file TipDialog.cpp.
|
overrideprotected |
Definition at line 79 of file TipDialog.cpp.
bool isBlackListed | ( | const QString & | stringId | ) | const |
Checks whether a specific string is blacklisted.
stringId | String to check |
Definition at line 74 of file TipDialog.cpp.
void setBlackListedStrings | ( | const QStringList & | strings | ) |
Sets list of blacklisted strings.
Pass empty list to clear. All previously set strings are forgotten.
Definition at line 69 of file TipDialog.cpp.
void showMessage | ( | const QString & | tipText, |
const QString & | windowTitle, | ||
const QString & | stringIdentifier = "" |
||
) |
Shows this dialog and shows the message, if it was not blacklisted.
If the message was blacklisted, nothing happens.
tipText | Text that should be shown in the dialog. If stringIdentifier is empty, this string is used for blacklisting the message. |
windowTitle | WindowTitle of the Dialog |
stringIdentifier | If not empty, this string is used for the blacklisting instead of the tiptext. |
Definition at line 44 of file TipDialog.cpp.