1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 05:49:56 +00:00
openmw-tes3mp/apps/opencs/model/prefs/setting.hpp
2015-12-08 17:21:58 +01:00

53 lines
1.1 KiB
C++

#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