1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-11 00:39:59 +00:00
OpenMW/apps/opencs/model/prefs/setting.hpp

54 lines
1.1 KiB
C++
Raw Normal View History

2015-12-08 16:21:58 +00:00
#ifndef CSM_PREFS_SETTING_H
#define CSM_PREFS_SETTING_H
#include <string>
#include <utility>
#include <QObject>
class QWidget;
namespace Settings
{
class Manager;
}
namespace CSMPrefs
{
class Category;
class Setting : public QObject
{
Q_OBJECT
Category *mParent;
Settings::Manager *mValues;
std::string mKey;
std::string mLabel;
protected:
Settings::Manager& getValues();
public:
Setting (Category *parent, Settings::Manager *values, const std::string& key, const std::string& label);
virtual ~Setting();
/// Return label, input widget.
///
/// \note first can be a 0-pointer, which means that the label is part of the input
/// widget.
virtual std::pair<QWidget *, QWidget *> makeWidgets (QWidget *parent) = 0;
const Category *getParent() const;
const std::string& getKey() const;
const std::string& getLabel() const;
};
}
#endif