Theme Editor: Began integrating device configuration panel with renderer
[kugel-rb.git] / utils / themeeditor / gui / devicestate.h
blobcae3cef7e1e0530195cb59959a08a171e0c31b3a
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2010 Robert Bieber
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.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
22 #ifndef DEVICESTATE_H
23 #define DEVICESTATE_H
25 #include <QWidget>
26 #include <QMap>
27 #include <QPair>
28 #include <QVariant>
29 #include <QTabWidget>
31 class DeviceState : public QWidget {
33 Q_OBJECT
35 public:
36 enum InputType
38 Text,
39 Slide,
40 Spin,
41 DSpin,
42 Combo,
43 Check
46 DeviceState(QWidget *parent = 0);
47 virtual ~DeviceState();
49 QVariant data(QString tag);
50 void setData(QString tag, QVariant data);
52 signals:
53 void settingsChanged();
55 private slots:
56 void input();
58 private:
59 QMap<QString, QPair<InputType, QWidget*> > inputs;
60 QTabWidget tabs;
63 #endif // DEVICESTATE_H