subsurface/desktop-widgets/tab-widgets
Berthold Stoeger 6622f42aab Cylinders: Add CylindersModelFiltered
When the show_unused_cylinders flag is not set, the cylinder tables
in the equipment tab and the planner should not show unused cylinders.
However, the code in CylindersModel is fundamentally broken if the
unused cylinders are not at the end of the list: The correct number
of cylinders is shown, but not the correct cylinders.

Therefore, add a higher-level CylindersModelFiltered model on top
of CylindersModel that does the actual filtering. Some calls are
routed through to the base model (notably those that take indexes,
as these have to be mapped), for some calls the caller has to get
access to the source model first. We might want to adjust this.

For filtering, reuse the already existing show_cylinder function
and export it via CylindersModel.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-02-11 20:37:09 -08:00
..
maintab.cpp Cleanup: remove unnecessary remember/restoreSelection() pair 2019-12-04 13:00:23 +01:00
maintab.h Cleanup: lower-case filenames in core/subsurface-qt/ 2020-02-04 02:16:46 +01:00
maintab.ui Fixes in tab widget UI layout 2019-11-16 08:32:07 -08:00
TabBase.cpp Add SPDX header to desktop widgets 2017-04-29 13:32:55 -07:00
TabBase.h Add SPDX header to desktop widgets 2017-04-29 13:32:55 -07:00
TabDiveEquipment.cpp Cylinders: Add CylindersModelFiltered 2020-02-11 20:37:09 -08:00
TabDiveEquipment.h Cylinders: Add CylindersModelFiltered 2020-02-11 20:37:09 -08:00
TabDiveEquipment.ui Move the Suit text box from the Notes tab to the Equipment tab 2019-08-08 09:12:09 -07:00
TabDiveExtraInfo.cpp Desktop: don't connect to remove() slot of model from TableModel 2019-12-05 10:14:25 -08:00
TabDiveExtraInfo.h Cleanup: reinstate override modifiers 2018-09-29 15:23:25 -07:00
TabDiveExtraInfo.ui Cleanup: Move dive-equipment tab into own translation units 2019-04-15 10:30:04 +12:00
TabDiveInformation.cpp code cleanup: add missing initialization 2020-01-10 02:37:03 +09:00
TabDiveInformation.h Cleanup: lower-case filenames in core/subsurface-qt/ 2020-02-04 02:16:46 +01:00
TabDiveInformation.ui desktop UI: small cleanups of salinity code 2020-01-06 07:00:34 +09:00
TabDivePhotos.cpp Don't expose 'detach_buffer()' to membuffer users 2019-10-27 12:42:54 -07:00
TabDivePhotos.h Write dive data as video subtitles 2019-04-16 20:38:19 +02:00
TabDivePhotos.ui Implement different zoom levels for dive photos tab 2017-12-18 12:07:10 -08:00
TabDiveSite.cpp Cleanup: lower-case filenames in core/subsurface-qt/ 2020-02-04 02:16:46 +01:00
TabDiveSite.h Desktop: don't connect to remove() slot of model from TableModel 2019-12-05 10:14:25 -08:00
TabDiveSite.ui Dive sites: add fulltext filter 2019-04-12 18:19:07 +03:00
TabDiveStatistics.cpp Cleanup: use quotation marks for non-system includes 2019-12-04 13:00:23 +01:00
TabDiveStatistics.h Cleanup: lower-case filenames in core/subsurface-qt/ 2020-02-04 02:16:46 +01:00
TabDiveStatistics.ui Show average max depth in statistics tab 2018-12-17 12:18:26 +01:00