2012-02-29 18:33:50 +01:00
|
|
|
/* ============================================================
|
|
|
|
* QupZilla - WebKit based browser
|
|
|
|
* Copyright (C) 2010-2012 David Rosca <nowrep@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/>.
|
|
|
|
* ============================================================ */
|
2012-01-11 21:58:25 +01:00
|
|
|
#ifndef SETTINGS_H
|
|
|
|
#define SETTINGS_H
|
|
|
|
|
2012-02-29 18:33:50 +01:00
|
|
|
#include <qglobal.h>
|
|
|
|
#include <QVariant>
|
|
|
|
|
|
|
|
#include "qz_namespace.h"
|
|
|
|
|
|
|
|
class QSettings;
|
2012-01-11 21:58:25 +01:00
|
|
|
|
2012-08-10 21:16:43 +02:00
|
|
|
class QzSettings;
|
|
|
|
|
|
|
|
class QT_QUPZILLA_EXPORT Settings
|
2012-01-11 21:58:25 +01:00
|
|
|
{
|
|
|
|
public:
|
2012-01-21 20:27:45 +01:00
|
|
|
explicit Settings();
|
2012-01-11 21:58:25 +01:00
|
|
|
~Settings();
|
|
|
|
|
|
|
|
static void createSettings(const QString &fileName);
|
|
|
|
static void syncSettings();
|
|
|
|
|
2012-02-13 19:09:02 +01:00
|
|
|
static QSettings* globalSettings();
|
2012-08-10 21:16:43 +02:00
|
|
|
static QzSettings* staticSettings();
|
2012-02-13 19:09:02 +01:00
|
|
|
|
2012-01-11 21:58:25 +01:00
|
|
|
void setValue(const QString &key, const QVariant &defaultValue = QVariant());
|
|
|
|
QVariant value(const QString &key, const QVariant &defaultValue = QVariant());
|
|
|
|
|
|
|
|
void beginGroup(const QString &prefix);
|
|
|
|
void endGroup();
|
|
|
|
|
|
|
|
signals:
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
|
|
|
private:
|
2012-04-17 18:26:01 +02:00
|
|
|
static QSettings* s_settings;
|
2012-08-10 21:16:43 +02:00
|
|
|
static QzSettings* s_qzSettings;
|
2012-01-11 21:58:25 +01:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // SETTINGS_H
|