mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Create a new state for the MainWindow: EditDiveSite
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
3516ff2ab2
commit
e3d800885f
2 changed files with 8 additions and 1 deletions
|
@ -67,12 +67,15 @@ MainWindow::MainWindow() : QMainWindow(),
|
||||||
PlannerSettingsWidget *plannerSettings = new PlannerSettingsWidget();
|
PlannerSettingsWidget *plannerSettings = new PlannerSettingsWidget();
|
||||||
DivePlannerWidget *plannerWidget = new DivePlannerWidget();
|
DivePlannerWidget *plannerWidget = new DivePlannerWidget();
|
||||||
PlannerDetails *plannerDetails = new PlannerDetails();
|
PlannerDetails *plannerDetails = new PlannerDetails();
|
||||||
|
LocationInformationWidget *locationInformation = new LocationInformationWidget();
|
||||||
|
|
||||||
registerApplicationState("Default", mainTab, profileWidget, diveListView, globeGps );
|
registerApplicationState("Default", mainTab, profileWidget, diveListView, globeGps );
|
||||||
registerApplicationState("AddDive", mainTab, profileWidget, diveListView, globeGps );
|
registerApplicationState("AddDive", mainTab, profileWidget, diveListView, globeGps );
|
||||||
registerApplicationState("EditDive", mainTab, profileWidget, diveListView, globeGps );
|
registerApplicationState("EditDive", mainTab, profileWidget, diveListView, globeGps );
|
||||||
registerApplicationState("PlanDive", plannerWidget, profileWidget, plannerSettings, plannerDetails );
|
registerApplicationState("PlanDive", plannerWidget, profileWidget, plannerSettings, plannerDetails );
|
||||||
registerApplicationState("EditPlannedDive", plannerWidget, profileWidget, diveListView, globeGps );
|
registerApplicationState("EditPlannedDive", plannerWidget, profileWidget, diveListView, globeGps );
|
||||||
|
registerApplicationState("EditDiveSite",locationInformation, profileWidget, diveListView, globeGps );
|
||||||
|
|
||||||
setApplicationState("Default");
|
setApplicationState("Default");
|
||||||
|
|
||||||
ui.multiFilter->hide();
|
ui.multiFilter->hide();
|
||||||
|
@ -205,6 +208,10 @@ PlannerSettingsWidget *MainWindow::divePlannerSettingsWidget() {
|
||||||
return qobject_cast<PlannerSettingsWidget*>(applicationState["PlanDive"].bottomLeft);
|
return qobject_cast<PlannerSettingsWidget*>(applicationState["PlanDive"].bottomLeft);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LocationInformationWidget *MainWindow::locationInformationWidget() {
|
||||||
|
return qobject_cast<LocationInformationWidget*>(applicationState["EditDiveSite"].topLeft);
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::setLoadedWithFiles(bool f)
|
void MainWindow::setLoadedWithFiles(bool f)
|
||||||
{
|
{
|
||||||
filesAsArguments = f;
|
filesAsArguments = f;
|
||||||
|
|
|
@ -68,7 +68,7 @@ public:
|
||||||
GlobeGPS *globe();
|
GlobeGPS *globe();
|
||||||
DivePlannerWidget *divePlannerWidget();
|
DivePlannerWidget *divePlannerWidget();
|
||||||
PlannerSettingsWidget *divePlannerSettingsWidget();
|
PlannerSettingsWidget *divePlannerSettingsWidget();
|
||||||
|
LocationInformationWidget *locationInformationWidget();
|
||||||
void showError(QString message);
|
void showError(QString message);
|
||||||
void setTitle(enum MainWindowTitleFormat format);
|
void setTitle(enum MainWindowTitleFormat format);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue