From 8378695d7f79c3ca15634b28ed411484426aac88 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Sat, 13 Oct 2018 12:47:10 +0200 Subject: Start the FilterDive state Register the new FilterDive widget on the mainwindow so we can trigger a shortcut to display it. The shortcut currently doesn't exists. Signed-off-by: Tomaz Canabrava --- desktop-widgets/mainwindow.cpp | 6 ++++-- desktop-widgets/mainwindow.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp index 99942ec56..3eb89f152 100644 --- a/desktop-widgets/mainwindow.cpp +++ b/desktop-widgets/mainwindow.cpp @@ -53,6 +53,7 @@ #include "desktop-widgets/tab-widgets/maintab.h" #include "desktop-widgets/updatemanager.h" #include "desktop-widgets/usersurvey.h" +#include "desktop-widgets/filterwidget2.h" #include "profile-widget/profilewidget2.h" @@ -141,10 +142,10 @@ MainWindow::MainWindow() : QMainWindow(), diveList = new DiveListView(this); graphics = new ProfileWidget2(this); MapWidget *mapWidget = MapWidget::instance(); - divePlannerSettingsWidget = new PlannerSettingsWidget(this); divePlannerWidget = new DivePlannerWidget(this); plannerDetails = new PlannerDetails(this); + auto *filterWidget2 = new FilterWidget2(); // what is a sane order for those icons? we should have the ones the user is // most likely to want towards the top so they are always visible @@ -193,6 +194,7 @@ MainWindow::MainWindow() : QMainWindow(), registerApplicationState("PlanDive", divePlannerWidget, profileContainer, divePlannerSettingsWidget, plannerDetails ); registerApplicationState("EditPlannedDive", divePlannerWidget, profileContainer, diveList, mapWidget ); registerApplicationState("EditDiveSite", diveSiteEdit, profileContainer, diveList, mapWidget); + registerApplicationState("FilterDive", mainTab, profileContainer, diveList, filterWidget2); setStateProperties("Default", enabledList, enabledList, enabledList,enabledList); setStateProperties("AddDive", enabledList, enabledList, enabledList,enabledList); @@ -200,7 +202,7 @@ MainWindow::MainWindow() : QMainWindow(), setStateProperties("PlanDive", enabledList, enabledList, enabledList,enabledList); setStateProperties("EditPlannedDive", enabledList, enabledList, enabledList,enabledList); setStateProperties("EditDiveSite", enabledList, disabledList, disabledList, enabledList); - + setStateProperties("FilterDive", enabledList, enabledList, enabledList, enabledList); setApplicationState("Default"); ui.multiFilter->hide(); diff --git a/desktop-widgets/mainwindow.h b/desktop-widgets/mainwindow.h index be35ecf1e..03f87ab7b 100644 --- a/desktop-widgets/mainwindow.h +++ b/desktop-widgets/mainwindow.h @@ -35,6 +35,7 @@ class ProfileWidget2; class PlannerDetails; class PlannerSettingsWidget; class LocationInformationWidget; +class FilterWidget2; typedef std::pair WidgetProperty; typedef QVector PropertyList; -- cgit v1.2.3-70-g09d2