6 #include <QGuiApplication>
9 #include "ui_maininfoareacomponent.h"
20 CMainInfoAreaComponent::CMainInfoAreaComponent(QWidget *parent)
25 this->setWindowIcon(CIcons::swift64());
58 ui->comp_Log->displayLog();
66 const Qt::KeyboardModifiers km = QGuiApplication::queryKeyboardModifiers();
67 const bool shift = km.testFlag(Qt::ShiftModifier);
68 if (!shift) {
return; }
71 if (infoArea == InfoAreaSettings) { ui->comp_Settings->setSettingsOverviewTab(); }
72 else if (infoArea == InfoAreaAircraft) { ui->comp_Aircraft->setTab(CAircraftComponent::TabAircraftInRange); }
73 else if (infoArea == InfoAreaAtc) { ui->comp_AtcStations->setTab(CAtcStationComponent::TabAtcOnline); }
74 else if (infoArea ==
InfoAreaMapping) { ui->comp_Mappings->setTab(CMappingComponent::TabRenderedAircraft); }
85 case InfoAreaAircraft:
89 case InfoAreaSimulator:
91 case InfoAreaInterpolation:
92 case InfoAreaSettings:
93 case InfoAreaTextMessages:
94 case InfoAreaRadar:
return QSize(600, 400);
95 case InfoAreaFlightPlan:
return QSize(800, 600);
96 default:
return QSize(600, 400);
109 this->
selectArea(CMainInfoAreaComponent::InfoAreaCockpit);
117 case InfoAreaCockpit:
return CIcons::appCockpit16();
118 case InfoAreaUsers:
return CIcons::appUsers16();
119 case InfoAreaAtc:
return CIcons::appAtc16();
120 case InfoAreaAircraft:
return CIcons::appAircraft16();
121 case InfoAreaSettings:
return CIcons::appSettings16();
122 case InfoAreaFlightPlan:
return CIcons::appFlightPlan16();
123 case InfoAreaSimulator:
return CIcons::appSimulator16();
125 case InfoAreaLog:
return CIcons::appLog16();
126 case InfoAreaRadar:
return CIcons::appRadar16();
127 case InfoAreaTextMessages:
return CIcons::appTextMessages16();
128 case InfoAreaInterpolation:
return CIcons::appInterpolation16();
129 default:
return CIcons::empty();
Info area, hosting dockable widgets.
void selectArea(int areaIndex)
Select area.
void initInfoArea()
Init area after(!) GUI is initialized.
Cockpit component: COM unit, show / hide bar, voice rooms.
void showAudio()
Show the audio UI.
GUI displaying log and status messages.
void requestAttention()
Make me visible.
void showFilterDialog()
Show filter dialog and disable bar.
Main info area of pilot client.
CCockpitComponent * getCockpitComponent()
Cockpit.
CAtcStationComponent * getAtcStationComponent()
ATC stations.
void selectSettingsTab(int index)
Select settings with given area.
void selectArea(InfoArea infoArea)
Select area.
virtual QSize getPreferredSizeWhenFloating(int areaIndex) const
Preferred size when floating (size hint)
virtual ~CMainInfoAreaComponent()
Destructor.
void selectAudioTab()
Select the audio tab.
CUserComponent * getUserComponent()
User component.
@ InfoAreaMapping
aka rendering, models
CFlightPlanComponent * getFlightPlanComponent()
Flight plan.
void selectLog()
Select log.
CAircraftComponent * getAircraftComponent()
Aircrafts.
CMappingComponent * getMappingComponent()
Mappings.
CRadarComponent * getRadarComponent()
Radar.
void displayLog()
Display the log.
CSettingsComponent * getSettingsComponent()
Settings.
CInterpolationComponent * getInterpolationComponent()
Interpolation.
CLogComponent * getLogComponent()
Log messages.
CTextMessageComponent * getTextMessageComponent()
Text messages.
virtual const QPixmap & indexToPixmap(int areaIndex) const
Info area (index) to icon.
CSimulatorComponent * getSimulatorComponent()
Simulator.
GUI displaying a radar like view with aircrafts nearby.
User componenet (users, clients)
High level reusable GUI components.
Free functions in swift::misc.