OpenWalnut  1.5.0dev
Public Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
WQtMessageDialog Class Reference

General purpose message dialog, able to show arbitrary content. More...

#include <WQtMessageDialog.h>

+ Inheritance diagram for WQtMessageDialog:
+ Collaboration diagram for WQtMessageDialog:

Public Member Functions

 WQtMessageDialog (QString msgID, QString title, QWidget *content, QSettings &settings, QWidget *parent)
 Construct a message dialog. More...
 
virtual ~WQtMessageDialog ()
 Destructor. More...
 
virtual void show ()
 Shows the dialog if the user does not disabled it. More...
 
virtual void show (bool force)
 Force showing the dialog. More...
 

Private Slots

virtual void reject ()
 Dialog closed. More...
 
virtual void accept ()
 Dialog closed. More...
 

Private Member Functions

void handleClose ()
 Handles close and saves setting. More...
 

Private Attributes

QDialogButtonBox * m_buttonBox
 Dialog buttons. More...
 
QCheckBox * m_checkBox
 Do not show again - Checkbox. More...
 
QWidget * m_content
 The widget showing the content. More...
 
QString m_msgID
 The message ID. More...
 
QSettings & m_settings
 Settings object of the main window. More...
 

Detailed Description

General purpose message dialog, able to show arbitrary content.

It additionally allows the user to decide whether he wants to see this again or not.

Definition at line 39 of file WQtMessageDialog.h.

Constructor & Destructor Documentation

◆ WQtMessageDialog()

WQtMessageDialog::WQtMessageDialog ( QString  msgID,
QString  title,
QWidget *  content,
QSettings &  settings,
QWidget *  parent 
)

Construct a message dialog.

Parameters
msgIDthe id used to check whether to show the message or not.
titlethe title of the dialog
contentthe widget representing the content
settingsthe object storing the info about disabled messages
parentparent window

Definition at line 34 of file WQtMessageDialog.cpp.

References accept(), m_buttonBox, m_checkBox, m_content, and reject().

+ Here is the call graph for this function:

◆ ~WQtMessageDialog()

WQtMessageDialog::~WQtMessageDialog ( )
virtual

Destructor.

Definition at line 69 of file WQtMessageDialog.cpp.

Member Function Documentation

◆ accept

void WQtMessageDialog::accept ( )
privatevirtualslot

Dialog closed.

Definition at line 103 of file WQtMessageDialog.cpp.

References handleClose().

Referenced by WQtMessageDialog().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleClose()

void WQtMessageDialog::handleClose ( )
private

Handles close and saves setting.

Definition at line 109 of file WQtMessageDialog.cpp.

References m_checkBox, m_msgID, and m_settings.

Referenced by accept().

+ Here is the caller graph for this function:

◆ reject

void WQtMessageDialog::reject ( )
privatevirtualslot

Dialog closed.

Definition at line 98 of file WQtMessageDialog.cpp.

Referenced by WQtMessageDialog().

+ Here is the caller graph for this function:

◆ show() [1/2]

void WQtMessageDialog::show ( )
virtual

Shows the dialog if the user does not disabled it.

Definition at line 74 of file WQtMessageDialog.cpp.

Referenced by WMainWindow::handleGLVendor(), show(), and WMainWindow::showWelcomeDialog().

+ Here is the caller graph for this function:

◆ show() [2/2]

void WQtMessageDialog::show ( bool  force)
virtual

Force showing the dialog.

Parameters
forcetrue if forced to show (even if the user marked the do not show again flag).

Definition at line 79 of file WQtMessageDialog.cpp.

References m_checkBox, m_msgID, m_settings, and show().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_buttonBox

QDialogButtonBox* WQtMessageDialog::m_buttonBox
private

Dialog buttons.

Definition at line 88 of file WQtMessageDialog.h.

Referenced by WQtMessageDialog().

◆ m_checkBox

QCheckBox* WQtMessageDialog::m_checkBox
private

Do not show again - Checkbox.

Definition at line 93 of file WQtMessageDialog.h.

Referenced by handleClose(), show(), and WQtMessageDialog().

◆ m_content

QWidget* WQtMessageDialog::m_content
private

The widget showing the content.

Definition at line 98 of file WQtMessageDialog.h.

Referenced by WQtMessageDialog().

◆ m_msgID

QString WQtMessageDialog::m_msgID
private

The message ID.

Definition at line 103 of file WQtMessageDialog.h.

Referenced by handleClose(), and show().

◆ m_settings

QSettings& WQtMessageDialog::m_settings
private

Settings object of the main window.

Definition at line 108 of file WQtMessageDialog.h.

Referenced by handleClose(), and show().


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