File indexing completed on 2024-05-12 05:12:47

0001 /*
0002  * SPDX-FileCopyrightText: 2013 Daniel Vrátil <dvratil@redhat.com>
0003  *
0004  * SPDX-License-Identifier: GPL-2.0-or-later
0005  *
0006  */
0007 
0008 #pragma once
0009 
0010 #include <QTreeView>
0011 #include <QWidget>
0012 
0013 class QStandardItem;
0014 namespace Akonadi
0015 {
0016 class TagFetchScope;
0017 class CollectionFetchScope;
0018 }
0019 
0020 class MonitorsModel;
0021 
0022 class MonitorsWidget : public QWidget
0023 {
0024     Q_OBJECT
0025 
0026 public:
0027     explicit MonitorsWidget(QWidget *parent = nullptr);
0028     ~MonitorsWidget() override;
0029 
0030 private Q_SLOTS:
0031     void onSubscriberSelected(const QModelIndex &index);
0032 
0033     void populateTagFetchScope(QStandardItem *parent, const Akonadi::TagFetchScope &tfs);
0034     void populateCollectionFetchScope(QStandardItem *parent, const Akonadi::CollectionFetchScope &cfs);
0035 
0036 private:
0037     QTreeView *mTreeView = nullptr;
0038     QTreeView *mSubscriberView = nullptr;
0039     MonitorsModel *const mModel;
0040 };