Mon, 01 Jun 2015 17:06:13 +0300
Converted to CMake
30
6b82f6a3ad53
renamed the project to ZCinema
Teemu Piippo <crimsondusk64@gmail.com>
parents:
25
diff
changeset
|
1 | /* |
6b82f6a3ad53
renamed the project to ZCinema
Teemu Piippo <crimsondusk64@gmail.com>
parents:
25
diff
changeset
|
2 | * ZCinema: Zandronum demo launcher |
6b82f6a3ad53
renamed the project to ZCinema
Teemu Piippo <crimsondusk64@gmail.com>
parents:
25
diff
changeset
|
3 | * Copyright (C) 2013 Santeri Piippo |
6b82f6a3ad53
renamed the project to ZCinema
Teemu Piippo <crimsondusk64@gmail.com>
parents:
25
diff
changeset
|
4 | * |
6b82f6a3ad53
renamed the project to ZCinema
Teemu Piippo <crimsondusk64@gmail.com>
parents:
25
diff
changeset
|
5 | * This program is free software: you can redistribute it and/or modify |
6b82f6a3ad53
renamed the project to ZCinema
Teemu Piippo <crimsondusk64@gmail.com>
parents:
25
diff
changeset
|
6 | * it under the terms of the GNU General Public License as published by |
6b82f6a3ad53
renamed the project to ZCinema
Teemu Piippo <crimsondusk64@gmail.com>
parents:
25
diff
changeset
|
7 | * the Free Software Foundation, either version 3 of the License, or |
6b82f6a3ad53
renamed the project to ZCinema
Teemu Piippo <crimsondusk64@gmail.com>
parents:
25
diff
changeset
|
8 | * (at your option) any later version. |
6b82f6a3ad53
renamed the project to ZCinema
Teemu Piippo <crimsondusk64@gmail.com>
parents:
25
diff
changeset
|
9 | * |
6b82f6a3ad53
renamed the project to ZCinema
Teemu Piippo <crimsondusk64@gmail.com>
parents:
25
diff
changeset
|
10 | * This program is distributed in the hope that it will be useful, |
6b82f6a3ad53
renamed the project to ZCinema
Teemu Piippo <crimsondusk64@gmail.com>
parents:
25
diff
changeset
|
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
6b82f6a3ad53
renamed the project to ZCinema
Teemu Piippo <crimsondusk64@gmail.com>
parents:
25
diff
changeset
|
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
6b82f6a3ad53
renamed the project to ZCinema
Teemu Piippo <crimsondusk64@gmail.com>
parents:
25
diff
changeset
|
13 | * GNU General Public License for more details. |
6b82f6a3ad53
renamed the project to ZCinema
Teemu Piippo <crimsondusk64@gmail.com>
parents:
25
diff
changeset
|
14 | * |
6b82f6a3ad53
renamed the project to ZCinema
Teemu Piippo <crimsondusk64@gmail.com>
parents:
25
diff
changeset
|
15 | * You should have received a copy of the GNU General Public License |
6b82f6a3ad53
renamed the project to ZCinema
Teemu Piippo <crimsondusk64@gmail.com>
parents:
25
diff
changeset
|
16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
6b82f6a3ad53
renamed the project to ZCinema
Teemu Piippo <crimsondusk64@gmail.com>
parents:
25
diff
changeset
|
17 | */ |
6b82f6a3ad53
renamed the project to ZCinema
Teemu Piippo <crimsondusk64@gmail.com>
parents:
25
diff
changeset
|
18 | |
6b82f6a3ad53
renamed the project to ZCinema
Teemu Piippo <crimsondusk64@gmail.com>
parents:
25
diff
changeset
|
19 | #ifndef ZCINEMA_VERSIONEDITOR_H |
6b82f6a3ad53
renamed the project to ZCinema
Teemu Piippo <crimsondusk64@gmail.com>
parents:
25
diff
changeset
|
20 | #define ZCINEMA_VERSIONEDITOR_H |
25
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
21 | |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
22 | #include <QDialog> |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
23 | #include "types.h" |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
24 | |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
25 | class QCheckBox; |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
26 | class Ui_VersionEditor; |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
27 | class Ui_AddVersion; |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
28 | |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
29 | class VersionEditor : public QDialog { |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
30 | Q_OBJECT |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
31 | |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
32 | public: |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
33 | enum { |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
34 | NameColumn, |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
35 | ReleaseColumn, |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
36 | PathColumn |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
37 | }; |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
38 | |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
39 | explicit VersionEditor (QWidget* parent = 0, Qt::WindowFlags f = 0); |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
40 | virtual ~VersionEditor(); |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
41 | |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
42 | public slots: |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
43 | void add(); |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
44 | void edit(); |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
45 | void remove(); |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
46 | void clear(); |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
47 | void saveChanges(); |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
48 | void selectionChanged (int row); |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
49 | |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
50 | private: |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
51 | Ui_VersionEditor* m_ui; |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
52 | |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
53 | void initVersions(); |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
54 | void addVersion (str name, str path, bool isRelease); |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
55 | QCheckBox* getReleaseCheckbox (int i); |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
56 | }; |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
57 | |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
58 | class AddVersionPrompt : public QDialog { |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
59 | Q_OBJECT |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
60 | |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
61 | public: |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
62 | explicit AddVersionPrompt (QWidget* parent = 0, Qt::WindowFlags f = 0); |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
63 | virtual ~AddVersionPrompt(); |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
64 | |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
65 | public: |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
66 | str name(); |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
67 | str path(); |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
68 | bool release(); |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
69 | void setName (const str& a); |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
70 | void setPath (const str& a); |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
71 | void setRelease (bool a); |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
72 | |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
73 | public slots: |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
74 | void findPath(); |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
75 | void fieldsChanged(); |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
76 | |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
77 | private: |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
78 | Ui_AddVersion* m_ui; |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
79 | }; |
256bb5c6b77f
Added a version data editor
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
80 | |
30
6b82f6a3ad53
renamed the project to ZCinema
Teemu Piippo <crimsondusk64@gmail.com>
parents:
25
diff
changeset
|
81 | #endif // ZCINEMA_VERSIONEDITOR_H |