subsurface/desktop-widgets
Berthold Stoeger 2021035cfc selection: replace selectedTrips() by singleSelectedTrip() function
To check wether the tab widgets should show the trip view, they called
the selectedTrips() function. The trip view was shown if that contained
only one trip. However, the selectedTrips() function was very slow,
because it has to query to core models.

Change the function to singleSelectedTrip(), which returns a trip
if there is exactly one trip selected. The function returns early
if there is more than one trip selected. This makes the select-all
case much faster.

There are two cases which are still very slow:
- List mode, because here all top-level items are queried.
- Dive log with many only top-level items.

Ultimately, we will have to cache the trip selection because
querying the model is too slow.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-04-26 13:54:59 -07:00
..
css
preferences Typo fix: Programm to program 2020-03-22 12:01:59 -07:00
statistics
tab-widgets selection: replace selectedTrips() by singleSelectedTrip() function 2020-04-26 13:54:59 -07:00
about.cpp cleanup: update all copyright dates to 2020 2020-04-04 12:00:24 -07:00
about.h
about.ui
btdeviceselectiondialog.cpp
btdeviceselectiondialog.h Bluetooth: use standard Qt code on Windows 2018-09-30 08:09:37 -07:00
btdeviceselectiondialog.ui
CMakeLists.txt desktop: remove user survey 2020-04-19 14:27:54 -07:00
configuredivecomputerdialog.cpp
configuredivecomputerdialog.h Cleanup: reinstate override modifiers 2018-09-29 15:23:25 -07:00
configuredivecomputerdialog.ui
divecomponentselection.ui
divecomputermanagementdialog.cpp
divecomputermanagementdialog.h Cleanup: fold DiveComputerManagementDialog::update() into init() 2018-06-17 06:53:13 +09:00
divecomputermanagementdialog.ui
divelistview.cpp selection: replace selectedTrips() by singleSelectedTrip() function 2020-04-26 13:54:59 -07:00
divelistview.h selection: replace selectedTrips() by singleSelectedTrip() function 2020-04-26 13:54:59 -07:00
divelogexportdialog.cpp cleanup: replace constructs of the type &vector[0] by vector.data() 2020-04-21 07:50:38 -07:00
divelogexportdialog.h desktop-widgets: move export functions to shared class 2019-12-03 21:30:39 -08:00
divelogexportdialog.ui Reorganise and reword divelog export panel 2020-04-18 12:08:48 -07:00
divelogimportdialog.cpp Grammar: replaces 'indexes' by 'indices' 2020-03-11 08:26:30 -07:00
divelogimportdialog.h Import: Make DiveLogImportDialog modal 2018-10-04 10:22:11 +02:00
divelogimportdialog.ui
divepicturewidget.cpp Cleanup: remove unneeded QtConcurrent includes 2020-02-16 16:52:12 -08:00
divepicturewidget.h
diveplanner.cpp Planner: don't filter cylinders 2020-02-11 20:37:09 -08:00
diveplanner.h
diveplanner.ui Choose water presets from a qcombobox in planner, custom value possible 2018-03-02 08:38:22 -08:00
diveshareexportdialog.cpp
diveshareexportdialog.h
diveshareexportdialog.ui
divesiteimportdialog.cpp
divesiteimportdialog.h
divesiteimportdialog.ui
downloadfromdivecomputer.cpp mobile: unify download code on mobile and desktop 2020-03-10 09:25:57 -07:00
downloadfromdivecomputer.h
downloadfromdivecomputer.ui
filterwidget2.cpp filter: implement filtering for divemode 2020-04-24 10:05:27 -07:00
filterwidget2.h Filter: split out filter from model 2019-11-19 21:13:40 -08:00
filterwidget2.ui filter: implement filtering for divemode 2020-04-24 10:05:27 -07:00
findmovedimagesdialog.cpp media: move picture function from dive.c to picture.c 2020-04-10 10:53:03 -07:00
findmovedimagesdialog.h Dive pictures: implement FindMovedImagesDialog 2018-07-04 02:27:36 +08:00
findmovedimagesdialog.ui UI change of "images"/"photo" to "media" or "media files" 2018-07-15 09:38:12 -07:00
groupedlineedit.cpp
groupedlineedit.h
importgps.cpp
importgps.h core: move GPX parsing into core 2020-01-24 09:51:02 -08:00
importgps.ui Typo: UCT to UTC 2020-03-19 08:37:59 -07:00
kmessagewidget.cpp
kmessagewidget.h
listfilter.ui
locationinformation.cpp Dive site: don't save invalid GPS coordinates 2020-02-06 08:50:22 -08:00
locationinformation.h Dive site: give visual clue for invalid coordinates 2020-02-06 08:50:22 -08:00
locationinformation.ui
mainwindow.cpp cleanup: move clearing of event names to clear_dive_file_data() 2020-04-24 10:40:12 -07:00
mainwindow.h desktop: remove user survey 2020-04-19 14:27:54 -07:00
mainwindow.ui desktop: remove user survey 2020-04-19 14:27:54 -07:00
mapwidget.cpp map: call set_selection() core function to select dives 2020-04-25 13:20:25 -07:00
mapwidget.h Cleanup: lower-case filenames in core/subsurface-qt/ 2020-02-04 02:16:46 +01:00
modeldelegates.cpp delegates: remove TankInfoDelegate::createEditor() 2020-04-12 10:32:58 -07:00
modeldelegates.h delegates: remove TankInfoDelegate::createEditor() 2020-04-12 10:32:58 -07:00
notificationwidget.cpp
notificationwidget.h Use queued connection to thread-safe MainWindow error handling 2018-01-31 14:47:26 +01:00
plannerDetails.ui Bring back style sheet HTML for planner output 2017-02-24 01:06:09 -08:00
plannerSettings.ui Planner: Add option to treat O2 as narcotic 2019-10-31 00:30:38 -07:00
printdialog.cpp
printdialog.h Add the ability to export print template as html 2019-09-11 17:21:50 +01:00
printer.cpp
printer.h Add the ability to export print template as html 2019-09-11 17:21:50 +01:00
printoptions.cpp
printoptions.h
printoptions.ui
qtwaitingspinner.cpp
qtwaitingspinner.h
renumber.ui
searchbar.ui
setpoint.ui Use icons relative path. 2017-11-30 23:14:46 -08:00
shiftimagetimes.ui UI change of "images"/"photo" to "media" or "media files" 2018-07-15 09:38:12 -07:00
shifttimes.ui
simplewidgets.cpp undo: implement set point change undo command 2020-04-07 00:13:35 +02:00
simplewidgets.h undo: switch SetpointDialog from divecomputer to dive + dc-number 2020-04-07 00:13:35 +02:00
starwidget.cpp
starwidget.h Cleanup: reinstate override modifiers 2018-09-29 15:23:25 -07:00
subsurfacewebservices.cpp desktop: remove user survey 2020-04-19 14:27:54 -07:00
subsurfacewebservices.h desktop: remove user survey 2020-04-19 14:27:54 -07:00
tableview.cpp
tableview.h
tableview.ui
tagwidget.cpp
tagwidget.h Undo: implement undo of tag editing 2019-04-12 18:19:07 +03:00
templateedit.cpp
templateedit.h Add SPDX header to desktop widgets 2017-04-29 13:32:55 -07:00
templateedit.ui templateedit.ui: give the layout for "Border width" unique name 2017-03-12 09:19:03 -07:00
templatelayout.cpp
templatelayout.h Cleanup: lower-case filenames in core/subsurface-qt/ 2020-02-04 02:16:46 +01:00
textedit.cpp
textedit.h
updatemanager.cpp
updatemanager.h
urldialog.ui UI change of "images"/"photo" to "media" or "media files" 2018-07-15 09:38:12 -07:00
usermanual.cpp cleanup: split uiLanguage() in two functions 2020-03-22 12:01:09 -07:00
usermanual.h Remove partial support for QWebEngine 2019-03-20 08:45:02 -07:00
webservices.ui