2010-06-23 20:46:43 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* __________ __ ___.
|
|
|
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
* \/ \/ \/ \/ \/
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
* Copyright (C) 2010 Robert Bieber
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#ifndef DEVICESTATE_H
|
|
|
|
#define DEVICESTATE_H
|
|
|
|
|
|
|
|
#include <QWidget>
|
2010-06-24 07:59:41 +00:00
|
|
|
#include <QMap>
|
|
|
|
#include <QPair>
|
|
|
|
#include <QVariant>
|
|
|
|
#include <QTabWidget>
|
2010-06-23 20:46:43 +00:00
|
|
|
|
|
|
|
class DeviceState : public QWidget {
|
2010-06-24 07:59:41 +00:00
|
|
|
|
2010-06-23 20:46:43 +00:00
|
|
|
Q_OBJECT
|
2010-06-24 07:59:41 +00:00
|
|
|
|
2010-06-23 20:46:43 +00:00
|
|
|
public:
|
2010-06-24 07:59:41 +00:00
|
|
|
enum InputType
|
|
|
|
{
|
|
|
|
Text,
|
|
|
|
Slide,
|
|
|
|
Spin,
|
|
|
|
DSpin,
|
|
|
|
Combo,
|
|
|
|
Check
|
|
|
|
};
|
|
|
|
|
2010-06-23 20:46:43 +00:00
|
|
|
DeviceState(QWidget *parent = 0);
|
|
|
|
virtual ~DeviceState();
|
|
|
|
|
2010-06-24 07:59:41 +00:00
|
|
|
QVariant data(QString tag);
|
|
|
|
|
2010-06-23 20:46:43 +00:00
|
|
|
private:
|
2010-06-24 07:59:41 +00:00
|
|
|
QMap<QString, QPair<InputType, QWidget*> > inputs;
|
|
|
|
QTabWidget tabs;
|
2010-06-23 20:46:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // DEVICESTATE_H
|