2019-04-13 15:43:45 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
|
|
|
#ifndef TAB_DIVE_EQUIPMENT_H
|
|
|
|
#define TAB_DIVE_EQUIPMENT_H
|
|
|
|
|
|
|
|
#include "TabBase.h"
|
|
|
|
#include "ui_TabDiveEquipment.h"
|
2019-07-20 18:53:06 +00:00
|
|
|
#include "qt-models/completionmodels.h"
|
|
|
|
#include "desktop-widgets/divelistview.h"
|
2022-09-17 14:35:31 +00:00
|
|
|
#include "desktop-widgets/modeldelegates.h"
|
2019-04-13 15:43:45 +00:00
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class TabDiveEquipment;
|
|
|
|
};
|
|
|
|
|
|
|
|
class WeightModel;
|
2021-11-20 08:37:28 +00:00
|
|
|
class CylindersModel;
|
2019-04-13 15:43:45 +00:00
|
|
|
|
|
|
|
class TabDiveEquipment : public TabBase {
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2022-09-09 16:12:31 +00:00
|
|
|
TabDiveEquipment(MainTab *parent);
|
2019-04-13 15:43:45 +00:00
|
|
|
~TabDiveEquipment();
|
2022-09-04 09:04:01 +00:00
|
|
|
void updateData(const std::vector<dive *> &selection, dive *currentDive, int currentDC) override;
|
2019-04-13 15:43:45 +00:00
|
|
|
void clear() override;
|
2019-07-20 18:53:06 +00:00
|
|
|
void closeWarning();
|
|
|
|
|
2019-04-13 15:43:45 +00:00
|
|
|
private slots:
|
2019-07-20 18:53:06 +00:00
|
|
|
void divesChanged(const QVector<dive *> &dives, DiveField field);
|
2019-04-13 15:43:45 +00:00
|
|
|
void addCylinder_clicked();
|
|
|
|
void addWeight_clicked();
|
|
|
|
void toggleTriggeredColumn();
|
|
|
|
void editCylinderWidget(const QModelIndex &index);
|
|
|
|
void editWeightWidget(const QModelIndex &index);
|
2019-07-20 18:53:06 +00:00
|
|
|
void on_suit_editingFinished();
|
2020-03-27 20:49:19 +00:00
|
|
|
void divesEdited(int count);
|
2019-07-20 18:53:06 +00:00
|
|
|
|
2019-04-13 15:43:45 +00:00
|
|
|
private:
|
|
|
|
Ui::TabDiveEquipment ui;
|
2019-07-20 18:53:06 +00:00
|
|
|
SuitCompletionModel suitModel;
|
2021-11-20 08:37:28 +00:00
|
|
|
CylindersModel *cylindersModel;
|
2019-04-13 15:43:45 +00:00
|
|
|
WeightModel *weightModel;
|
2022-09-17 14:35:31 +00:00
|
|
|
|
|
|
|
TankInfoDelegate tankInfoDelegate;
|
|
|
|
TankUseDelegate tankUseDelegate;
|
|
|
|
SensorDelegate sensorDelegate;
|
|
|
|
WSInfoDelegate wsInfoDelegate;
|
2019-04-13 15:43:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // TAB_DIVE_EQUIPMENT_H
|