From 2e320f66f4f3c831dcfd232b33da0e6ab6dd7dd0 Mon Sep 17 00:00:00 2001 From: Robert Bieber Date: Tue, 15 Jun 2010 06:54:58 +0000 Subject: 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 --- utils/themeeditor/configdocument.h | 54 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 utils/themeeditor/configdocument.h (limited to 'utils/themeeditor/configdocument.h') 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 @@ +#ifndef CONFIGDOCUMENT_H +#define CONFIGDOCUMENT_H + +#include +#include +#include +#include +#include + +#include "tabcontent.h" + +namespace Ui { + class ConfigDocument; +} + +class ConfigDocument : public TabContent { + Q_OBJECT +public: + ConfigDocument(QMap& settings, QString file, + QWidget *parent = 0); + virtual ~ConfigDocument(); + + TabType type() const{ return TabContent::Config; } + QString file() const{ return filePath; } + QString title() const; + + QString toPlainText() const; + + void save(); + void saveAs(); + + bool requestClose(); + +protected: + void changeEvent(QEvent *e); + +private: + Ui::ConfigDocument *ui; + QList containers; + QList keys; + QList values; + QList deleteButtons; + + QString filePath; + QString saved; + + void addRow(QString key, QString value); + +private slots: + void deleteClicked(); + void addClicked(); +}; + +#endif // CONFIGDOCUMENT_H -- cgit v1.2.3