src/versionEditor.h

Sun, 08 Sep 2013 21:58:54 +0300

author
Teemu Piippo <crimsondusk64@gmail.com>
date
Sun, 08 Sep 2013 21:58:54 +0300
changeset 29
251b121ab6c0
parent 25
256bb5c6b77f
child 30
6b82f6a3ad53
permissions
-rw-r--r--

added missing UI file

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

mercurial