mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-20 06:45:27 +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();
|
||||
DivePlannerWidget *plannerWidget = new DivePlannerWidget();
|
||||
PlannerDetails *plannerDetails = new PlannerDetails();
|
||||
LocationInformationWidget *locationInformation = new LocationInformationWidget();
|
||||
|
||||
registerApplicationState("Default", mainTab, profileWidget, diveListView, globeGps );
|
||||
registerApplicationState("AddDive", mainTab, profileWidget, diveListView, globeGps );
|
||||
registerApplicationState("EditDive", mainTab, profileWidget, diveListView, globeGps );
|
||||
registerApplicationState("PlanDive", plannerWidget, profileWidget, plannerSettings, plannerDetails );
|
||||
registerApplicationState("EditPlannedDive", plannerWidget, profileWidget, diveListView, globeGps );
|
||||
registerApplicationState("EditDiveSite",locationInformation, profileWidget, diveListView, globeGps );
|
||||
|
||||
setApplicationState("Default");
|
||||
|
||||
ui.multiFilter->hide();
|
||||
|
@ -205,6 +208,10 @@ PlannerSettingsWidget *MainWindow::divePlannerSettingsWidget() {
|
|||
return qobject_cast<PlannerSettingsWidget*>(applicationState["PlanDive"].bottomLeft);
|
||||
}
|
||||
|
||||
LocationInformationWidget *MainWindow::locationInformationWidget() {
|
||||
return qobject_cast<LocationInformationWidget*>(applicationState["EditDiveSite"].topLeft);
|
||||
}
|
||||
|
||||
void MainWindow::setLoadedWithFiles(bool f)
|
||||
{
|
||||
filesAsArguments = f;
|
||||
|
|
|
@ -68,7 +68,7 @@ public:
|
|||
GlobeGPS *globe();
|
||||
DivePlannerWidget *divePlannerWidget();
|
||||
PlannerSettingsWidget *divePlannerSettingsWidget();
|
||||
|
||||
LocationInformationWidget *locationInformationWidget();
|
||||
void showError(QString message);
|
||||
void setTitle(enum MainWindowTitleFormat format);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue