mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-04 16:11:28 +00:00
cded7ef5fe
On selection change, pass down selection (including current dive and dc) to the tab widgets. Ultimately, this should remove access to global variables. A number of new accesses are marked as TODO. They shall be removed in due course. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
50 lines
1.5 KiB
C++
50 lines
1.5 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(const std::vector<dive *> &selection, dive *currentDive, int currentDC) override;
|
|
void clear() override;
|
|
void updateUi(QString titleColor) 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
|