Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
simple_dialog.h
Go to the documentation of this file.
1
10#ifndef SIMPLE_DIALOG_H
11#define SIMPLE_DIALOG_H
12
13#include <config.h>
14
15#include <stdio.h>
16
17#include "ui/simple_dialog.h"
18
19#include <QPair>
20#include <QString>
21
22class QCheckBox;
23class QMessageBox;
24class QWidget;
25
34{
35public:
47 explicit SimpleDialog(QWidget *parent, ESD_TYPE_E type, int btn_mask,
48 const char *msg_format, va_list ap,
49 QString secondary_msg = QString());
50
55
64 static void displayQueuedMessages(QWidget *parent = 0);
65
70 static QString dontShowThisAgain();
71
76 void setInformativeText(QString text) { informative_text_ = text; }
77
82 void setDetailedText(QString text) { detailed_text_ = text; }
83
88 void setCheckBox(QCheckBox *cb) { check_box_ = cb; }
89
95 int exec();
96
100 void show();
101
102private:
103 QString informative_text_;
104 QString detailed_text_;
105 QCheckBox *check_box_;
106 QMessageBox *message_box_;
107};
108
109#endif // SIMPLE_DIALOG_H
Thin wrapper around QMessageBox that can be constructed before Qt is fully initialised,...
Definition simple_dialog.h:34
void setDetailedText(QString text)
Sets the detailed text shown in the expandable details area.
Definition simple_dialog.h:82
static QString dontShowThisAgain()
Returns the standard label text for a "Don't show this again" check box.
Definition simple_dialog.cpp:346
void show()
Shows the dialog modelessly (non-blocking).
Definition simple_dialog.cpp:384
int exec()
Shows the dialog modally and returns the result code of the button that was clicked.
Definition simple_dialog.cpp:351
~SimpleDialog()
Destroys the SimpleDialog and the underlying QMessageBox if one was created.
Definition simple_dialog.cpp:290
void setCheckBox(QCheckBox *cb)
Attaches a check box (e.g. "Don't show this again") to the dialog.
Definition simple_dialog.h:88
void setInformativeText(QString text)
Sets the informative (secondary) text shown below the main message.
Definition simple_dialog.h:76
static void displayQueuedMessages(QWidget *parent=0)
Displays any messages that were queued before Qt was initialised.
Definition simple_dialog.cpp:294
ESD_TYPE_E
Definition simple_dialog.h:31