drumstick
2.0.0
settingsfactory.h
Go to the documentation of this file.
1
/*
2
Drumstick Widgets
3
Copyright (C) 2018-2020 Pedro Lopez-Cabanillas <plcl@users.sf.net>
4
5
This program is free software: you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation, either version 3 of the License, or
8
(at your option) any later version.
9
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
14
15
You should have received a copy of the GNU General Public License
16
along with this program. If not, see <http://www.gnu.org/licenses/>.
17
*/
18
19
#ifndef SETTINGS_H
20
#define SETTINGS_H
21
22
#include <QSettings>
23
#include <QScopedPointer>
24
#include "
macros.h
"
25
30
36
37
namespace
drumstick
{
namespace
widgets {
38
48
class
DRUMSTICK_EXPORT
SettingsFactory
49
{
50
public
:
51
QSettings
*
getQSettings
();
52
QSettings
*
operator->
();
53
static
void
setFileName
(
const
QString name);
54
55
private
:
56
QScopedPointer<QSettings> m_settings{
nullptr
};
57
static
QString s_fileName;
58
};
59
61
62
}}
// namespace drumstick::widgets
63
64
#endif
// SETTINGS_H
QSettings
The QSettings class provides persistent platform-independent application settings.
drumstick::widgets::SettingsFactory
The SettingsFactory class holds a global QSettings object.
Definition
settingsfactory.h:49
drumstick::widgets::SettingsFactory::setFileName
static void setFileName(const QString name)
SettingsFactory::setFileName sets the global file name for the persisting settings and sets the INI f...
Definition
settingsfactory.cpp:40
drumstick::widgets::SettingsFactory::getQSettings
QSettings * getQSettings()
SettingsFactory::getQSettings creates and/or returns a QSettings object pointer.
Definition
settingsfactory.cpp:51
drumstick::widgets::SettingsFactory::operator->
QSettings * operator->()
SettingsFactory::operator -> is equivalent to calling getQSettings().
Definition
settingsfactory.cpp:68
macros.h
Drumstick visibility macros.
drumstick
Drumstick common.
Definition
alsaclient.cpp:68
library
include
drumstick
settingsfactory.h
Generated by
1.16.1