subsurface/qt-models
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
..
cleanertablemodel.cpp qt-models: Change Q_UNUSED to no parameter name 2018-05-21 12:48:04 -07:00
cleanertablemodel.h Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
CMakeLists.txt Corrected file name "weigthsysteminfomodel" to "weightsysteminfomodel" 2018-05-11 02:23:51 +03:00
completionmodels.cpp Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
completionmodels.h Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
cylindermodel.cpp Localization: remove gettextFromC::instance() 2018-06-24 20:31:14 +02:00
cylindermodel.h Planner: Autom. move first datapoint gas to first gaslist position 2017-10-16 17:14:17 +02:00
divecomputerextradatamodel.cpp qt-models: Change Q_UNUSED to no parameter name 2018-05-21 12:48:04 -07:00
divecomputerextradatamodel.h Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
divecomputermodel.cpp Dive computers: turn QMultiMap into sorted vector 2018-06-17 06:53:13 +09:00
divecomputermodel.h Dive computers: turn QMultiMap into sorted vector 2018-06-17 06:53:13 +09:00
diveimportedmodel.cpp Cleanup: fold core/helpers.h into core/qthelper.h 2018-06-04 08:50:10 -07:00
diveimportedmodel.h Core: remove dive.h from files that don't need it 2018-05-14 10:13:39 -07:00
divelistmodel.cpp QML UI: correctly update the model 2018-06-25 20:20:35 +08:00
divelistmodel.h Cleanup: fold core/helpers.h into core/qthelper.h 2018-06-04 08:50:10 -07:00
divelocationmodel.cpp Localization: remove gettextFromC::instance() 2018-06-24 20:31:14 +02:00
divelocationmodel.h mobile cleanup: restyle construction of locationlist 2018-01-31 14:48:14 +01:00
divepicturemodel.cpp Dive media: transport dive-id in drag'n'drop events 2018-07-18 09:06:37 -07:00
divepicturemodel.h Dive pictures: don't update all images on drag&drop to profile 2018-07-13 17:07:42 -07:00
diveplannermodel.cpp Fix dive mode drop-down in planner for re-planned dive 2018-07-13 11:26:28 -07:00
diveplannermodel.h Copy divemode to Replan 2018-06-24 09:35:55 +02:00
diveplotdatamodel.cpp qt-models: Change Q_UNUSED to no parameter name 2018-05-21 12:48:04 -07:00
diveplotdatamodel.h Plot OC-pO2 graph for SCR dives 2018-04-28 20:11:22 +03:00
divetripmodel.cpp UI change of "images"/"photo" to "media" or "media files" 2018-07-15 09:38:12 -07:00
divetripmodel.h Add "Tags" column in Desktop app's dive list view 2018-04-04 14:10:45 +03:00
filtermodels.cpp qt-models: Change Q_UNUSED to no parameter name 2018-05-21 12:48:04 -07:00
filtermodels.h Introduce negate-toggle buttons to filter lists 2017-12-26 13:08:49 -08:00
gpslistmodel.cpp Cleanup: fold core/helpers.h into core/qthelper.h 2018-06-04 08:50:10 -07:00
gpslistmodel.h Unused code: GpsListModel::addGpsFix() 2018-01-10 16:45:42 +01:00
maplocationmodel.cpp qt-models: Change Q_UNUSED to no parameter name 2018-05-21 12:48:04 -07:00
maplocationmodel.h map-widget: allow real-time updates of edited markers 2017-11-09 12:40:25 -08:00
messagehandlermodel.cpp qt-models: Change Q_UNUSED to no parameter name 2018-05-21 12:48:04 -07:00
messagehandlermodel.h mobile: add "Copy log to clipboard" button 2018-05-18 12:43:15 -07:00
models.cpp Change from gettextFromC::instance()->tr() to gettextFromC::tr(); 2018-06-18 07:42:39 +02:00
models.h Planner: Add combo box for dive mode selection 2018-05-14 23:47:00 +03:00
ssrfsortfilterproxymodel.cpp Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
ssrfsortfilterproxymodel.h Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
tankinfomodel.cpp equipment: sanitize 'tank_info' loop limits 2018-06-20 09:30:58 +09:00
tankinfomodel.h Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
treemodel.cpp qt-models: Change Q_UNUSED to no parameter name 2018-05-21 12:48:04 -07:00
treemodel.h Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
weightmodel.cpp equipment: sanitize 'ws_info' loop limits 2018-06-20 09:30:58 +09:00
weightmodel.h Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
weightsysteminfomodel.cpp equipment: sanitize 'ws_info' loop limits 2018-06-20 09:30:58 +09:00
weightsysteminfomodel.h Corrected file name "weigthsysteminfomodel" to "weightsysteminfomodel" 2018-05-11 02:23:51 +03:00
yearlystatisticsmodel.cpp Cleanup: fold core/helpers.h into core/qthelper.h 2018-06-04 08:50:10 -07:00
yearlystatisticsmodel.h Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00