Gui::Dialog::DlgCheckableMessageBox Class Reference

#include <DlgCheckableMessageBox.h>

Public Member Functions

virtual void accept ()
 
QString checkBoxText () const
 
QAbstractButton * clickedButton () const
 
QDialogButtonBox::StandardButton clickedStandardButton () const
 
QDialogButtonBox::StandardButton defaultButton () const
 
 DlgCheckableMessageBox (QWidget *parent)
 
QPixmap iconPixmap () const
 
bool isChecked () const
 
virtual void reject ()
 
void setCheckBoxText (const QString &)
 
void setChecked (bool s)
 
void setDefaultButton (QDialogButtonBox::StandardButton s)
 
void setIconPixmap (const QPixmap &p)
 
void setPrefEntry (const QString &entry)
 
void setPrefPath (const QString &path)
 
void setStandardButtons (QDialogButtonBox::StandardButtons s)
 
void setText (const QString &)
 
QDialogButtonBox::StandardButtons standardButtons () const
 
QString text () const
 
virtual ~DlgCheckableMessageBox ()
 

Static Public Member Functions

static QMessageBox::StandardButton dialogButtonBoxToMessageBoxButton (QDialogButtonBox::StandardButton)
 
static QDialogButtonBox::StandardButton question (QWidget *parent, const QString &title, const QString &question, const QString &checkBoxText, bool *checkBoxSetting, QDialogButtonBox::StandardButtons buttons=QDialogButtonBox::Yes|QDialogButtonBox::No, QDialogButtonBox::StandardButton defaultButton=QDialogButtonBox::No)
 
static void showMessage (const QString &header, const QString &message, bool check=false, const QString &checkText=QString::fromLatin1("Don't show me again"))
 convenient show method It shows a dialog with header and message provided and a checkbox in check state with the message provided. More...
 
static void showMessage (const QString &header, const QString &message, const QString &prefPath, const QString &paramEntry, bool entryDefault=false, bool check=false, const QString &checkText=QString::fromLatin1("Don't show me again"))
 Same as showMessage above, but it checks the specific preference path and parameter provided, defaulting to entryDefault value if the parameter is not present. More...
 

Properties

QDialogButtonBox::StandardButtons buttons
 
QString checkBoxText
 
QDialogButtonBox::StandardButton defaultButton
 
QPixmap iconPixmap
 
bool isChecked
 
QString text
 

Constructor & Destructor Documentation

◆ DlgCheckableMessageBox()

◆ ~DlgCheckableMessageBox()

Gui::Dialog::DlgCheckableMessageBox::~DlgCheckableMessageBox ( )
virtual

Member Function Documentation

◆ accept()

◆ checkBoxText()

QString Gui::Dialog::DlgCheckableMessageBox::checkBoxText ( ) const

◆ clickedButton()

QAbstractButton * Gui::Dialog::DlgCheckableMessageBox::clickedButton ( ) const

◆ clickedStandardButton()

QDialogButtonBox::StandardButton Gui::Dialog::DlgCheckableMessageBox::clickedStandardButton ( ) const

◆ defaultButton()

QDialogButtonBox::StandardButton Gui::Dialog::DlgCheckableMessageBox::defaultButton ( ) const

◆ dialogButtonBoxToMessageBoxButton()

QMessageBox::StandardButton Gui::Dialog::DlgCheckableMessageBox::dialogButtonBoxToMessageBoxButton ( QDialogButtonBox::StandardButton  db)
static

◆ iconPixmap()

QPixmap Gui::Dialog::DlgCheckableMessageBox::iconPixmap ( ) const

◆ isChecked()

bool Gui::Dialog::DlgCheckableMessageBox::isChecked ( ) const

◆ question()

