aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/tab-widgets/TabDiveInformation.h
blob: 8efa71d443a8445d99378270c256196d6c8a7ee2 (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
// SPDX-License-Identifier: GPL-2.0
#ifndef TAB_DIVE_INFORMATION_H
#define TAB_DIVE_INFORMATION_H

#include "TabBase.h"
#include "core/subsurface-qt/divelistnotifier.h"

namespace Ui {
	class TabDiveInformation;
};

class TabDiveInformation : public TabBase {
	Q_OBJECT
public:
	TabDiveInformation(QWidget *parent = 0);
	~TabDiveInformation();
	void updateData() override;
	void clear() override;
private slots:
	void divesChanged(const QVector<dive *> &dives, DiveField field);
	void cylinderChanged(dive *d);
	void diveModeChanged(int index);
	void on_atmPressVal_editingFinished();
	void on_atmPressType_currentIndexChanged(int index);
	void on_visibility_valueChanged(int value);
	void on_wavesize_valueChanged(int value);
	void on_current_valueChanged(int value);
	void on_surge_valueChanged(int value);
	void on_chill_valueChanged(int value);
	void on_airtemp_editingFinished();
	void on_watertemp_editingFinished();
	void on_waterTypeCombo_activated(int index);
private:
	Ui::TabDiveInformation *ui;
	bool manualDive;
	void updateProfile();
	int updateSalinityComboIndex(int salinity);
	void checkDcSalinityOverWritten();
	void updateWhen();
	int pressTypeIndex;
	void updateWaterTypeWidget();
	void updateTextBox(int event);
	void updateMode(struct dive *d);
	void divesEdited(int);
	void closeWarning();
	void showCurrentWidget(bool show, int position);
};

#endif