1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-09 12:42:11 +00:00
OpenMW/apps/opencs/model/settings/settingcontainer.hpp
graffy76 700d55f1fb Fixed / implemented missing features for RecordStatusDelegate
Implemented updating editor application from preferences menu, loading
settings when editor loads, adding Record Status Display prefernce.

Fixed multiple bugs, made changes to CSM(V)Settings classes to make
implementing new prefrences easier.

Rewrote CSMSettings::UserSettings to retain last-loaded settings.

Adjusted icon position in Record Status column

Capitalized status text

Added delegate to referenceables table
2013-06-15 06:40:18 -05:00

36 lines
966 B
C++

#ifndef SETTINGCONTAINER_HPP
#define SETTINGCONTAINER_HPP
#include <QObject>
class QStringList;
namespace CSMSettings
{
class SettingContainer : public QObject
{
Q_OBJECT
QString *mValue;
QStringList *mValues;
public:
explicit SettingContainer (QObject *parent = 0);
explicit SettingContainer (const QString &value, QObject *parent = 0);
void insert (const QString &value);
void update (const QString &value, int index = 0);
QString getValue (int index = -1) const;
inline QStringList *getValues() const { return mValues; }
int count() const;
//test for empty container
//useful for default-constructed containers returned by QMap when invalid key is passed
inline bool isEmpty() const { return (!mValue && !mValues); }
inline bool isMultiValue() const { return (mValues); }
};
}
#endif // SETTINGCONTAINER_HPP