summaryrefslogtreecommitdiff
path: root/utils/themeeditor/gui/configdocument.h
diff options
context:
space:
mode:
authorRobert Bieber <robby@bieberphoto.com>2010-06-17 05:37:01 +0000
committerRobert Bieber <robby@bieberphoto.com>2010-06-17 05:37:01 +0000
commitca564287ee3f48945d45c7d92be7a83452f53745 (patch)
treed6e502bb604f925240a742b3bac2c813a98c447b /utils/themeeditor/gui/configdocument.h
parentba07b2055c7eb8f2add96f55cb52b40b9ccb3d63 (diff)
downloadrockbox-ca564287ee3f48945d45c7d92be7a83452f53745.tar.gz
rockbox-ca564287ee3f48945d45c7d92be7a83452f53745.zip
Theme Editor: Moved source files into subdirectories
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26876 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/gui/configdocument.h')
-rw-r--r--utils/themeeditor/gui/configdocument.h86
1 files changed, 86 insertions, 0 deletions
diff --git a/utils/themeeditor/gui/configdocument.h b/utils/themeeditor/gui/configdocument.h
new file mode 100644
index 0000000000..8493c7a138
--- /dev/null
+++ b/utils/themeeditor/gui/configdocument.h
@@ -0,0 +1,86 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2010 Robert Bieber
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21
22#ifndef CONFIGDOCUMENT_H
23#define CONFIGDOCUMENT_H
24
25#include <QHBoxLayout>
26#include <QLineEdit>
27#include <QComboBox>
28#include <QPushButton>
29#include <QWidget>
30#include <QLabel>
31#include <QMap>
32
33#include "tabcontent.h"
34
35namespace Ui {
36 class ConfigDocument;
37}
38
39class ConfigDocument : public TabContent {
40 Q_OBJECT
41public:
42 ConfigDocument(QMap<QString, QString>& settings, QString file,
43 QWidget *parent = 0);
44 virtual ~ConfigDocument();
45
46 TabType type() const{ return TabContent::Config; }
47 QString file() const{ return filePath; }
48 QString title() const;
49
50 QString toPlainText() const;
51
52 void save();
53 void saveAs();
54
55 bool requestClose();
56
57protected:
58 void changeEvent(QEvent *e);
59
60signals:
61 void configFileChanged(QString);
62
63private slots:
64 void deleteClicked();
65 void addClicked();
66 void textChanged();
67
68
69private:
70 Ui::ConfigDocument *ui;
71 QList<QHBoxLayout*> containers;
72 QList<QComboBox*> keys;
73 QList<QLineEdit*> values;
74 QList<QPushButton*> deleteButtons;
75 QList<QLabel*> labels;
76
77 QStringList primaryKeys;
78 QStringList secondaryKeys;
79
80 QString filePath;
81 QString saved;
82
83 void addRow(QString key, QString value);
84};
85
86#endif // CONFIGDOCUMENT_H