1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-10 06:39:49 +00:00
OpenMW/apps/opencs/view/settings/booleanview.hpp

45 lines
969 B
C++
Raw Normal View History

2014-04-23 03:17:19 +00:00
#ifndef CSVSETTINGS_BOOLEANVIEW_HPP
2014-04-26 14:40:58 +00:00
#define CSVSETTINGS_BOOLEANVIEW_HPP
2014-04-23 03:17:19 +00:00
#include <QWidget>
#include <QAbstractButton>
#include "view.hpp"
#include "../../model/settings/support.hpp"
class QStringListModel;
namespace CSVSettings
{
class BooleanView : public View
{
Q_OBJECT
QMap <QString, QAbstractButton *> mButtons;
public:
explicit BooleanView (CSMSettings::Setting *setting,
Page *parent);
protected:
void updateView (bool signalUpdate = true) const;
private slots:
void slotToggled (bool state);
};
class BooleanViewFactory : public QObject, public IViewFactory
{
Q_OBJECT
public:
explicit BooleanViewFactory (QWidget *parent = 0)
: QObject (parent)
{}
BooleanView *createView (CSMSettings::Setting *setting,
Page *parent);
};
}
#endif // CSVSETTINGS_BOOLEANVIEW_HPP