diff options
Diffstat (limited to 'src/kueapplication.h')
| -rw-r--r-- | src/kueapplication.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/kueapplication.h b/src/kueapplication.h new file mode 100644 index 0000000..888c592 --- /dev/null +++ b/src/kueapplication.h @@ -0,0 +1,37 @@ +// SPDX-FileCopyrightText: 2024 Alexander Kavon <me+kue@alexkavon.com> +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include <QQmlEngine> +#include <AbstractKirigamiApplication> +#include <KDescendantsProxyModel> + +using namespace Qt::StringLiterals; + +namespace Akonadi { + class Session; +} + +class KueApplication : public AbstractKirigamiApplication +{ + Q_OBJECT + QML_ELEMENT + Q_PROPERTY(bool loading READ loading NOTIFY loadingChanged) + Q_PROPERTY(KDescendantsProxyModel *descendantsProxyModel READ descendantsProxyModel CONSTANT) + + bool loading() const; + Akonadi::Session *session() const; + +public: + explicit KueApplication(QObject *parent = nullptr); + KDescendantsProxyModel *descendantsProxyModel() const; + +Q_SIGNALS: + void loadingChanged(); + +private: + bool m_loading; + Akonadi::Session *m_session; + KDescendantsProxyModel *m_descendantsProxyModel; +}; |
