1 /* 2 * SPDX-FileCopyrightText: 2013 Daniel Vrátil <dvratil@redhat.com> 3 * 4 * SPDX-License-Identifier: GPL-2.0-or-later 5 * 6 */ 7 8 #pragma once 9 10 #include <QTreeView> 11 #include <QWidget> 12 13 class QStandardItem; 14 namespace Akonadi 15 { 16 class TagFetchScope; 17 class CollectionFetchScope; 18 } 19 20 class MonitorsModel; 21 22 class MonitorsWidget : public QWidget 23 { 24 Q_OBJECT 25 26 public: 27 explicit MonitorsWidget(QWidget *parent = nullptr); 28 ~MonitorsWidget() override; 29 30 private Q_SLOTS: 31 void onSubscriberSelected(const QModelIndex &index); 32 33 void populateTagFetchScope(QStandardItem *parent, const Akonadi::TagFetchScope &tfs); 34 void populateCollectionFetchScope(QStandardItem *parent, const Akonadi::CollectionFetchScope &cfs); 35 36 private: 37 QTreeView *mTreeView = nullptr; 38 QTreeView *mSubscriberView = nullptr; 39 MonitorsModel *mModel = nullptr; 40 }; 41 42