summaryrefslogtreecommitdiff
path: root/utils/themeeditor/gui/configdocument.h
diff options
context:
space:
mode:
authorRobert Bieber <robby@bieberphoto.com>2010-07-14 07:38:09 +0000
committerRobert Bieber <robby@bieberphoto.com>2010-07-14 07:38:09 +0000
commit4b457d688b9b9c5b4b15babf93c04b8d2db489a9 (patch)
treeb2a3fa35fa6ac46d2ccf25c8d0018fe5c93b722f /utils/themeeditor/gui/configdocument.h
parent895e104603d3f8337a8d6f64e4c72e7583eff808 (diff)
downloadrockbox-4b457d688b9b9c5b4b15babf93c04b8d2db489a9.tar.gz
rockbox-4b457d688b9b9c5b4b15babf93c04b8d2db489a9.zip
Theme Editor: Added optional plaintext editing for config files
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27415 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/gui/configdocument.h')
-rw-r--r--utils/themeeditor/gui/configdocument.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/utils/themeeditor/gui/configdocument.h b/utils/themeeditor/gui/configdocument.h
index e91c5cc357..29278dbd11 100644
--- a/utils/themeeditor/gui/configdocument.h
+++ b/utils/themeeditor/gui/configdocument.h
@@ -30,8 +30,10 @@
30#include <QLabel> 30#include <QLabel>
31#include <QMap> 31#include <QMap>
32#include <QWheelEvent> 32#include <QWheelEvent>
33#include <QTimer>
33 34
34#include "tabcontent.h" 35#include "tabcontent.h"
36#include "codeeditor.h"
35 37
36namespace Ui { 38namespace Ui {
37 class ConfigDocument; 39 class ConfigDocument;
@@ -58,6 +60,8 @@ public:
58 QString title() const; 60 QString title() const;
59 61
60 QString toPlainText() const; 62 QString toPlainText() const;
63 void syncFromBoxes();
64 void syncFromText();
61 65
62 void save(); 66 void save();
63 void saveAs(); 67 void saveAs();
@@ -73,9 +77,20 @@ signals:
73private slots: 77private slots:
74 void deleteClicked(); 78 void deleteClicked();
75 void addClicked(); 79 void addClicked();
80 void boxesChanged();
76 void textChanged(); 81 void textChanged();
82 void contentsChanged();
83 void blockUpdates()
84 {
85 block = true;
86 QTimer::singleShot(20, this, SLOT(unblockUpdates()));
87 }
88 void unblockUpdates(){ block = false; }
89 void buttonChecked();
77 90
78private: 91private:
92 void addRow(QString key, QString value);
93
79 Ui::ConfigDocument *ui; 94 Ui::ConfigDocument *ui;
80 QList<QHBoxLayout*> containers; 95 QList<QHBoxLayout*> containers;
81 QList<NoScrollCombo*> keys; 96 QList<NoScrollCombo*> keys;
@@ -89,7 +104,9 @@ private:
89 QString filePath; 104 QString filePath;
90 QString saved; 105 QString saved;
91 106
92 void addRow(QString key, QString value); 107 CodeEditor* editor;
108
109 bool block;
93}; 110};
94 111
95#endif // CONFIGDOCUMENT_H 112#endif // CONFIGDOCUMENT_H