subsurface/profile-widget
Berthold Stoeger c5f66c5538 Dive media: transport dive-id in drag'n'drop events
9efb56e2d4 introduced rather complex
logic for picture drag'n'drop events onto the profile. Among other
things, the code had to check whether the picture actually belongs
to the displayed dive.

This can be simplified by transporting the dive-id in the drag'n'drop
event structure. The flow goes like this:
DivePictureModel--(1)-->DivePictureWidget--(2)-->ProfileWidget

For (1), we can use the Qt::UserRole role. This was used to transport
the picture-offset, but this is not needed anymore since ProfileWidget
was decoupled from DivePictureModel.

For (2), we simply replace the "position" value, which was never used.
Why would the receiver care which pixel was pressed in the media-tab?

This commit also contains a minor cleanup in DivePictureWidget:
QListView::mousePressEvent(event) was called in both branches of an
if and can therefore be removed from the if. This is so trivial,
that it doesn't warrant its own commit.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-07-18 09:06:37 -07:00
..
animationfunctions.cpp Profile: Fix leak in animation 2018-05-19 07:48:28 -07:00
animationfunctions.h Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
CMakeLists.txt Correctly handle SubsurfaceMobile 2016-01-08 08:04:24 -08:00
divecartesianaxis.cpp Cleanup: fold core/helpers.h into core/qthelper.h 2018-06-04 08:50:10 -07:00
divecartesianaxis.h Typo: indice -> index 2018-01-10 21:25:02 +01:00
diveeventitem.cpp Change from gettextFromC::instance()->tr() to gettextFromC::tr(); 2018-06-18 07:42:39 +02:00
diveeventitem.h Dive pictures: remove close-button optimization 2018-05-13 13:52:35 -07:00
divelineitem.cpp Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
divelineitem.h Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
divepixmapitem.cpp Dive picture: fix toggling of picture-visibility 2018-06-04 10:28:08 -07:00
divepixmapitem.h Dive pictures: Fix crash on picture delete 2018-05-17 07:22:04 -07:00
diveprofileitem.cpp Cleanup: fold core/helpers.h into core/qthelper.h 2018-06-04 08:50:10 -07:00
diveprofileitem.h Typo: Threshould -> Threshold 2018-01-10 21:25:02 +01:00
diverectitem.cpp Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
diverectitem.h Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
divetextitem.cpp Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
divetextitem.h Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
divetooltipitem.cpp profile-widget: Change Q_UNUSED to no parameter name 2018-05-21 12:48:04 -07:00
divetooltipitem.h code cleanup: remove unimplemented classes and structs 2017-06-16 05:31:41 +09:00
profilewidget2.cpp Dive media: transport dive-id in drag'n'drop events 2018-07-18 09:06:37 -07:00
profilewidget2.h Dive pictures: don't update all images on drag&drop to profile 2018-07-13 17:07:42 -07:00
qmlprofile.cpp profile: make profile self contained 2018-06-09 17:16:53 +02:00
qmlprofile.h profile: make profile self contained 2018-06-09 17:16:53 +02:00
ruleritem.cpp Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
ruleritem.h Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
tankitem.cpp profile-widget: Change Q_UNUSED to no parameter name 2018-05-21 12:48:04 -07:00
tankitem.h cleanup: Uninitialized pointer field 2017-12-29 09:14:20 -08:00