File indexing completed on 2024-04-14 03:49:14

0001 /*
0002     SPDX-FileCopyrightText: 2008 Frederik Gladhorn <frederik.gladhorn@kdemail.net>
0003     SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005 
0006 #ifndef LESSONSTATISTICSVIEW_H
0007 #define LESSONSTATISTICSVIEW_H
0008 
0009 #include "containerview.h"
0010 
0011 /**
0012  * View for the lesson list.
0013  * @author Frederik Gladhorn <frederik.gladhorn@kdemail.net>
0014  */
0015 class LessonStatisticsView : public ContainerView
0016 {
0017     Q_OBJECT
0018 
0019 public:
0020     explicit LessonStatisticsView(QWidget *parent);
0021     ~LessonStatisticsView() override;
0022     void setModel(ContainerModel *model) override;
0023     void saveExpandedStatus() const;
0024     void restoreExpandedStatus();
0025 
0026 public Q_SLOTS:
0027     void adjustColumnWidths();
0028 
0029 protected:
0030     void resizeEvent(QResizeEvent *event) override;
0031 
0032 private Q_SLOTS:
0033     void removeGrades();
0034     void removeGradesChildren();
0035     void sectionResized(int index, int /*oldSize*/, int /*newSize*/);
0036 
0037 private:
0038     void setModel(QAbstractItemModel *model) override
0039     {
0040         Q_UNUSED(model)
0041     }
0042     void getCollapsedItems(QStringList &collapsedItems, const QModelIndex &item, QString name) const;
0043     void setCollapsedItems(const QStringList &collapsedItems, const QModelIndex &item, QString name);
0044 };
0045 
0046 #endif