summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/statswidget.h
blob: 4ae86a015c3bf6908009740814e76f7027b64394 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// SPDX-License-Identifier: GPL-2.0
#ifndef STATSWIDGET_H
#define STATSWIDGET_H

#include "stats/statsstate.h"
#include "stats/chartlistmodel.h"
#include "ui_statswidget.h"
#include <vector>
#include <memory>

class QCheckBox;
class StatsView;

class StatsWidget : public QWidget {
	Q_OBJECT
public:
	StatsWidget(QWidget *parent = 0);
private
slots:
	void closeStats();
	void chartTypeChanged(int);
	void var1Changed(int);
	void var2Changed(int);
	void var1BinnerChanged(int);
	void var2BinnerChanged(int);
	void var2OperationChanged(int);
	void featureChanged(int, bool);
	void restrict();
	void unrestrict();
private:
	Ui::StatsWidget ui;
	StatsState state;
	StatsView *view;
	void updateUi();
	void updateRestrictionLabel();
	std::vector<std::unique_ptr<QCheckBox>> features;

	ChartListModel charts;
	void showEvent(QShowEvent *) override;
};

#endif // STATSWIDGET_H