mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Cleanup: Move dive-equipment tab into own translation units
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>
This commit is contained in:
parent
4bb002d137
commit
fe61f6b69e
8 changed files with 414 additions and 322 deletions
|
@ -19,8 +19,6 @@
|
|||
#include "core/dive.h"
|
||||
#include "core/subsurface-qt/DiveListNotifier.h"
|
||||
|
||||
class WeightModel;
|
||||
class CylindersModel;
|
||||
class ExtraDataModel;
|
||||
class DivePictureModel;
|
||||
class QCompleter;
|
||||
|
@ -46,7 +44,6 @@ public:
|
|||
MainTab(QWidget *parent = 0);
|
||||
~MainTab();
|
||||
void clearTabs();
|
||||
void clearEquipment();
|
||||
void reload();
|
||||
void initialUiSetup();
|
||||
bool isEditing();
|
||||
|
@ -62,8 +59,6 @@ slots:
|
|||
void divesChanged(dive_trip *trip, const QVector<dive *> &dives, DiveField field);
|
||||
void diveSiteEdited(dive_site *ds, int field);
|
||||
void tripChanged(dive_trip *trip, TripField field);
|
||||
void addCylinder_clicked();
|
||||
void addWeight_clicked();
|
||||
void updateDiveInfo();
|
||||
void updateNotes(const struct dive *d);
|
||||
void updateMode(struct dive *d);
|
||||
|
@ -87,20 +82,15 @@ slots:
|
|||
void on_rating_valueChanged(int value);
|
||||
void on_visibility_valueChanged(int value);
|
||||
void on_tagWidget_editingFinished();
|
||||
void editCylinderWidget(const QModelIndex &index);
|
||||
void editWeightWidget(const QModelIndex &index);
|
||||
void addMessageAction(QAction *action);
|
||||
void hideMessage();
|
||||
void closeMessage();
|
||||
void displayMessage(QString str);
|
||||
void enableEdition(EditMode newEditMode = NONE);
|
||||
void toggleTriggeredColumn();
|
||||
void updateTextLabels(bool showUnits = true);
|
||||
void escDetected(void);
|
||||
private:
|
||||
Ui::MainTab ui;
|
||||
WeightModel *weightModel;
|
||||
CylindersModel *cylindersModel;
|
||||
EditMode editMode;
|
||||
BuddyCompletionModel buddyModel;
|
||||
DiveMasterCompletionModel diveMasterModel;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue