source: calamares/trunk/fuentes/src/libcalamares/Settings.h @ 7538

Last change on this file since 7538 was 7538, checked in by kbut, 13 months ago

sync with github

File size: 2.0 KB
Line 
1/* === This file is part of Calamares - <https://github.com/calamares> ===
2 *
3 *   Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
4 *   Copyright 2017, Adriaan de Groot <groot@kde.org>
5 *
6 *   Calamares is free software: you can redistribute it and/or modify
7 *   it under the terms of the GNU General Public License as published by
8 *   the Free Software Foundation, either version 3 of the License, or
9 *   (at your option) any later version.
10 *
11 *   Calamares is distributed in the hope that it will be useful,
12 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
13 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 *   GNU General Public License for more details.
15 *
16 *   You should have received a copy of the GNU General Public License
17 *   along with Calamares. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef SETTINGS_H
21#define SETTINGS_H
22
23#include "UiDllMacro.h"
24#include "Typedefs.h"
25
26#include <QObject>
27#include <QStringList>
28
29
30namespace Calamares
31{
32
33class UIDLLEXPORT Settings : public QObject
34{
35    Q_OBJECT
36public:
37    explicit Settings( const QString& settingsFilePath,
38                       bool debugMode,
39                       QObject* parent = nullptr );
40
41    static Settings* instance();
42    //TODO: load from YAML then emit ready
43
44    QStringList modulesSearchPaths() const;
45
46    using InstanceDescription = QMap< QString, QString >;
47    using InstanceDescriptionList = QList< InstanceDescription >;
48    InstanceDescriptionList customModuleInstances() const;
49
50    QList< QPair< ModuleAction, QStringList > > modulesSequence() const;
51
52    QString brandingComponentName() const;
53
54    bool showPromptBeforeExecution() const;
55
56    bool debugMode() const;
57
58    bool doChroot() const;
59
60private:
61    static Settings* s_instance;
62
63    QStringList m_modulesSearchPaths;
64
65    InstanceDescriptionList m_customModuleInstances;
66    QList< QPair< ModuleAction, QStringList > > m_modulesSequence;
67
68    QString m_brandingComponentName;
69
70    bool m_debug;
71    bool m_doChroot;
72    bool m_promptInstall;
73};
74
75}
76
77#endif // SETTINGS_H
Note: See TracBrowser for help on using the repository browser.