/*
    Copyright (C) 2010 jungil Han <jungil.Han@gmail.com>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef INIMANAGER_H
#define INIMANAGER_H

#include <QtCore/QSettings>
#include <QtGui/QFont>
#include <QtGui/QColor>

#include "singleton.h"
#include "global_defines.h"

#define INIMANAGER Singleton<INIManager>::instance()

class INIManager : public QSettings
{
    Q_OBJECT

public:
    INIManager();
    virtual ~INIManager();

    void initDefaultSettings();
    QString iniFile();

    void setValue(const QString& prefix, const QString& key, const QVariant& value);
    QVariant value(const QString& prefix, const QString& key, const QVariant& defaultValue = QVariant());
    bool contains(const QString& prefix, const QString &key);

    QString logfilePfadName();
    QString applicationDataPath();

    InterpolatorData interpolatorData(int nummer);
    void setInterpolatorData(int nummer, InterpolatorData data);

    double pauseStart();
    void setPauseStart(double value);

    double grundpositionX();
    void setGrundpositionX(double value);

    double grundpositionY();
    void setGrundpositionY(double value);

    double startPositionLooser_Y();
    void setStartPositionLooser_Y(double value);

    double startPositionLooser_X();
    void setStartPositionLooser_X(double value);

    double spielHoehe();
    void setSpielHoehe(double value);

    double spielWeite();
    void setSpielWeite(double value);

private:
    void removeGroup(const QString& group);

private:
};

#endif // INIMANAGER_H
