File indexing completed on 2024-05-12 12:20:52
0001 // SPDX-FileCopyrightText: 2003-2022 Jesper K. Pedersen <blackie@kde.org> 0002 // 0003 // SPDX-License-Identifier: GPL-2.0-or-later 0004 0005 #ifndef STATISTICSDIALOG_H 0006 #define STATISTICSDIALOG_H 0007 0008 #include <QDialog> 0009 0010 class QGridLayout; 0011 class QLabel; 0012 class QGroupBox; 0013 class KComboBox; 0014 class QTreeWidgetItem; 0015 class QTreeWidget; 0016 0017 namespace DB 0018 { 0019 class ImageSearchInfo; 0020 } 0021 namespace MainWindow 0022 { 0023 0024 class StatisticsDialog : public QDialog 0025 { 0026 Q_OBJECT 0027 0028 public: 0029 explicit StatisticsDialog(QWidget *parent); 0030 QSize sizeHint() const override; 0031 void show(); 0032 0033 private: 0034 QTreeWidgetItem *addRow(const QString &title, int noOfTags, int tagCount, int imageCount, QTreeWidgetItem *parent); 0035 void highlightTotalRow(QTreeWidgetItem *item); 0036 QGroupBox *createAnnotatedGroupBox(); 0037 void populateSubTree(const DB::ImageSearchInfo &info, int imageCount, QTreeWidgetItem *top); 0038 0039 private Q_SLOTS: 0040 void categoryChanged(int); 0041 void populate(); 0042 0043 private: 0044 QTreeWidget *m_treeWidget; 0045 KComboBox *m_category; 0046 QLabel *m_tagLabel; 0047 KComboBox *m_tag; 0048 QGridLayout *m_boxLayout; 0049 }; 0050 0051 } 0052 0053 #endif /* STATISTICSDIALOG_H */ 0054 0055 // vi:expandtab:tabstop=4 shiftwidth=4: