summaryrefslogtreecommitdiff
path: root/utils/themeeditor/gui/configdocument.h
diff options
context:
space:
mode:
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