summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2018-10-13 12:47:10 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-12-14 01:05:18 +0800
commit8378695d7f79c3ca15634b28ed411484426aac88 (patch)
treef7701f55a69c5c08f05e1682a66cacf7e6685bf8
parent19f6e8810cdaedcbecd87aa762c75e59bebe26c9 (diff)
downloadsubsurface-8378695d7f79c3ca15634b28ed411484426aac88.tar.gz
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 <tcanabrava@kde.org>
-rw-r--r--desktop-widgets/mainwindow.cpp6
-rw-r--r--desktop-widgets/mainwindow.h1
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<QByteArray, QVariant> WidgetProperty;
typedef QVector<WidgetProperty> PropertyList;