blob: 158ed1b20d8c3df26110b5573425e5be8e77e9cc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
// Copyright (C) 2024 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef CPPSETTINGS_H
#define CPPSETTINGS_H
#include <QObject>
#include <QQmlEngine>
#include <QSettings>
class CppSettings : public QObject
{
Q_OBJECT
Q_PROPERTY(bool dontUseNativeMenuWindows READ dontUseNativeMenuWindows WRITE setDontUseNativeMenuWindows
NOTIFY dontUseNativeMenuWindowsChanged FINAL)
Q_PROPERTY(bool dontUseNativeMenuBar READ dontUseNativeMenuBar WRITE setDontUseNativeMenuBar
NOTIFY dontUseNativeMenuBarChanged FINAL)
QML_ELEMENT
QML_SINGLETON
public:
explicit CppSettings(QObject *parent = nullptr);
bool dontUseNativeMenuWindows() const;
void setDontUseNativeMenuWindows(bool dontUseNativeMenuWindows);
bool dontUseNativeMenuBar() const;
void setDontUseNativeMenuBar(bool dontUseNativeMenuBar);
signals:
void dontUseNativeMenuWindowsChanged();
void dontUseNativeMenuBarChanged();
private:
QSettings mSettings;
};
#endif // CPPSETTINGS_H
|