Walls And Holes  1
newmapdialog.h
Go to the documentation of this file.
1 #ifndef NEWMAPDIALOG_H
2 #define NEWMAPDIALOG_H
3 
4 #include "tilemap.h"
5 
6 #include <QDialog>
7 #include <QCheckBox>
8 #include <QSpinBox>
9 
10 struct NewMapData
11 {
12  int width;
13  int height;
15  bool hasCeiling;
16 
18 
19  NewMapData(int w, int h, bool indoor, bool ceiling)
20  : width(w)
21  , height(h)
22  , isIndoorMap(indoor)
23  , hasCeiling(ceiling) {}
24 };
25 
26 class NewMapDialog : public QDialog
27 {
28  Q_OBJECT
29 
30 public:
31  explicit NewMapDialog(QDialog *parent = nullptr);
32 
33  NewMapData result() const { return mResult; }
34 
35 private slots:
36  void onAccepted();
37 
38 private:
39  NewMapData mResult;
40 
41  //Spin Box
42  QSpinBox *mHSpinBox;
43  QSpinBox *mWSpinBox;
44 
45  //CheckBox
46  QCheckBox *mIndoorMapChkBox;
47  QCheckBox *mCeilingChkBox;
48 };
49 
50 #endif // NEWMAPDIALOG_H
int height
Definition: newmapdialog.h:13
bool hasCeiling
Definition: newmapdialog.h:15
Definition: newmapdialog.h:26
int width
Definition: newmapdialog.h:12
NewMapData()
Definition: newmapdialog.h:17
NewMapData(int w, int h, bool indoor, bool ceiling)
Definition: newmapdialog.h:19
NewMapDialog(QDialog *parent=nullptr)
Definition: newmapdialog.cpp:9
bool isIndoorMap
Definition: newmapdialog.h:14
Definition: newmapdialog.h:10
NewMapData result() const
Definition: newmapdialog.h:33