Debian Codegraph @

src/editor/trackpropertiesdialog.hpp

raw symbols SCIP
1 // This file is part of Dust Racing 2D.
2 // Copyright (C) 2012 Jussi Lind <[email protected]>
3 //
4 // Dust Racing 2D is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 // Dust Racing 2D is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 // GNU General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License
14 // along with Dust Racing 2D. If not, see <http://www.gnu.org/licenses/>.
15
16 #ifndef TRACKPROPERTIESDIALOG_HPP
17 #define TRACKPROPERTIESDIALOG_HPP
18
19 #include <QDialog>
20
21 class QGridLayout;
22 class QLabel;
23 class QLineEdit;
24 class QCheckBox;
25 class QPushButton;
26
27 /*! Dialog to set track properties */
28 class TrackPropertiesDialog : public QDialog
29 {
30 Q_OBJECT
31
32 public:
33 //! Constructor.
34 TrackPropertiesDialog(QString name, unsigned int index, bool isUserTrack, QWidget * parent = nullptr);
35
36 //! Get index.
37 unsigned int index() const;
38
39 //! Get name.
40 QString name() const;
41
42 //! Get user track property.
43 bool isUserTrack() const;
44
45 private:
46 QGridLayout * m_layout;
47 QPushButton * m_okButton;
48 QPushButton * m_cancelButton;
49 QLineEdit * m_nameEdit;
50 QLabel * m_nameLabel;
51 QLineEdit * m_indexEdit;
52 QLabel * m_indexLabel;
53 QCheckBox * m_isUserTrackCheckBox;
54 QLabel * m_isUserTrackLabel;
55 };
56
57 #endif // TRACKPROPERTIESDIALOG_HPP