mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-29 21:50:26 +00:00
1e4cc49f83
We were royally confused when we didn't know the salinity value (e.g., if the dive computer didn't provide that information). We somehow treated this as the same as wanting to use the salinity information in the dive computer. Which makes no sense. While cleaning this up, this also adds the textual representations of the water types as a string list that corresponds to the enum values that we use - this way it's easier to stay consistent. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
49 lines
1.3 KiB
C++
49 lines
1.3 KiB
C++
// 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 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);
|
|
QStringList waterTypes;
|
|
};
|
|
|
|
#endif
|