2017-03-29 10:18:37 +00:00
|
|
|
#ifndef SECTIONSWIDGET_H
|
|
|
|
#define SECTIONSWIDGET_H
|
|
|
|
|
|
|
|
#include <QSplitter>
|
|
|
|
|
|
|
|
class MainWindow;
|
2017-04-13 15:14:02 +00:00
|
|
|
class QTreeWidget;
|
2017-03-29 10:18:37 +00:00
|
|
|
class QAbstractItemModel;
|
|
|
|
class QAbstractItemView;
|
|
|
|
class QItemSelectionModel;
|
|
|
|
|
2017-05-03 09:09:57 +00:00
|
|
|
struct SectionDescription;
|
|
|
|
|
2018-03-21 20:32:32 +00:00
|
|
|
namespace Ui {
|
|
|
|
class SectionsWidget;
|
2017-03-29 10:18:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class SectionsWidget : public QSplitter
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit SectionsWidget(MainWindow *main, QWidget *parent = 0);
|
2017-04-13 15:14:02 +00:00
|
|
|
|
2017-11-19 12:56:10 +00:00
|
|
|
private slots:
|
|
|
|
void refreshSections();
|
2017-03-29 10:18:37 +00:00
|
|
|
|
2018-02-02 15:56:39 +00:00
|
|
|
void onSectionsDoubleClicked(const QModelIndex &index);
|
|
|
|
|
2017-03-29 10:18:37 +00:00
|
|
|
private:
|
2017-04-13 15:14:02 +00:00
|
|
|
QAbstractItemView *pieChart;
|
|
|
|
QItemSelectionModel *selectionModel;
|
|
|
|
MainWindow *main;
|
|
|
|
QTreeWidget *tree;
|
|
|
|
|
2017-03-29 10:18:37 +00:00
|
|
|
void setupViews();
|
|
|
|
|
2017-05-03 09:09:57 +00:00
|
|
|
void fillSections(int row, const SectionDescription §ion);
|
2017-03-29 10:18:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // SECTIONSWIDGET_H
|