#pragma once
#include <memory>
#include <vector>
#include <QString>
#include <QVariant>

enum settingFileType {
    LAB_FILE_TYPE_UNKNOWN = 0,
    LAB_FILE_TYPE_RCXML,
    LAB_FILE_TYPE_ENVIRONMENT,
};

enum settingValueOrigin {
    LAB_VALUE_ORIGIN_UNKNOWN = 0,
    LAB_VALUE_ORIGIN_DEFAULT,
    LAB_VALUE_ORIGIN_USER_OVERRIDE,
    LAB_VALUE_ORIGIN_CHANGED_IN_THIS_SESSION,
};

enum settingValueType {
    LAB_VALUE_TYPE_UNKNOWN = 0,
    LAB_VALUE_TYPE_INT,
    LAB_VALUE_TYPE_BOOL,
    LAB_VALUE_TYPE_STRING,
    LAB_VALUE_TYPE_FLOAT
};

class Setting
{
public:
    Setting(QString name, enum settingFileType fileType, enum settingValueType valueType,
            QVariant defaultValue);

    void setValue(QVariant value);

private:
    QString m_name; // xpath-style like /foo/bar/baz
    enum settingFileType m_fileType;
    enum settingValueOrigin m_valueOrigin;
    enum settingValueType m_valueType;
    QVariant m_value;

public:
    // Getters
    QString name() const { return m_name; }
    enum settingFileType fileType() const { return m_fileType; }
    enum settingValueOrigin valueOrigin() const { return m_valueOrigin; }
    enum settingValueType valueType() const { return m_valueType; }
    QVariant value() const { return m_value; }
};
