diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-10-25 09:14:16 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-10-25 13:59:52 -0700 |
commit | 8212acc9925b28ecd546b01047c6a8fc574326ef (patch) | |
tree | f4ce765228f3bb2511a186373eb2b3394b647709 /profile-widget | |
parent | d82a7b8b73c13451f469832d6402303ccf2ee3d3 (diff) | |
download | subsurface-8212acc9925b28ecd546b01047c6a8fc574326ef.tar.gz |
cleanup: break out event-related code into event.[c|h]
In an effort to reduce the size of dive.h and dive.c, break out
the event related functions. Moreover event-names were handled
by the profile-code, collect that also in the new source files.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'profile-widget')
-rw-r--r-- | profile-widget/diveeventitem.cpp | 4 | ||||
-rw-r--r-- | profile-widget/profilewidget2.cpp | 5 | ||||
-rw-r--r-- | profile-widget/tankitem.cpp | 1 |
3 files changed, 3 insertions, 7 deletions
diff --git a/profile-widget/diveeventitem.cpp b/profile-widget/diveeventitem.cpp index dcb4d8af0..33f909ecc 100644 --- a/profile-widget/diveeventitem.cpp +++ b/profile-widget/diveeventitem.cpp @@ -3,6 +3,7 @@ #include "qt-models/diveplotdatamodel.h" #include "profile-widget/divecartesianaxis.h" #include "profile-widget/animationfunctions.h" +#include "core/event.h" #include "core/libdivecomputer.h" #include "core/profile.h" #include "core/gettextfromc.h" @@ -12,9 +13,6 @@ #define DEPTH_NOT_FOUND (-2342) -extern struct ev_select *ev_namelist; -extern int evn_used; - DiveEventItem::DiveEventItem(QGraphicsItem *parent) : DivePixmapItem(parent), vAxis(NULL), hAxis(NULL), diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp index f3a636fe8..fb2dff744 100644 --- a/profile-widget/profilewidget2.cpp +++ b/profile-widget/profilewidget2.cpp @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 #include "profile-widget/profilewidget2.h" #include "qt-models/diveplotdatamodel.h" +#include "core/event.h" #include "core/subsurface-string.h" #include "core/qthelper.h" #include "core/picture.h" @@ -1377,10 +1378,6 @@ void ProfileWidget2::setPlanState() } #endif -extern struct ev_select *ev_namelist; -extern int evn_allocated; -extern int evn_used; - bool ProfileWidget2::isPlanner() { return currentState == PLAN; diff --git a/profile-widget/tankitem.cpp b/profile-widget/tankitem.cpp index 4967633ed..adf9ba99c 100644 --- a/profile-widget/tankitem.cpp +++ b/profile-widget/tankitem.cpp @@ -2,6 +2,7 @@ #include "profile-widget/tankitem.h" #include "qt-models/diveplotdatamodel.h" #include "profile-widget/divetextitem.h" +#include "core/event.h" #include "core/profile.h" #include <QPen> |