forked from teamnwah/openmw-tes3coop
45 lines
969 B
C++
45 lines
969 B
C++
|
#ifndef CSVSETTINGS_BOOLEANVIEW_HPP
|
||
|
#define CSVSETTINGS_BOOELANVIEW_HPP
|
||
|
|
||
|
#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
|