mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-13 05:37:42 +02:00
Massive re-organization.
This commit is contained in:
@ -26,7 +26,7 @@
|
||||
/*!
|
||||
* \brief A settings object that stores its settings in a QSettings object.
|
||||
*/
|
||||
class LIBMMCSETTINGS_EXPORT BasicSettingsObject : public SettingsObject
|
||||
class LIBSETTINGS_EXPORT BasicSettingsObject : public SettingsObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
38
libsettings/include/inifile.h
Normal file
38
libsettings/include/inifile.h
Normal file
@ -0,0 +1,38 @@
|
||||
/* Copyright 2013 MultiMC Contributors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef INIFILE_H
|
||||
#define INIFILE_H
|
||||
|
||||
#include <QMap>
|
||||
#include <QString>
|
||||
#include <QVariant>
|
||||
|
||||
#include "libsettings_config.h"
|
||||
|
||||
// Sectionless INI parser (for instance config files)
|
||||
class LIBSETTINGS_EXPORT INIFile : public QMap<QString, QVariant>
|
||||
{
|
||||
public:
|
||||
explicit INIFile();
|
||||
|
||||
bool loadFile(QString fileName);
|
||||
bool saveFile(QString fileName);
|
||||
|
||||
QVariant get(QString key, QVariant def) const;
|
||||
void set(QString key, QVariant val);
|
||||
};
|
||||
|
||||
#endif // INIFILE_H
|
@ -18,7 +18,7 @@
|
||||
|
||||
#include <QObject>
|
||||
|
||||
#include <inifile.h>
|
||||
#include "inifile.h"
|
||||
|
||||
#include "settingsobject.h"
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
/*!
|
||||
* \brief A settings object that stores its settings in an INIFile.
|
||||
*/
|
||||
class LIBMMCSETTINGS_EXPORT INISettingsObject : public SettingsObject
|
||||
class LIBSETTINGS_EXPORT INISettingsObject : public SettingsObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
@ -18,10 +18,10 @@
|
||||
|
||||
#include <QtCore/QtGlobal>
|
||||
|
||||
#ifdef LIBMMCSETTINGS_LIBRARY
|
||||
# define LIBMMCSETTINGS_EXPORT Q_DECL_EXPORT
|
||||
#ifdef LIBSETTINGS_LIBRARY
|
||||
# define LIBSETTINGS_EXPORT Q_DECL_EXPORT
|
||||
#else
|
||||
# define LIBMMCSETTINGS_EXPORT Q_DECL_IMPORT
|
||||
# define LIBSETTINGS_EXPORT Q_DECL_IMPORT
|
||||
#endif
|
||||
|
||||
#endif // LIBINSTANCE_CONFIG_H
|
||||
|
@ -28,7 +28,7 @@
|
||||
* The other setting can be (and usually is) a part of a different SettingsObject
|
||||
* than this one.
|
||||
*/
|
||||
class LIBMMCSETTINGS_EXPORT OverrideSetting : public Setting
|
||||
class LIBSETTINGS_EXPORT OverrideSetting : public Setting
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
@ -26,7 +26,7 @@ class SettingsObject;
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
class LIBMMCSETTINGS_EXPORT Setting : public QObject
|
||||
class LIBSETTINGS_EXPORT Setting : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
@ -34,7 +34,7 @@ class Setting;
|
||||
*
|
||||
* \sa Setting
|
||||
*/
|
||||
class LIBMMCSETTINGS_EXPORT SettingsObject : public QObject
|
||||
class LIBSETTINGS_EXPORT SettingsObject : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@ -165,6 +165,6 @@ private:
|
||||
/*!
|
||||
* \brief A global settings object.
|
||||
*/
|
||||
LIBMMCSETTINGS_EXPORT extern SettingsObject *globalSettings;
|
||||
LIBSETTINGS_EXPORT extern SettingsObject *globalSettings;
|
||||
|
||||
#endif // SETTINGSOBJECT_H
|
||||
|
Reference in New Issue
Block a user