|
1 #ifndef ZANDEMO_VERSIONEDITOR_H |
|
2 #define ZANDEMO_VERSIONEDITOR_H |
|
3 |
|
4 #include <QDialog> |
|
5 #include "types.h" |
|
6 |
|
7 class QCheckBox; |
|
8 class Ui_VersionEditor; |
|
9 class Ui_AddVersion; |
|
10 |
|
11 class VersionEditor : public QDialog { |
|
12 Q_OBJECT |
|
13 |
|
14 public: |
|
15 enum { |
|
16 NameColumn, |
|
17 ReleaseColumn, |
|
18 PathColumn |
|
19 }; |
|
20 |
|
21 explicit VersionEditor (QWidget* parent = 0, Qt::WindowFlags f = 0); |
|
22 virtual ~VersionEditor(); |
|
23 |
|
24 public slots: |
|
25 void add(); |
|
26 void edit(); |
|
27 void remove(); |
|
28 void clear(); |
|
29 void saveChanges(); |
|
30 void selectionChanged (int row); |
|
31 |
|
32 private: |
|
33 Ui_VersionEditor* m_ui; |
|
34 |
|
35 void initVersions(); |
|
36 void addVersion (str name, str path, bool isRelease); |
|
37 QCheckBox* getReleaseCheckbox (int i); |
|
38 }; |
|
39 |
|
40 class AddVersionPrompt : public QDialog { |
|
41 Q_OBJECT |
|
42 |
|
43 public: |
|
44 explicit AddVersionPrompt (QWidget* parent = 0, Qt::WindowFlags f = 0); |
|
45 virtual ~AddVersionPrompt(); |
|
46 |
|
47 public: |
|
48 str name(); |
|
49 str path(); |
|
50 bool release(); |
|
51 void setName (const str& a); |
|
52 void setPath (const str& a); |
|
53 void setRelease (bool a); |
|
54 |
|
55 public slots: |
|
56 void findPath(); |
|
57 void fieldsChanged(); |
|
58 |
|
59 private: |
|
60 Ui_AddVersion* m_ui; |
|
61 }; |
|
62 |
|
63 #endif // ZANDEMO_VERSIONEDITOR_H |