Subversion Repositories public iLand

Rev

Rev 87 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

#ifndef SettingMetaData_H
#define SettingMetaData_H

/** This helper class holds meta data (description, Urls, etc) about model settings.
   Various types of settings (species, model, ...) are stored together.
*/

class SettingMetaData
{
public:
    /// type of the setting
    enum Type { SettingInvalid, SpeciesSetting, ModelSetting };
    SettingMetaData();
    SettingMetaData(const Type type, const QString &name, const QString &description, const QString &url, const QVariant defaultValue);
    /// converts a string to a setting Type
    Type settingFromName(const QString &settingName);
    /// convert a Type to a string.
    const QString settingName(const Type type);
private:
    static const QStringList mTypeNames;
    Type mType;
    QString mName;
    QString mDescription;
    QString mUrl;
    QVariant mDefautValue;
};

typedef  QHash<QString, SettingMetaData> SettingMetaDataList;

#endif // SettingMetaData_H