-
Notifications
You must be signed in to change notification settings - Fork 17
/
ActionChooseDialog.h
44 lines (34 loc) · 993 Bytes
/
ActionChooseDialog.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
/* This file is part of TSRE5.
*
* TSRE5 - train sim game engine and MSTS/OR Editors.
* Copyright (C) 2016 Piotr Gadecki <[email protected]>
*
* Licensed under GNU General Public License 3.0 or later.
*
* See LICENSE.md or https://www.gnu.org/licenses/gpl.html
*/
#ifndef ACTIONCHOOSEDIALOG_H
#define ACTIONCHOOSEDIALOG_H
#include <QtWidgets>
#include <QHash>
class ActionChooseDialog : public QDialog {
Q_OBJECT
public:
QString actionChoosen;
ActionChooseDialog();
ActionChooseDialog(int buttonCount);
virtual ~ActionChooseDialog();
//void setTitle();
void setInfoText(QString text);
void pushAction(QString action, QString text);
public slots:
void action(int i);
private:
QHash<int, QString> actions;
QHash<int, QPushButton*> bok;
QLabel infoLabel;
QSignalMapper mapper;
int buttonSize = 10;
int count = 0;
};
#endif /* ACTIONCHOOSEDIALOG_H */