summaryrefslogtreecommitdiffstats
path: root/profile-widget/profilewidget2.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-12-20 18:29:57 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2021-01-10 15:57:39 -0800
commitb0f374c5c9764fea8ed9f170576714f58366b4df (patch)
treedf9a999a8de13dcf6dc6617470dfa4de724a2149 /profile-widget/profilewidget2.h
parent3f100fda0ac4848f5ddf1793b7b1f3a03c97ccd9 (diff)
downloadsubsurface-b0f374c5c9764fea8ed9f170576714f58366b4df.tar.gz
profile: move allocation of DiveProfileItems into a template
Instead of typing out the same arguments again and again, do the allocation of DiveProfileItems in a templated function. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'profile-widget/profilewidget2.h')
-rw-r--r--profile-widget/profilewidget2.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/profile-widget/profilewidget2.h b/profile-widget/profilewidget2.h
index ff70c4c0e..19fac368b 100644
--- a/profile-widget/profilewidget2.h
+++ b/profile-widget/profilewidget2.h
@@ -152,6 +152,7 @@ private:
void fixBackgroundPos();
void scrollViewTo(const QPoint &pos);
void setupSceneAndFlags();
+ template<typename T, class... Args> T *createItem(const DiveCartesianAxis &vAxis, int vColumn, Args&&... args);
void setupItemSizes();
void addItemsToScene();
void setupItemOnScene();