mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-29 05:30:41 +00:00
6a6b992a77
The undo system sets updates individual dive fields on redo respectively undo. Make salinity such a field, since it is changed on replanning a dive. To do this, break out the "update salinity" functionality into its own function, add an entry to the DiveField enum and add the corresponding switch-case. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
32 lines
742 B
C++
32 lines
742 B
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 on_atmPressVal_editingFinished();
|
|
void on_atmPressType_currentIndexChanged(int index);
|
|
private:
|
|
Ui::TabDiveInformation *ui;
|
|
void updateProfile();
|
|
void updateSalinity();
|
|
void updateWhen();
|
|
int pressTypeIndex;
|
|
void updateTextBox(int event);
|
|
};
|
|
|
|
#endif
|