diff --git a/src/blackgui/components/allmaininfoareacomponents.h b/src/blackgui/components/allmaininfoareacomponents.h new file mode 100644 index 000000000..5ddcb7b9c --- /dev/null +++ b/src/blackgui/components/allmaininfoareacomponents.h @@ -0,0 +1,23 @@ +/* Copyright (C) 2014 + * swift project Community / Contributors + * + * This file is part of swift Project. It is subject to the license terms in the LICENSE file found in the top-level + * directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project, + * including this file, may be copied, modified, propagated, or distributed except according to the terms + * contained in the LICENSE file. + */ + +#ifndef BLACKGUI_ALLMAININFOAREACOMPONENTS_H +#define BLACKGUI_ALLMAININFOAREACOMPONENTS_H + +#include "atcstationcomponent.h" +#include "aircraftcomponent.h" +#include "cockpitcomponent.h" +#include "usercomponent.h" +#include "textmessagecomponent.h" +#include "simulatorcomponent.h" +#include "flightplancomponent.h" +#include "settingscomponent.h" +#include "logcomponent.h" + +#endif // guard diff --git a/src/blackgui/components/maininfoareacomponent.cpp b/src/blackgui/components/maininfoareacomponent.cpp index ec4030935..57bb4178c 100644 --- a/src/blackgui/components/maininfoareacomponent.cpp +++ b/src/blackgui/components/maininfoareacomponent.cpp @@ -50,6 +50,11 @@ namespace BlackGui return this->ui->comp_Users; } + CCockpitComponent *CMainInfoAreaComponent::getCockpitComponent() + { + return this->ui->comp_Cockpit; + } + CFlightPlanComponent *CMainInfoAreaComponent::getFlightPlanComponent() { return this->ui->comp_FlightPlan; diff --git a/src/blackgui/components/maininfoareacomponent.h b/src/blackgui/components/maininfoareacomponent.h index 0feddd01f..0f80854f8 100644 --- a/src/blackgui/components/maininfoareacomponent.h +++ b/src/blackgui/components/maininfoareacomponent.h @@ -13,14 +13,7 @@ #define BLACKGUI_MAININFOAREACOMPONENT_H #include "../infoarea.h" -#include "atcstationcomponent.h" -#include "aircraftcomponent.h" -#include "usercomponent.h" -#include "textmessagecomponent.h" -#include "simulatorcomponent.h" -#include "flightplancomponent.h" -#include "settingscomponent.h" -#include "logcomponent.h" +#include "allmaininfoareacomponents.h" #include #include #include @@ -30,7 +23,6 @@ namespace BlackGui { namespace Components { - //! Main info area class CMainInfoAreaComponent : public BlackGui::CInfoArea { @@ -61,6 +53,9 @@ namespace BlackGui InfoAreaNone = -1 }; + //! Cockpit + CCockpitComponent *getCockpitComponent(); + //! ATC stations CAtcStationComponent *getAtcStationComponent(); @@ -85,9 +80,6 @@ namespace BlackGui //! Text messages CTextMessageComponent *getTextMessageComponent(); - //! Selected area of non floating areas -// InfoArea getSelectedInfoArea() const { return static_cast(getSelectedTabBarIndex()); } - public slots: //! Toggle floating of given area void toggleFloating(InfoArea infoArea) { CInfoArea::toggleFloating(static_cast(infoArea)); }