diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-03-12 17:28:43 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-04-12 18:19:07 +0300 |
commit | e99c4c90592c9dba17d5cbb9a99d0bf458fb53d2 (patch) | |
tree | 07eb474520f6565cf685559eb19e0c97638d7345 /desktop-widgets/tab-widgets/TabDiveSite.h | |
parent | 59f1191d0cbbb9bf7d049bfd8bd0fe544ecb40f0 (diff) | |
download | subsurface-e99c4c90592c9dba17d5cbb9a99d0bf458fb53d2.tar.gz |
Dive site: introduce proxy model DiveSiteSortedModel
The LocationInformationModel used to sort its entries and was completely
rebuilt after every change. This makes it rather complex to support
incremental changes.
Instead, keep LocationInformationModel sorted by UUID so that indexes
are consistent with indices in the core dive site table.
Implement sorting by other columns than name and enable sorting in the
dive site view.
Finally, don't cache the list of dive site names for the mobile app,
since that would also need some rather convoluted methods of keeping
the list up to date. Calculate it on the fly.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/tab-widgets/TabDiveSite.h')
-rw-r--r-- | desktop-widgets/tab-widgets/TabDiveSite.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/desktop-widgets/tab-widgets/TabDiveSite.h b/desktop-widgets/tab-widgets/TabDiveSite.h index 60b3abd76..f0bf2d5d5 100644 --- a/desktop-widgets/tab-widgets/TabDiveSite.h +++ b/desktop-widgets/tab-widgets/TabDiveSite.h @@ -4,6 +4,7 @@ #include "TabBase.h" #include "ui_TabDiveSite.h" +#include "qt-models/divelocationmodel.h" class TabDiveSite : public TabBase { Q_OBJECT @@ -13,6 +14,7 @@ public: void clear() override; private: Ui::TabDiveSite ui; + DiveSiteSortedModel model; }; #endif |