summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/tab-widgets/TabDiveEquipment.h
blob: 55eb21d1eec722f88f24dfa42a63af742e0de2f4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// SPDX-License-Identifier: GPL-2.0
#ifndef TAB_DIVE_EQUIPMENT_H
#define TAB_DIVE_EQUIPMENT_H

#include "TabBase.h"
#include "ui_TabDiveEquipment.h"
#include "qt-models/completionmodels.h"
#include "desktop-widgets/divelistview.h"

namespace Ui {
	class TabDiveEquipment;
};

class WeightModel;
class CylindersModelFiltered;

class TabDiveEquipment : public TabBase {
	Q_OBJECT
public:
	TabDiveEquipment(QWidget *parent = 0);
	~TabDiveEquipment();
	void updateData() override;
	void clear() override;
	void closeWarning();

private slots:
	void divesChanged(const QVector<dive *> &dives, DiveField field);
	void addCylinder_clicked();
	void addWeight_clicked();
	void toggleTriggeredColumn();
	void editCylinderWidget(const QModelIndex &index);
	void editWeightWidget(const QModelIndex &index);
	void on_suit_editingFinished();
	void divesEdited(int count);

private:
	Ui::TabDiveEquipment ui;
	SuitCompletionModel suitModel;
	CylindersModelFiltered *cylindersModel;
	WeightModel *weightModel;
};

#endif // TAB_DIVE_EQUIPMENT_H