mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 13:10:19 +00:00
fe61f6b69e
Most tabs in the dive-information widget have there own translation units and ui-files. Only the equipment tab was married with the main tab. Move it out to get more reasonably sized translation units and some isolation. Currently, this needs ugly hacks when entering / checking for edit mode: Access to MainTab is via the MainWindow. And vice/versa, when accessing the DiveEquipmentTab from the MainTab, the former is hardcoded as the first item of an array. These hacks will soon be removed though, when making equipment editing undoable. The tabs will then be independent. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
37 lines
792 B
C++
37 lines
792 B
C++
// SPDX-License-Identifier: GPL-2.0
|
|
#ifndef TAB_DIVE_EQUIPMENT_H
|
|
#define TAB_DIVE_EQUIPMENT_H
|
|
|
|
#include "TabBase.h"
|
|
#include "ui_TabDiveEquipment.h"
|
|
|
|
namespace Ui {
|
|
class TabDiveEquipment;
|
|
};
|
|
|
|
class WeightModel;
|
|
class CylindersModel;
|
|
|
|
class TabDiveEquipment : public TabBase {
|
|
Q_OBJECT
|
|
public:
|
|
TabDiveEquipment(QWidget *parent = 0);
|
|
~TabDiveEquipment();
|
|
void updateData() override;
|
|
void clear() override;
|
|
void acceptChanges();
|
|
void rejectChanges();
|
|
private slots:
|
|
void addCylinder_clicked();
|
|
void addWeight_clicked();
|
|
void toggleTriggeredColumn();
|
|
void editCylinderWidget(const QModelIndex &index);
|
|
void editWeightWidget(const QModelIndex &index);
|
|
private:
|
|
Ui::TabDiveEquipment ui;
|
|
|
|
CylindersModel *cylindersModel;
|
|
WeightModel *weightModel;
|
|
};
|
|
|
|
#endif // TAB_DIVE_EQUIPMENT_H
|