1 /*
2     This file is part of KNewStuffQuick.
3     SPDX-FileCopyrightText: 2021 Dan Leinir Turthra Jensen <admin@leinir.dk>
4 
5     SPDX-License-Identifier: LGPL-2.1-or-later
6 */
7 
8 #ifndef KNSQ_QUICKSETTINGS_H
9 #define KNSQ_QUICKSETTINGS_H
10 
11 #include "core/questionlistener.h"
12 
13 #include <memory>
14 
15 namespace KNewStuffQuick
16 {
17 class SettingsPrivate;
18 
19 /**
20  * An object for handling KNewStuff related settings which make sense to handle without
21  * instantiating an engine (specifically, for now, whether or not this is allowed by
22  * the user's Kiosk settings)
23  * @since 5.81
24  */
25 class Settings : public QObject
26 {
27     Q_OBJECT
28     Q_DISABLE_COPY(Settings)
29     Q_PROPERTY(bool allowedByKiosk READ allowedByKiosk CONSTANT)
30 public:
31     static Settings *instance();
32     ~Settings() override;
33 
34     bool allowedByKiosk() const;
35 
36 private:
37     Settings();
38     std::unique_ptr<SettingsPrivate> d;
39 };
40 }
41 #endif // KNSQ_QUICKSETTINGS_H
42