From 59e602447b951cfdfabd8f0a067dfb8c804ee506 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Tue, 12 Mar 2019 00:25:31 +0100 Subject: Dive site: inform model of dive site addition / deletion Introduce two DiveListNotifier signals which are sent by the undo commands if dives are added to / removed from the core. The signal has the dive site and the index in the global dive site table as payload. Thus, the model has only to remove the appropriate rows. Signed-off-by: Berthold Stoeger --- core/subsurface-qt/DiveListNotifier.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'core/subsurface-qt') diff --git a/core/subsurface-qt/DiveListNotifier.h b/core/subsurface-qt/DiveListNotifier.h index 124bde127..41a964955 100644 --- a/core/subsurface-qt/DiveListNotifier.h +++ b/core/subsurface-qt/DiveListNotifier.h @@ -43,7 +43,10 @@ signals: void currentDiveChanged(); void selectionChanged(); - // Dive site signals + // Dive site signals. Add and delete events are sent per dive site and + // provide an index into the global dive site table. + void diveSiteAdded(dive_site *ds, int idx); + void diveSiteDeleted(dive_site *ds, int idx); void diveSiteDiveCountChanged(dive_site *ds); public: // Desktop uses the QTreeView class to present the list of dives. The layout -- cgit v1.2.3-70-g09d2