summaryrefslogtreecommitdiff
path: root/utils/themeeditor/configdocument.h
diff options
context:
space:
mode:
authorRobert Bieber <robby@bieberphoto.com>2010-06-15 06:54:58 +0000
committerRobert Bieber <robby@bieberphoto.com>2010-06-15 06:54:58 +0000
commit2e320f66f4f3c831dcfd232b33da0e6ab6dd7dd0 (patch)
treea6ef8001d797213e9dd81cd41c48f5065c33f3f0 /utils/themeeditor/configdocument.h
parent1d4dc9b3b0f094a70463395138fc920e5107eabc (diff)
downloadrockbox-2e320f66f4f3c831dcfd232b33da0e6ab6dd7dd0.tar.gz
rockbox-2e320f66f4f3c831dcfd232b33da0e6ab6dd7dd0.zip
Theme Editor: Changed color to colour in preferences. Made parse tree viewer alternate line colors and auto-scroll/expand with cursor in editor window. Implemented TabContent abstract class so that more than just skin documents can be loaded in tabs. Made SkinDocument implement TabContent. Began implementing ConfigDocument for editing configuration files.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26851 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/configdocument.h')
-rw-r--r--utils/themeeditor/configdocument.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/utils/themeeditor/configdocument.h b/utils/themeeditor/configdocument.h
new file mode 100644
index 0000000000..2f4c2501a1
--- /dev/null
+++ b/utils/themeeditor/configdocument.h
@@ -0,0 +1,54 @@
1#ifndef CONFIGDOCUMENT_H
2#define CONFIGDOCUMENT_H
3
4#include <QHBoxLayout>
5#include <QLineEdit>
6#include <QPushButton>
7#include <QWidget>
8#include <QMap>
9
10#include "tabcontent.h"
11
12namespace Ui {
13 class ConfigDocument;
14}
15
16class ConfigDocument : public TabContent {
17 Q_OBJECT
18public:
19 ConfigDocument(QMap<QString, QString>& settings, QString file,
20 QWidget *parent = 0);
21 virtual ~ConfigDocument();
22
23 TabType type() const{ return TabContent::Config; }
24 QString file() const{ return filePath; }
25 QString title() const;
26
27 QString toPlainText() const;
28
29 void save();
30 void saveAs();
31
32 bool requestClose();
33
34protected:
35 void changeEvent(QEvent *e);
36
37private:
38 Ui::ConfigDocument *ui;
39 QList<QHBoxLayout*> containers;
40 QList<QLineEdit*> keys;
41 QList<QLineEdit*> values;
42 QList<QPushButton*> deleteButtons;
43
44 QString filePath;
45 QString saved;
46
47 void addRow(QString key, QString value);
48
49private slots:
50 void deleteClicked();
51 void addClicked();
52};
53
54#endif // CONFIGDOCUMENT_H