Dive sites: prepare for dive site ref-counting

Add a dive site table to each dive site to keep track of dives
that have been added to a dive site. Add two functions to add
dives to / remove dives from dive sites.

Since dive sites now contain a dive table, the order of includes
had to be changed: "divesite.h" now includes "dive.h" and not
vice-versa. This caused some include churn.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2019-03-04 23:20:29 +01:00 committed by Dirk Hohndel
parent f2cdca7bcc
commit c22fd9f4fd
38 changed files with 75 additions and 29 deletions

View file

@ -3,7 +3,7 @@
#include <QAbstractTableModel>
#include <vector>
#include "core/dive.h"
#include "core/divesite.h"
class DiveImportedModel : public QAbstractTableModel
{

View file

@ -2,6 +2,7 @@
#include "core/units.h"
#include "qt-models/divelocationmodel.h"
#include "core/qthelper.h"
#include "core/divesite.h"
#include <QDebug>
#include <QLineEdit>
#include <QIcon>

View file

@ -3,6 +3,7 @@
#include "qt-models/models.h"
#include "core/display.h"
#include "core/qthelper.h"
#include "core/divesite.h"
#include "core/subsurface-string.h"
#include "core/subsurface-qt/DiveListNotifier.h"
#include "qt-models/divetripmodel.h"