TipDialog Class Reference

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>

+ Inheritance diagram for TipDialog:

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
 

Detailed Description

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().

See also
armarx::ArmarXWidgetController::getTipDialog, armarx::ArmarXMainWindow

Definition at line 47 of file TipDialog.h.

Constructor & Destructor Documentation

◆ TipDialog()

TipDialog ( QWidget *  parent = 0)
explicit

Definition at line 32 of file TipDialog.cpp.

◆ ~TipDialog()

~TipDialog ( )
override

Definition at line 39 of file TipDialog.cpp.

Member Function Documentation

◆ getBlackListedStrings()

QStringList getBlackListedStrings ( ) const

Returns all currently blacklisted strings.

Definition at line 64 of file TipDialog.cpp.

◆ hideEvent()

void hideEvent ( QHideEvent *  )
overrideprotected

Definition at line 79 of file TipDialog.cpp.

◆ isBlackListed()

bool isBlackListed ( const QString &  stringId) const

Checks whether a specific string is blacklisted.

Parameters
stringIdString to check
Returns
True if blacklisted.

Definition at line 74 of file TipDialog.cpp.

+ Here is the caller graph for this function:

◆ setBlackListedStrings()

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.

◆ showMessage()

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.

Parameters
tipTextText that should be shown in the dialog. If stringIdentifier is empty, this string is used for blacklisting the message.
windowTitleWindowTitle of the Dialog
stringIdentifierIf not empty, this string is used for the blacklisting instead of the tiptext.

Definition at line 44 of file TipDialog.cpp.

+ Here is the call graph for this function:

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