QDialogButtonBox::StandardButton Gui::Dialog::DlgCheckableMessageBox::question ( QWidget parent,
const QString &  title,
const QString &  question,
const QString &  checkBoxText,
bool checkBoxSetting,
QDialogButtonBox::StandardButtons  buttons = QDialogButtonBox::Yes|QDialogButtonBox::No,
QDialogButtonBox::StandardButton  defaultButton = QDialogButtonBox::No 
)
static

◆ reject()

◆ setCheckBoxText()

void Gui::Dialog::DlgCheckableMessageBox::setCheckBoxText ( const QString &  t)

◆ setChecked()

void Gui::Dialog::DlgCheckableMessageBox::setChecked ( bool  s)

◆ setDefaultButton()

void Gui::Dialog::DlgCheckableMessageBox::setDefaultButton ( QDialogButtonBox::StandardButton  s)

◆ setIconPixmap()

void Gui::Dialog::DlgCheckableMessageBox::setIconPixmap ( const QPixmap &  p)

◆ setPrefEntry()

void Gui::Dialog::DlgCheckableMessageBox::setPrefEntry ( const QString &  entry)

◆ setPrefPath()

void Gui::Dialog::DlgCheckableMessageBox::setPrefPath ( const QString &  path)

◆ setStandardButtons()

void Gui::Dialog::DlgCheckableMessageBox::setStandardButtons ( QDialogButtonBox::StandardButtons  s)

◆ setText()

void Gui::Dialog::DlgCheckableMessageBox::setText ( const QString &  t)

◆ showMessage() [1/2]

void Gui::Dialog::DlgCheckableMessageBox::showMessage ( const QString &  header,
const QString &  message,
bool  check = false,
const QString &  checkText = QString::fromLatin1("Don't show me again") 
)
static

convenient show method It shows a dialog with header and message provided and a checkbox in check state with the message provided.

It uses a parameter in path "User parameter:BaseApp/CheckMessages" derived from the header test, defaulting to false, to store the status of the checkbox, when the user exits the modal dialog.

References DlgCheckableMessageBox(), App::GetApplication(), ParameterGrp::GetBool(), Gui::getMainWindow(), App::Application::GetParameterGroupByPath(), setCheckBoxText(), setChecked(), setDefaultButton(), setIconPixmap(), setPrefEntry(), setStandardButtons(), setText(), and Gui::Dialog::toParamEntry().

Referenced by SketcherGui::notifyConstraintSubstitutions(), and Gui::Dialog::DocumentRecovery::on_buttonCleanup_clicked().

◆ showMessage() [2/2]

void Gui::Dialog::DlgCheckableMessageBox::showMessage ( const QString &  header,
const QString &  message,
const QString &  prefPath,
const QString &  paramEntry,
bool  entryDefault = false,
bool  check = false,
const QString &  checkText = QString::fromLatin1("Don't show me again") 
)
static

Same as showMessage above, but it checks the specific preference path and parameter provided, defaulting to entryDefault value if the parameter is not present.

References App::GetApplication(), ParameterGrp::GetBool(), Gui::getMainWindow(), and App::Application::GetParameterGroupByPath().

◆ standardButtons()

QDialogButtonBox::StandardButtons Gui::Dialog::DlgCheckableMessageBox::standardButtons ( ) const

◆ text()

Property Documentation

◆ buttons

QDialogButtonBox::StandardButtons Gui::Dialog::DlgCheckableMessageBox::buttons
readwrite

◆ checkBoxText

QString Gui::Dialog::DlgCheckableMessageBox::checkBoxText
readwrite

Referenced by question().

◆ defaultButton

QDialogButtonBox::StandardButton Gui::Dialog::DlgCheckableMessageBox::defaultButton
readwrite

Referenced by question().

◆ iconPixmap

QPixmap Gui::Dialog::DlgCheckableMessageBox::iconPixmap
readwrite

◆ isChecked

bool Gui::Dialog::DlgCheckableMessageBox::isChecked
readwrite

Referenced by accept(), question(), and reject().

◆ text


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