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>
8#include <KSharedConfig>
9
10/// @internal Only used by MessageDialog
12{
14 QML_SINGLETON
15
16 Q_PROPERTY(KConfig *config READ config WRITE setConfig NOTIFY configChanged);
17
18public:
19 explicit MessageDialogHelper(QObject *parent = nullptr);
20
21 KConfig *config() const;
22 void setConfig(KConfig *config);
23
24 Q_INVOKABLE QVariantHash shouldBeShownTwoActions(const QString &dontShowAgainName);
25
26 Q_INVOKABLE bool shouldBeShownContinue(const QString &dontShowAgainName);
27
28 Q_INVOKABLE void saveDontShowAgainTwoActions(const QString &dontShowAgainName, bool result);
29
30 Q_INVOKABLE void saveDontShowAgainContinue(const QString &dontShowAgainName);
31
33 void configChanged();
34
35private:
36 KConfig *m_config = nullptr;
37};
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 May 10 2024 11:50:14 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.