From 106f7a8e0ed43a775bec5fa96f6e072c47653850 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Wed, 28 Oct 2020 12:23:41 +0100 Subject: desktop: add statistics widget dummy and application state Add a new "statistics" application state. In the statistics state show the statistics widget and the filter in the top quadrants. The idea is to allow filtering and doing statistics at the same time. Sadly, we can't use the filter-widget in different quadrants, because Qt's ownership model is completely broken / inflexible. It does not support a widget having different parents and thus a widget can only belong to one QStackedWidget. Hiding the map in the statistics view is quite hacky: Since the view of the quadrants is not determined by the "ApplicationState", we have to restore the original quadrant visibility when exiting the stats mode. Therefore, set the original visibility-state when changing application state. The MainWindow-quadrant code really needs to be rewritten! Signed-off-by: Berthold Stoeger --- core/applicationstate.cpp | 1 - core/applicationstate.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'core') diff --git a/core/applicationstate.cpp b/core/applicationstate.cpp index a5adde8cf..05701cd32 100644 --- a/core/applicationstate.cpp +++ b/core/applicationstate.cpp @@ -12,4 +12,3 @@ void setAppState(ApplicationState state) { appState = state; } - diff --git a/core/applicationstate.h b/core/applicationstate.h index fbaf3e829..5bae09aa4 100644 --- a/core/applicationstate.h +++ b/core/applicationstate.h @@ -12,6 +12,7 @@ enum class ApplicationState { EditPlannedDive, EditDiveSite, FilterDive, + Statistics, Count }; -- cgit v1.2.3-70-g09d2