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"
|
2019-04-13 15:43:45 +00:00
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class TabDiveEquipment;
|
|
|
|
};
|
|
|
|
|
|
|
|
class WeightModel;
|
2020-01-30 19:12:11 +00:00
|
|
|
class CylindersModelFiltered;
|
2019-04-13 15:43:45 +00:00
|
|
|
|
|
|
|
class TabDiveEquipment : public TabBase {
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
TabDiveEquipment(QWidget *parent = 0);
|
|
|
|
~TabDiveEquipment();
|
|
|
|
void updateData() override;
|
|
|
|
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;
|
2020-01-30 19:12:11 +00:00
|
|
|
CylindersModelFiltered *cylindersModel;
|
2019-04-13 15:43:45 +00:00
|
|
|
WeightModel *weightModel;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // TAB_DIVE_EQUIPMENT_H
|