-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
exitdialog.h
70 lines (58 loc) · 1.5 KB
/
exitdialog.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#ifndef EXITDIALOG_H
#define EXITDIALOG_H
#include <QObject>
#include <QDialog>
#include <QPushButton>
#include <QLabel>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QWidget>
class ExitDialog : public QDialog
{
Q_OBJECT
public:
/**
* @brief ExitDialog : Creates an instance of an ExitDialog
* @param parent
*/
explicit ExitDialog(QDialog *parent = nullptr);
/**
* Base destructor.
*/
~ExitDialog();
private:
QLabel* title_label;
QPushButton* yes_button;
QPushButton* cancel_button;
QHBoxLayout *button_layout;
QVBoxLayout *label_and_buttons_layout;
protected:
/**
* @brief createSignalsAndSlots: Sets up connections for signals and slots within
* ExitDialog.
*/
void createSignalsAndSlots();
/**
* @brief layoutMembers: Performs all layout logic for the GUI display of ExitDialog.
*/
void layoutMembers();
signals:
/**
* @brief closeApplication: SIGNAL that emits when the user decides to exit the app.
*/
void closeApplication();
public slots:
/**
* @brief exitClicked: SLOT that will cause the ExitDialog to display when the "Exit" menu
* action or button is clicked.
*
* @param c: unused, just here to match the QAction signal "triggered(bool)"
*/
void exitClicked(bool c);
/**
* @brief okayClicked: SLOT that closes the ExitDialog and then emits a signal to close
* the application.
*/
void okayClicked();
};
#endif // EXITDIALOG_H