Kirigami-addons

messagedialoghelper.h
1// SPDX-FileCopyrightText: 2024 Carl Schwan <carl@carlschwan.eu>
2// SPDX-License-Identifier: LGPL-2.1-or-later
3
4#pragma once
5
6#include <QObject>
7#include <QtQml/qqmlregistration.h>
8#include <KSharedConfig>
9#include <QJsonObject>
10
11/// @internal Only used by MessageDialog
13{
15 QML_SINGLETON
16
17 Q_PROPERTY(KConfig *config READ config WRITE setConfig NOTIFY configChanged);
18
19public:
20 explicit MessageDialogHelper(QObject *parent = nullptr);
21
22 KConfig *config() const;
23 void setConfig(KConfig *config);
24
25 Q_INVOKABLE QJsonObject shouldBeShownTwoActions(const QString &dontShowAgainName);
26
27 Q_INVOKABLE bool shouldBeShownContinue(const QString &dontShowAgainName);
28
29 Q_INVOKABLE void saveDontShowAgainTwoActions(const QString &dontShowAgainName, bool result);
30
31 Q_INVOKABLE void saveDontShowAgainContinue(const QString &dontShowAgainName);
32
34 void configChanged();
35
36private:
37 KConfig *m_config = nullptr;
38};
Q_INVOKABLEQ_INVOKABLE
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
Q_SIGNALSQ_SIGNALS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Aug 30 2024 11:47:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.