blob: d6b1c1522f78f44de3db6bd9e4d71b3a43cdc567 (
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
43
44
45
46
47
48
49
50
51
52
53
54
|
// SPDX-License-Identifier: GPL-2.0
#ifndef TAB_DIVE_STATISTICS_H
#define TAB_DIVE_STATISTICS_H
#include "TabBase.h"
#include "core/subsurface-qt/divelistnotifier.h"
namespace Ui {
class TabDiveStatistics;
};
class TabDiveStatistics : public TabBase {
Q_OBJECT
public:
TabDiveStatistics(QWidget *parent = 0);
~TabDiveStatistics();
void updateData() override;
void clear() override;
private slots:
void divesChanged(const QVector<dive *> &dives, DiveField field);
void cylinderChanged(dive *d);
private:
Ui::TabDiveStatistics *ui;
};
// Widget describing, minimum, maximum and average value.
// Scheduled for removal in due course.
class QLabel;
class MinMaxAvgWidget : public QWidget {
Q_OBJECT
QLabel *avgIco, *avgValue;
QLabel *minIco, *minValue;
QLabel *maxIco, *maxValue;
public:
MinMaxAvgWidget(QWidget *parent);
double minimum() const;
double maximum() const;
double average() const;
void setMinimum(double minimum);
void setMaximum(double maximum);
void setAverage(double average);
void setMinimum(const QString &minimum);
void setMaximum(const QString &maximum);
void setAverage(const QString &average);
void overrideMinToolTipText(const QString &newTip);
void overrideAvgToolTipText(const QString &newTip);
void overrideMaxToolTipText(const QString &newTip);
void setAvgVisibility(bool visible);
void clear();
};
#endif
|