blob: 9fda8633a650983b80c0a9bf52b9dff65962b0bf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <qul/singleton.h>
#include <qul/property.h>
#include <qul/signal.h>
struct BackendObject : public Qul::Singleton<BackendObject>
{
Qul::Property<bool> customProperty;
Qul::Signal<void()> customPropertyChanged;
BackendObject() : customProperty(true) {}
void toggle()
{
customProperty.setValue(!customProperty.value());
customPropertyChanged();
}
};
|