summaryrefslogtreecommitdiff
path: root/src/kueapplication.h
blob: 888c592b1e9aed7c2ce26aba4370bf0dc6bc8dd7 (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
// 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;
};