Wireshark  2.9.0-477-g68ec514b
The Wireshark network protocol analyzer
simple_dialog.h
1 /* simple_dialog.h
2  *
3  * Wireshark - Network traffic analyzer
4  * By Gerald Combs <gerald@wireshark.org>
5  * Copyright 1998 Gerald Combs
6  *
7  * SPDX-License-Identifier: GPL-2.0-or-later
8  */
9 
10 #ifndef SIMPLE_DIALOG_H
11 #define SIMPLE_DIALOG_H
12 
13 #include <config.h>
14 
15 #include <stdio.h>
16 
17 #include <glib.h>
18 
19 #include "ui/simple_dialog.h"
20 
21 #include <QPair>
22 #include <QString>
23 
24 typedef QPair<QString,QString> MessagePair;
25 
26 class QCheckBox;
27 class QMessageBox;
28 class QWidget;
29 
30 // This might be constructed before Qt is initialized and must be a plain, non-Qt object.
32 {
33 public:
34  explicit SimpleDialog(QWidget *parent, ESD_TYPE_E type, int btn_mask, const char *msg_format, va_list ap);
35  ~SimpleDialog();
36 
37  static void displayQueuedMessages(QWidget *parent = 0);
38  void setDetailedText(QString text) { detailed_text_ = text; }
39  void setCheckBox(QCheckBox *cb) { check_box_ = cb; }
40  int exec();
41 
42 private:
43  const MessagePair splitMessage(QString &message) const;
44  QString detailed_text_;
45  QCheckBox *check_box_;
46  QMessageBox *message_box_;
47 };
48 
49 #endif // SIMPLE_DIALOG_H
50 
51 /*
52  * Editor modelines
53  *
54  * Local Variables:
55  * c-basic-offset: 4
56  * tab-width: 8
57  * indent-tabs-mode: nil
58  * End:
59  *
60  * ex: set shiftwidth=4 tabstop=8 expandtab:
61  * :indentSize=4:tabSize=8:noTabs=true:
62  */
ESD_TYPE_E
Definition: simple_dialog.h:26
Definition: simple_dialog.h:31