src/config.h

changeset 20
a5457405cc9b
parent 15
3d3e5f0fc4cc
child 25
256bb5c6b77f
equal deleted inserted replaced
19:c9b6dd9dd4cd 20:a5457405cc9b
1 #ifndef CONFIG_H
2 #define CONFIG_H
3
4 /* 1 /*
5 * ZanDemo: Zandronum demo launcher 2 * ZanDemo: Zandronum demo launcher
6 * Copyright (C) 2013 Santeri Piippo 3 * Copyright (C) 2013 Santeri Piippo
7 * 4 *
8 * This program is free software: you can redistribute it and/or modify 5 * This program is free software: you can redistribute it and/or modify
17 * 14 *
18 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>. 16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 */ 17 */
21 18
19 #ifndef ZANDEMO_CONFIG_H
20 #define ZANDEMO_CONFIG_H
21
22 #include <QDialog> 22 #include <QDialog>
23 #include "main.h" 23 #include "main.h"
24 #include "types.h" 24 #include "types.h"
25 25
26 class QFormLayout;
26 class QNetworkReply; 27 class QNetworkReply;
27 class QHBoxLayout; 28 class QHBoxLayout;
28 class QLabel; 29 class QLabel;
29 class QAbstractButton; 30 class QAbstractButton;
30 class QLineEdit; 31 class QLineEdit;
33 34
34 class ConfigBox : public QDialog { 35 class ConfigBox : public QDialog {
35 Q_OBJECT 36 Q_OBJECT
36 37
37 public: 38 public:
38 explicit ConfigBox( QWidget* parent = null, Qt::WindowFlags f = 0 ); 39 explicit ConfigBox (QWidget* parent = null, Qt::WindowFlags f = 0);
39 virtual ~ConfigBox(); 40 virtual ~ConfigBox();
40 void addPath( str path ); 41 void addPath (str path);
41 void initFromSettings(); 42 void initFromSettings();
42 void saveSettings(); 43 void saveSettings();
43 void initVersions(); 44 void initVersions();
44 45
45 static str getBinaryPath (QWidget* parent); 46 static str getBinaryPath (QWidget* parent);
47 public slots: 48 public slots:
48 void addPath(); 49 void addPath();
49 void findPath(); 50 void findPath();
50 void delPath(); 51 void delPath();
51 void findZanBinary(); 52 void findZanBinary();
52 void buttonPressed( QAbstractButton* btn ); 53 void buttonPressed (QAbstractButton* btn);
53 54
54 private: 55 private:
55 Ui_ConfigBox* ui; 56 Ui_ConfigBox* ui;
56 list<QLineEdit*> m_zanBinaries; 57 list<QLineEdit*> m_zanBinaries;
58 QFormLayout* m_releaseLayout,
59 * m_testLayout;
60
61 void addVersion (const str& name, bool isRelease);
57 }; 62 };
58 63
59 #endif // CONFIG_H 64 #endif // ZANDEMO_CONFIG_H

mercurial