mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-11 03:21:29 +00:00
f299fa37f9
Apparently, the visibility flag of the view is not inherited from the statistics widget. Therefore, the statistics is redrawn on every action even if not visible. Set the visibility explicitly in the show- and hide-events. This is crazy. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
43 lines
912 B
C++
43 lines
912 B
C++
// 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;
|
|
void hideEvent(QHideEvent *) override;
|
|
};
|
|
|
|
#endif // STATSWIDGET_H
|