From aafff6cd8256d586a6426e687d07abbb78c935af Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Fri, 2 Sep 2016 19:39:08 +0200 Subject: [PATCH] Formatting this->ui to ui --- src/blackcore/network.h | 2 - .../aircraftcombinedtypeselector.cpp | 10 +- src/blackgui/components/aircraftcomponent.cpp | 38 +++--- .../components/atcstationcomponent.cpp | 98 +++++++-------- .../components/audiosetupcomponent.cpp | 38 +++--- .../components/audiovolumecomponent.cpp | 36 +++--- .../components/cockpitcomcomponent.cpp | 110 ++++++++-------- src/blackgui/components/colorselector.cpp | 22 ++-- .../components/coreinfoareacomponent.cpp | 4 +- .../components/datainfoareacomponent.cpp | 26 ++-- .../components/datamaininfoareacomponent.cpp | 6 +- .../components/dbaircrafticaocomponent.cpp | 14 +-- .../dbaircrafticaoselectorcomponent.cpp | 16 +-- .../components/dbairlineicaocomponent.cpp | 14 +-- .../dbairlineicaoselectorcomponent.cpp | 14 +-- .../dbairlinenameselectorcomponent.cpp | 12 +- .../components/dbcountrycomponent.cpp | 12 +- .../components/dbcountryselectorcomponent.cpp | 38 +++--- .../components/dbdistributorcomponent.cpp | 10 +- .../dbdistributorselectorcomponent.cpp | 20 +-- src/blackgui/components/dbliverycomponent.cpp | 12 +- .../components/dbliveryselectorcomponent.cpp | 22 ++-- src/blackgui/components/dbmodelcomponent.cpp | 28 ++--- .../dbmodelmappingmodifycomponent.cpp | 2 +- .../components/dbownmodelscomponent.cpp | 12 +- .../components/dbownmodelsetcomponent.cpp | 16 +-- .../components/infobarstatuscomponent.cpp | 56 ++++----- .../components/internalscomponent.cpp | 100 +++++++-------- src/blackgui/components/logcomponent.cpp | 20 +-- .../components/maininfoareacomponent.cpp | 26 ++-- .../components/mainkeypadareacomponent.cpp | 68 +++++----- src/blackgui/components/mappingcomponent.cpp | 118 +++++++++--------- .../components/modelmatchercomponent.cpp | 2 +- src/blackgui/components/navigatordialog.cpp | 10 +- src/blackgui/components/registercomponent.cpp | 2 +- .../components/remoteaircraftselector.cpp | 8 +- .../settingsnetworkserverscomponent.cpp | 22 ++-- .../components/settingssimulatorcomponent.cpp | 74 +++++------ .../components/simulatorcomponent.cpp | 12 +- src/blackgui/components/simulatorselector.cpp | 70 +++++------ .../components/textmessagecomponent.cpp | 80 ++++++------ src/blackgui/components/usercomponent.cpp | 28 ++--- .../components/voiceroomscomponent.cpp | 42 +++---- src/blackgui/editors/aircrafticaoform.cpp | 90 ++++++------- src/blackgui/editors/airlineicaoform.cpp | 68 +++++----- src/blackgui/editors/distributorform.cpp | 46 +++---- src/blackgui/editors/modelmappingform.cpp | 18 +-- .../editors/modelmappingmodifyform.cpp | 8 +- src/blackgui/editors/serverform.cpp | 54 ++++---- .../filters/aircrafticaofilterbar.cpp | 24 ++-- .../filters/aircraftmodelfilterbar.cpp | 66 +++++----- src/blackgui/filters/airlineicaofilterbar.cpp | 32 ++--- src/blackgui/filters/countryfilterbar.cpp | 6 +- src/blackgui/filters/filterbarbuttons.cpp | 14 +-- src/blackgui/filters/liveryfilterbar.cpp | 24 ++-- src/blackgui/guiapplication.cpp | 2 +- src/blackgui/loginmodebuttons.cpp | 10 +- src/blackgui/overlaymessages.cpp | 72 +++++------ src/blackgui/showhidebar.cpp | 4 +- .../fsxconfig/simconnectsettingscomponent.cpp | 4 +- src/swiftcore/swiftcore.cpp | 10 +- src/swiftdata/swiftdata.cpp | 26 ++-- src/swiftdata/swiftdatamenus.cpp | 28 ++--- src/swiftguistandard/swiftguistd.cpp | 32 ++--- src/swiftguistandard/swiftguistdinit.cpp | 108 ++++++++-------- src/swiftguistandard/swiftguistdmenus.cpp | 32 ++--- src/swiftlauncher/swiftlauncher.cpp | 80 ++++++------ 67 files changed, 1113 insertions(+), 1115 deletions(-) diff --git a/src/blackcore/network.h b/src/blackcore/network.h index 444b34f2c..dbf2026d9 100644 --- a/src/blackcore/network.h +++ b/src/blackcore/network.h @@ -35,7 +35,6 @@ namespace BlackCore { - /*! * Interface for a connection to a multi-user flight simulation and ATC network. * @@ -534,7 +533,6 @@ namespace BlackCore //! @} }; - } // namespace Q_DECLARE_METATYPE(BlackCore::INetwork::ConnectionStatus) diff --git a/src/blackgui/components/aircraftcombinedtypeselector.cpp b/src/blackgui/components/aircraftcombinedtypeselector.cpp index ba03e9968..f14e5cec1 100644 --- a/src/blackgui/components/aircraftcombinedtypeselector.cpp +++ b/src/blackgui/components/aircraftcombinedtypeselector.cpp @@ -49,11 +49,11 @@ namespace BlackGui if (cc.length() > 1) { engineCount = cc.mid(1, 1); } if (cc.length() > 2) { engineType = cc.mid(2, 1); } - CGuiUtility::setComboBoxValueByStartingString(this->ui->cb_EngineCount, engineCount, "unspecified"); - CGuiUtility::setComboBoxValueByStartingString(this->ui->cb_EngineType, engineType, "unspecified"); - CGuiUtility::setComboBoxValueByStartingString(this->ui->cb_Type, aircraftType, "unspecified"); + CGuiUtility::setComboBoxValueByStartingString(ui->cb_EngineCount, engineCount, "unspecified"); + CGuiUtility::setComboBoxValueByStartingString(ui->cb_EngineType, engineType, "unspecified"); + CGuiUtility::setComboBoxValueByStartingString(ui->cb_Type, aircraftType, "unspecified"); - this->ui->le_CombinedType->setText(cc); + ui->le_CombinedType->setText(cc); } void CAircraftCombinedTypeSelector::setCombinedType(const BlackMisc::Aviation::CAircraftIcaoCode &icao) @@ -64,7 +64,7 @@ namespace BlackGui void CAircraftCombinedTypeSelector::clear() { this->setCombinedType(""); - this->ui->le_CombinedType->clear(); + ui->le_CombinedType->clear(); } void CAircraftCombinedTypeSelector::setReadOnly(bool readOnly) diff --git a/src/blackgui/components/aircraftcomponent.cpp b/src/blackgui/components/aircraftcomponent.cpp index f9029b6ab..67a3ee5f7 100644 --- a/src/blackgui/components/aircraftcomponent.cpp +++ b/src/blackgui/components/aircraftcomponent.cpp @@ -45,15 +45,15 @@ namespace BlackGui ui->setupUi(this); this->tabBar()->setExpanding(false); this->tabBar()->setUsesScrollButtons(true); - this->ui->tvp_AirportsInRange->setResizeMode(CAirportView::ResizingOnce); + ui->tvp_AirportsInRange->setResizeMode(CAirportView::ResizingOnce); - this->ui->tvp_AircraftInRange->setAircraftMode(CSimulatedAircraftListModel::InfoMode); - this->ui->tvp_AircraftInRange->configureMenu(true, false, false); + ui->tvp_AircraftInRange->setAircraftMode(CSimulatedAircraftListModel::InfoMode); + ui->tvp_AircraftInRange->configureMenu(true, false, false); - connect(this->ui->tvp_AircraftInRange, &CSimulatedAircraftView::modelDataChanged, this, &CAircraftComponent::ps_onRowCountChanged); - connect(this->ui->tvp_AircraftInRange, &CSimulatedAircraftView::requestTextMessageWidget, this, &CAircraftComponent::requestTextMessageWidget); - connect(this->ui->tvp_AircraftInRange, &CSimulatedAircraftView::requestHighlightInSimulator, this, &CAircraftComponent::ps_onMenuHighlightInSimulator); - connect(this->ui->tvp_AirportsInRange, &CSimulatedAircraftView::modelDataChanged, this, &CAircraftComponent::ps_onRowCountChanged); + connect(ui->tvp_AircraftInRange, &CSimulatedAircraftView::modelDataChanged, this, &CAircraftComponent::ps_onRowCountChanged); + connect(ui->tvp_AircraftInRange, &CSimulatedAircraftView::requestTextMessageWidget, this, &CAircraftComponent::requestTextMessageWidget); + connect(ui->tvp_AircraftInRange, &CSimulatedAircraftView::requestHighlightInSimulator, this, &CAircraftComponent::ps_onMenuHighlightInSimulator); + connect(ui->tvp_AirportsInRange, &CSimulatedAircraftView::modelDataChanged, this, &CAircraftComponent::ps_onRowCountChanged); connect(sGui->getIContextNetwork(), &IContextNetwork::connectionStatusChanged, this, &CAircraftComponent::ps_connectionStatusChanged); } @@ -62,14 +62,14 @@ namespace BlackGui int CAircraftComponent::countAircraft() const { - Q_ASSERT(this->ui->tvp_AircraftInRange); - return this->ui->tvp_AircraftInRange->rowCount(); + Q_ASSERT(ui->tvp_AircraftInRange); + return ui->tvp_AircraftInRange->rowCount(); } int CAircraftComponent::countAirportsInRange() const { - Q_ASSERT(this->ui->tvp_AirportsInRange); - return this->ui->tvp_AirportsInRange->rowCount(); + Q_ASSERT(ui->tvp_AirportsInRange); + return ui->tvp_AirportsInRange->rowCount(); } bool CAircraftComponent::setParentDockWidgetInfoArea(CDockWidgetInfoArea *parentDockableWidget) @@ -83,24 +83,24 @@ namespace BlackGui void CAircraftComponent::update() { - Q_ASSERT(this->ui->tvp_AircraftInRange); + Q_ASSERT(ui->tvp_AircraftInRange); Q_ASSERT(sGui->getIContextNetwork()); Q_ASSERT(sGui->getIContextSimulator()); if (sGui->getIContextNetwork()->isConnected()) { - bool visible = (this->isVisibleWidget() && this->currentWidget() == this->ui->tb_AircraftInRange); + bool visible = (this->isVisibleWidget() && this->currentWidget() == ui->tb_AircraftInRange); if (this->countAircraft() < 1 || visible) { - this->ui->tvp_AircraftInRange->updateContainer(sGui->getIContextNetwork()->getAircraftInRange()); + ui->tvp_AircraftInRange->updateContainer(sGui->getIContextNetwork()->getAircraftInRange()); } } if (sGui->getIContextSimulator()->getSimulatorStatus() > 0) { - bool visible = (this->isVisibleWidget() && this->currentWidget() == this->ui->tb_AirportsInRange); + bool visible = (this->isVisibleWidget() && this->currentWidget() == ui->tb_AirportsInRange); if (this->countAirportsInRange() < 1 || visible) { - this->ui->tvp_AirportsInRange->updateContainer(sGui->getIContextSimulator()->getAirportsInRange()); + ui->tvp_AirportsInRange->updateContainer(sGui->getIContextSimulator()->getAirportsInRange()); } } } @@ -121,8 +121,8 @@ namespace BlackGui { Q_UNUSED(count); Q_UNUSED(withFilter); - int ac = this->indexOf(this->ui->tb_AircraftInRange); - int ap = this->indexOf(this->ui->tb_AirportsInRange); + int ac = this->indexOf(ui->tb_AircraftInRange); + int ap = this->indexOf(ui->tb_AirportsInRange); QString acs = this->tabBar()->tabText(ac); QString aps = this->tabBar()->tabText(ap); acs = CGuiUtility::replaceTabCountValue(acs, this->countAircraft()); @@ -136,7 +136,7 @@ namespace BlackGui Q_UNUSED(from); if (INetwork::isDisconnectedStatus(to)) { - this->ui->tvp_AircraftInRange->clear(); + ui->tvp_AircraftInRange->clear(); } } diff --git a/src/blackgui/components/atcstationcomponent.cpp b/src/blackgui/components/atcstationcomponent.cpp index 8ebd41149..4dabd0be6 100644 --- a/src/blackgui/components/atcstationcomponent.cpp +++ b/src/blackgui/components/atcstationcomponent.cpp @@ -60,36 +60,36 @@ namespace BlackGui this->tabBar()->setUsesScrollButtons(true); // some icons - this->ui->pb_AtcStationsAtisReload->setIcon(CIcons::atis()); - this->ui->pb_AtcStationsAtisReload->setText(""); - this->ui->pb_AtcStationsLoadMetar->setIcon(CIcons::metar()); - this->ui->pb_AtcStationsLoadMetar->setText(""); + ui->pb_AtcStationsAtisReload->setIcon(CIcons::atis()); + ui->pb_AtcStationsAtisReload->setText(""); + ui->pb_AtcStationsLoadMetar->setIcon(CIcons::metar()); + ui->pb_AtcStationsLoadMetar->setText(""); // set station mode - this->ui->tvp_AtcStationsOnline->setStationMode(CAtcStationListModel::StationsOnline); - this->ui->tvp_AtcStationsBooked->setStationMode(CAtcStationListModel::StationsBooked); + ui->tvp_AtcStationsOnline->setStationMode(CAtcStationListModel::StationsOnline); + ui->tvp_AtcStationsBooked->setStationMode(CAtcStationListModel::StationsBooked); // header - this->ui->tvp_AtcStationsOnlineTree->setHeaderHidden(true); + ui->tvp_AtcStationsOnlineTree->setHeaderHidden(true); // Signal / Slots - connect(this->ui->le_AtcStationsOnlineMetar, &QLineEdit::returnPressed, this, &CAtcStationComponent::ps_getMetarAsEntered); - connect(this->ui->pb_AtcStationsLoadMetar, &QPushButton::clicked, this, &CAtcStationComponent::ps_getMetarAsEntered); + connect(ui->le_AtcStationsOnlineMetar, &QLineEdit::returnPressed, this, &CAtcStationComponent::ps_getMetarAsEntered); + connect(ui->pb_AtcStationsLoadMetar, &QPushButton::clicked, this, &CAtcStationComponent::ps_getMetarAsEntered); connect(this, &QTabWidget::currentChanged, this, &CAtcStationComponent::ps_atcStationsTabChanged); // "local" tab changed (booked, online) - connect(this->ui->tvp_AtcStationsOnline, &QTableView::clicked, this, &CAtcStationComponent::ps_onlineAtcStationSelected); - connect(this->ui->tvp_AtcStationsOnline, &CAtcStationView::testRequestDummyAtcOnlineStations, this, &CAtcStationComponent::ps_testCreateDummyOnlineAtcStations); - connect(this->ui->tvp_AtcStationsOnline, &CAtcStationView::requestUpdate, this, &CAtcStationComponent::ps_requestOnlineStationsUpdate); - connect(this->ui->tvp_AtcStationsOnline, &CAtcStationView::requestNewBackendData, this, &CAtcStationComponent::ps_requestOnlineStationsUpdate); - connect(this->ui->tvp_AtcStationsOnline, &CAtcStationView::modelDataChanged, this, &CAtcStationComponent::ps_onCountChanged); - connect(this->ui->tvp_AtcStationsOnline, &CAtcStationView::modelDataChanged, this, &CAtcStationComponent::ps_onCountChanged); - connect(this->ui->tvp_AtcStationsOnline, &CAtcStationView::requestComFrequency, this, &CAtcStationComponent::ps_setComFrequency); - connect(this->ui->tvp_AtcStationsOnline, &CAtcStationView::requestTextMessageWidget, this, &CAtcStationComponent::requestTextMessageWidget); + connect(ui->tvp_AtcStationsOnline, &QTableView::clicked, this, &CAtcStationComponent::ps_onlineAtcStationSelected); + connect(ui->tvp_AtcStationsOnline, &CAtcStationView::testRequestDummyAtcOnlineStations, this, &CAtcStationComponent::ps_testCreateDummyOnlineAtcStations); + connect(ui->tvp_AtcStationsOnline, &CAtcStationView::requestUpdate, this, &CAtcStationComponent::ps_requestOnlineStationsUpdate); + connect(ui->tvp_AtcStationsOnline, &CAtcStationView::requestNewBackendData, this, &CAtcStationComponent::ps_requestOnlineStationsUpdate); + connect(ui->tvp_AtcStationsOnline, &CAtcStationView::modelDataChanged, this, &CAtcStationComponent::ps_onCountChanged); + connect(ui->tvp_AtcStationsOnline, &CAtcStationView::modelDataChanged, this, &CAtcStationComponent::ps_onCountChanged); + connect(ui->tvp_AtcStationsOnline, &CAtcStationView::requestComFrequency, this, &CAtcStationComponent::ps_setComFrequency); + connect(ui->tvp_AtcStationsOnline, &CAtcStationView::requestTextMessageWidget, this, &CAtcStationComponent::requestTextMessageWidget); - connect(this->ui->tvp_AtcStationsBooked, &CAtcStationView::requestUpdate, this, &CAtcStationComponent::ps_reloadAtcStationsBooked); - connect(this->ui->tvp_AtcStationsBooked, &CAtcStationView::requestNewBackendData, this, &CAtcStationComponent::ps_reloadAtcStationsBooked); - connect(this->ui->tvp_AtcStationsBooked, &CAtcStationView::modelDataChanged, this, &CAtcStationComponent::ps_onCountChanged); + connect(ui->tvp_AtcStationsBooked, &CAtcStationView::requestUpdate, this, &CAtcStationComponent::ps_reloadAtcStationsBooked); + connect(ui->tvp_AtcStationsBooked, &CAtcStationView::requestNewBackendData, this, &CAtcStationComponent::ps_reloadAtcStationsBooked); + connect(ui->tvp_AtcStationsBooked, &CAtcStationView::modelDataChanged, this, &CAtcStationComponent::ps_onCountChanged); - connect(this->ui->pb_AtcStationsAtisReload, &QPushButton::clicked, this, &CAtcStationComponent::ps_requestAtis); + connect(ui->pb_AtcStationsAtisReload, &QPushButton::clicked, this, &CAtcStationComponent::ps_requestAtis); // runtime based connects this->connect(sGui->getIContextNetwork(), &IContextNetwork::changedAtcStationsOnlineDigest, this, &CAtcStationComponent::ps_changedAtcStationsOnline); @@ -123,8 +123,8 @@ namespace BlackGui void CAtcStationComponent::update() { if (!sGui || !sGui->getIContextNetwork()) { return; } - Q_ASSERT(this->ui->tvp_AtcStationsBooked); - Q_ASSERT(this->ui->tvp_AtcStationsOnline); + Q_ASSERT(ui->tvp_AtcStationsBooked); + Q_ASSERT(ui->tvp_AtcStationsOnline); // check if component is visible, if we have already data then skip udpate bool hasData = this->countBookedStations() > 0 || this->countOnlineStations() > 0; @@ -151,7 +151,7 @@ namespace BlackGui // sGui->getIContextNetwork()->getAtcStationsOnline().stationsWithValidVoiceRoom() sGui->getIContextNetwork()->getAtcStationsOnline().stationsWithValidFrequency(); - this->ui->tvp_AtcStationsOnline->updateContainerMaybeAsync(onlineStations); + ui->tvp_AtcStationsOnline->updateContainerMaybeAsync(onlineStations); this->m_timestampLastReadOnlineStations = QDateTime::currentDateTimeUtc(); this->m_timestampOnlineStationsChanged = this->m_timestampLastReadOnlineStations; this->updateTreeView(); @@ -159,7 +159,7 @@ namespace BlackGui } else { - this->ui->tvp_AtcStationsOnline->clear(); + ui->tvp_AtcStationsOnline->clear(); this->updateTreeView(); } } @@ -167,36 +167,36 @@ namespace BlackGui void CAtcStationComponent::changedAtcStationOnlineConnectionStatus(const CAtcStation &station, bool added) { // trick here is, we want to display a station ASAP - this->ui->tvp_AtcStationsOnline->changedAtcStationConnectionStatus(station, added); + ui->tvp_AtcStationsOnline->changedAtcStationConnectionStatus(station, added); } void CAtcStationComponent::getMetar(const QString &airportIcaoCode) { - QString icao(airportIcaoCode.isEmpty() ? this->ui->le_AtcStationsOnlineMetar->text().trimmed().toUpper() : airportIcaoCode.trimmed().toUpper()); - this->ui->le_AtcStationsOnlineMetar->setText(icao); + QString icao(airportIcaoCode.isEmpty() ? ui->le_AtcStationsOnlineMetar->text().trimmed().toUpper() : airportIcaoCode.trimmed().toUpper()); + ui->le_AtcStationsOnlineMetar->setText(icao); if (icao.length() != 4) { return; } CMetar metar(sGui->getIContextNetwork()->getMetarForAirport(icao)); if (metar == CMetar()) { - this->ui->te_AtcStationsOnlineInfo->clear(); + ui->te_AtcStationsOnlineInfo->clear(); } else { QString metarText = metar.getMessage(); metarText += "\n\n"; metarText += metar.getMetarText(); - this->ui->te_AtcStationsOnlineInfo->setText(metarText); + ui->te_AtcStationsOnlineInfo->setText(metarText); } - this->ui->le_AtcStationsOnlineMetar->clear(); + ui->le_AtcStationsOnlineMetar->clear(); } void CAtcStationComponent::ps_reloadAtcStationsBooked() { - Q_ASSERT(this->ui->tvp_AtcStationsBooked); + Q_ASSERT(ui->tvp_AtcStationsBooked); Q_ASSERT(sGui->getIContextNetwork()); QObject *sender = QObject::sender(); - if (sender == this->ui->tvp_AtcStationsBooked && sGui->getIContextNetwork()) + if (sender == ui->tvp_AtcStationsBooked && sGui->getIContextNetwork()) { // trigger new read, which takes some time. A signal will be received when this is done CLogMessage(this).info("Requested new bookings"); @@ -204,7 +204,7 @@ namespace BlackGui } else { - this->ui->tvp_AtcStationsBooked->updateContainerMaybeAsync(sGui->getIContextNetwork()->getAtcStationsBooked()); + ui->tvp_AtcStationsBooked->updateContainerMaybeAsync(sGui->getIContextNetwork()->getAtcStationsBooked()); this->m_timestampLastReadBookedStations = QDateTime::currentDateTimeUtc(); } } @@ -230,7 +230,7 @@ namespace BlackGui Q_UNUSED(from); if (INetwork::isDisconnectedStatus(to)) { - this->ui->tvp_AtcStationsOnline->clear(); + ui->tvp_AtcStationsOnline->clear(); this->updateTreeView(); } } @@ -264,8 +264,8 @@ namespace BlackGui { Q_UNUSED(count); Q_UNUSED(withFilter); - int io = this->indexOf(this->ui->tb_AtcStationsOnline); - int ib = this->indexOf(this->ui->tb_AtcStationsBooked); + int io = this->indexOf(ui->tb_AtcStationsOnline); + int ib = this->indexOf(ui->tb_AtcStationsBooked); QString o = this->tabBar()->tabText(io); QString b = this->tabBar()->tabText(ib); o = CGuiUtility::replaceTabCountValue(o, this->countOnlineStations()); @@ -285,24 +285,24 @@ namespace BlackGui { // //! \todo EXPERIMENTAL CODE: change model so we can directly use hierarchies - QAbstractItemModel *old = (this->ui->tvp_AtcStationsOnlineTree->model()); - this->ui->tvp_AtcStationsOnlineTree->setModel( - this->ui->tvp_AtcStationsOnline->derivedModel()->toAtcGroupModel() + QAbstractItemModel *old = (ui->tvp_AtcStationsOnlineTree->model()); + ui->tvp_AtcStationsOnlineTree->setModel( + ui->tvp_AtcStationsOnline->derivedModel()->toAtcGroupModel() ); if (old) { old->deleteLater(); } // delete old model replaced by current model - if (!this->ui->tvp_AtcStationsOnlineTree->model()) { return; } + if (!ui->tvp_AtcStationsOnlineTree->model()) { return; } - this->ui->tvp_AtcStationsOnlineTree->expandAll(); - for (int i = 0; i < this->ui->tvp_AtcStationsOnlineTree->model()->columnCount(); i++) + ui->tvp_AtcStationsOnlineTree->expandAll(); + for (int i = 0; i < ui->tvp_AtcStationsOnlineTree->model()->columnCount(); i++) { - this->ui->tvp_AtcStationsOnlineTree->resizeColumnToContents(i); + ui->tvp_AtcStationsOnlineTree->resizeColumnToContents(i); } } void CAtcStationComponent::ps_onlineAtcStationSelected(QModelIndex index) { - this->ui->te_AtcStationsOnlineInfo->setText(""); // reset - const CAtcStation stationClicked = this->ui->tvp_AtcStationsOnline->derivedModel()->at(index); + ui->te_AtcStationsOnlineInfo->setText(""); // reset + const CAtcStation stationClicked = ui->tvp_AtcStationsOnline->derivedModel()->at(index); QString infoMessage; if (stationClicked.hasAtis()) @@ -314,14 +314,14 @@ namespace BlackGui if (!infoMessage.isEmpty()) infoMessage.append("\n\n"); infoMessage.append(stationClicked.getMetar().getMessage()); } - this->ui->te_AtcStationsOnlineInfo->setText(infoMessage); + ui->te_AtcStationsOnlineInfo->setText(infoMessage); } void CAtcStationComponent::ps_atcStationsTabChanged() { - if (this->currentWidget() == this->ui->tb_AtcStationsBooked) + if (this->currentWidget() == ui->tb_AtcStationsBooked) { - if (this->ui->tvp_AtcStationsBooked->isEmpty()) + if (ui->tvp_AtcStationsBooked->isEmpty()) { this->ps_reloadAtcStationsBooked(); } diff --git a/src/blackgui/components/audiosetupcomponent.cpp b/src/blackgui/components/audiosetupcomponent.cpp index 1861e2c18..5e3532dfb 100644 --- a/src/blackgui/components/audiosetupcomponent.cpp +++ b/src/blackgui/components/audiosetupcomponent.cpp @@ -39,10 +39,10 @@ namespace BlackGui { ui->setupUi(this); - bool c = connect(this->ui->tb_ExpandNotificationSounds, &QToolButton::toggled, this, &CAudioSetupComponent::ps_onToggleNotificationSoundsVisibility); + bool c = connect(ui->tb_ExpandNotificationSounds, &QToolButton::toggled, this, &CAudioSetupComponent::ps_onToggleNotificationSoundsVisibility); Q_ASSERT(c); Q_UNUSED(c); - c = connect(this->ui->cb_SetupAudioLoopback, &QCheckBox::toggled, this, &CAudioSetupComponent::ps_onLoopbackToggled); + c = connect(ui->cb_SetupAudioLoopback, &QCheckBox::toggled, this, &CAudioSetupComponent::ps_onLoopbackToggled); Q_ASSERT(c); Q_UNUSED(c); @@ -51,14 +51,14 @@ namespace BlackGui this->initAudioDeviceLists(); // default - this->ui->cb_SetupAudioLoopback->setChecked(sGui->getIContextAudio()->isAudioLoopbackEnabled()); + ui->cb_SetupAudioLoopback->setChecked(sGui->getIContextAudio()->isAudioLoopbackEnabled()); // the connects depend on initAudioDeviceLists - c = this->connect(this->ui->cb_SetupAudioInputDevice, static_cast (&QComboBox::currentIndexChanged), this, &CAudioSetupComponent::ps_audioDeviceSelected); + c = this->connect(ui->cb_SetupAudioInputDevice, static_cast (&QComboBox::currentIndexChanged), this, &CAudioSetupComponent::ps_audioDeviceSelected); Q_ASSERT(c); Q_UNUSED(c); - c = this->connect(this->ui->cb_SetupAudioOutputDevice, static_cast (&QComboBox::currentIndexChanged), this, &CAudioSetupComponent::ps_audioDeviceSelected); + c = this->connect(ui->cb_SetupAudioOutputDevice, static_cast (&QComboBox::currentIndexChanged), this, &CAudioSetupComponent::ps_audioDeviceSelected); Q_ASSERT(c); Q_UNUSED(c); @@ -67,7 +67,7 @@ namespace BlackGui this->connect(sGui->getIContextAudio(), &IContextAudio::changedSelectedAudioDevices, this, &CAudioSetupComponent::ps_onCurrentAudioDevicesChanged); } this->ps_reloadSettings(); - this->ui->tb_ExpandNotificationSounds->setChecked(false); // collapse + ui->tb_ExpandNotificationSounds->setChecked(false); // collapse } CAudioSetupComponent::~CAudioSetupComponent() @@ -76,14 +76,14 @@ namespace BlackGui void CAudioSetupComponent::ps_reloadSettings() { CSettings as(m_audioSettings.getThreadLocal()); - this->ui->cb_SetupAudioPlayNotificationSounds->setChecked(true); - this->ui->cb_SetupAudioNotificationTextMessage->setChecked(as.getNotificationFlag(CNotificationSounds::NotificationTextMessagePrivate)); - this->ui->cb_SetupAudioNotificationVoiceRoom->setChecked(as.getNotificationFlag(CNotificationSounds::NotificationVoiceRoomJoined)); + ui->cb_SetupAudioPlayNotificationSounds->setChecked(true); + ui->cb_SetupAudioNotificationTextMessage->setChecked(as.getNotificationFlag(CNotificationSounds::NotificationTextMessagePrivate)); + ui->cb_SetupAudioNotificationVoiceRoom->setChecked(as.getNotificationFlag(CNotificationSounds::NotificationVoiceRoomJoined)); } void CAudioSetupComponent::ps_onToggleNotificationSoundsVisibility(bool checked) { - this->ui->fr_NotificationSoundsInner->setVisible(checked); + ui->fr_NotificationSoundsInner->setVisible(checked); } void CAudioSetupComponent::initAudioDeviceLists() @@ -95,7 +95,7 @@ namespace BlackGui bool CAudioSetupComponent::playNotificationSounds() const { - return this->ui->cb_SetupAudioPlayNotificationSounds->isChecked(); + return ui->cb_SetupAudioPlayNotificationSounds->isChecked(); } void CAudioSetupComponent::ps_audioDeviceSelected(int index) @@ -107,14 +107,14 @@ namespace BlackGui if (devices.isEmpty()) { return; } CAudioDeviceInfo selectedDevice; QObject *sender = QObject::sender(); - if (sender == this->ui->cb_SetupAudioInputDevice) + if (sender == ui->cb_SetupAudioInputDevice) { CAudioDeviceInfoList inputDevices = devices.getInputDevices(); if (index >= inputDevices.size()) { return; } selectedDevice = inputDevices[index]; sGui->getIContextAudio()->setCurrentAudioDevice(selectedDevice); } - else if (sender == this->ui->cb_SetupAudioOutputDevice) + else if (sender == ui->cb_SetupAudioOutputDevice) { CAudioDeviceInfoList outputDevices = devices.getOutputDevices(); if (index >= outputDevices.size()) { return; } @@ -129,29 +129,29 @@ namespace BlackGui { if (device.getType() == CAudioDeviceInfo::InputDevice) { - this->ui->cb_SetupAudioInputDevice->setCurrentText(device.toQString(true)); + ui->cb_SetupAudioInputDevice->setCurrentText(device.toQString(true)); } else if (device.getType() == CAudioDeviceInfo::OutputDevice) { - this->ui->cb_SetupAudioOutputDevice->setCurrentText(device.toQString(true)); + ui->cb_SetupAudioOutputDevice->setCurrentText(device.toQString(true)); } } } void CAudioSetupComponent::ps_onAudioDevicesChanged(const CAudioDeviceInfoList &devices) { - this->ui->cb_SetupAudioOutputDevice->clear(); - this->ui->cb_SetupAudioInputDevice->clear(); + ui->cb_SetupAudioOutputDevice->clear(); + ui->cb_SetupAudioInputDevice->clear(); for (auto &device : devices) { if (device.getType() == CAudioDeviceInfo::InputDevice) { - this->ui->cb_SetupAudioInputDevice->addItem(device.toQString(true)); + ui->cb_SetupAudioInputDevice->addItem(device.toQString(true)); } else if (device.getType() == CAudioDeviceInfo::OutputDevice) { - this->ui->cb_SetupAudioOutputDevice->addItem(device.toQString(true)); + ui->cb_SetupAudioOutputDevice->addItem(device.toQString(true)); } } } diff --git a/src/blackgui/components/audiovolumecomponent.cpp b/src/blackgui/components/audiovolumecomponent.cpp index 625e0935f..fb50282cc 100644 --- a/src/blackgui/components/audiovolumecomponent.cpp +++ b/src/blackgui/components/audiovolumecomponent.cpp @@ -33,16 +33,16 @@ namespace BlackGui ui(new Ui::CAudioVolumeComponent) { ui->setupUi(this); - bool c = connect(this->ui->pb_ShowWinMixer, &QPushButton::pressed, this, &CAudioVolumeComponent::ps_onWindowsMixerRequested); + bool c = connect(ui->pb_ShowWinMixer, &QPushButton::pressed, this, &CAudioVolumeComponent::ps_onWindowsMixerRequested); Q_ASSERT(c); Q_UNUSED(c); - c = connect(this->ui->hs_Volume, &QSlider::valueChanged, this, &CAudioVolumeComponent::ps_changeOutputVolumeFromSlider); + c = connect(ui->hs_Volume, &QSlider::valueChanged, this, &CAudioVolumeComponent::ps_changeOutputVolumeFromSlider); Q_ASSERT(c); Q_UNUSED(c); - c = connect(this->ui->sb_Volume, static_cast (&QSpinBox::valueChanged), this, &CAudioVolumeComponent::ps_changeOutputVolumeFromSpinBox); + c = connect(ui->sb_Volume, static_cast (&QSpinBox::valueChanged), this, &CAudioVolumeComponent::ps_changeOutputVolumeFromSpinBox); Q_ASSERT(c); Q_UNUSED(c); - c = connect(this->ui->pb_Volume100, &QPushButton::clicked, this, &CAudioVolumeComponent::ps_setVolume100); + c = connect(ui->pb_Volume100, &QPushButton::clicked, this, &CAudioVolumeComponent::ps_setVolume100); Q_ASSERT(c); Q_UNUSED(c); @@ -54,17 +54,17 @@ namespace BlackGui Q_UNUSED(c); // to audio audio context - c = connect(this->ui->pb_Mute, &QPushButton::toggled, sGui->getIContextAudio(), &IContextAudio::setMute); + c = connect(ui->pb_Mute, &QPushButton::toggled, sGui->getIContextAudio(), &IContextAudio::setMute); Q_ASSERT(c); Q_UNUSED(c); if (sGui->getIContextAudio()->isUsingImplementingObject()) { - this->ui->lbl_ContextLocation->setText("local"); + ui->lbl_ContextLocation->setText("local"); } else { - this->ui->lbl_ContextLocation->setText("remote"); + ui->lbl_ContextLocation->setText("remote"); } // init volume @@ -76,20 +76,20 @@ namespace BlackGui void CAudioVolumeComponent::ps_onMuteChanged(bool muted) { - if (muted == this->ui->pb_Mute->isChecked()) { return; } // avoid roundtrips - this->ui->pb_Mute->setChecked(muted); + if (muted == ui->pb_Mute->isChecked()) { return; } // avoid roundtrips + ui->pb_Mute->setChecked(muted); } void CAudioVolumeComponent::ps_onOutputVolumeChanged(int volume) { - this->ui->hs_Volume->setToolTip(QString::number(volume)); + ui->hs_Volume->setToolTip(QString::number(volume)); // comparisons to avoid rountrips QString v = QString::number(volume); - if (volume != this->ui->sb_Volume->value()) + if (volume != ui->sb_Volume->value()) { - this->ui->sb_Volume->setValue(volume); - this->ui->sb_Volume->setToolTip(v); + ui->sb_Volume->setValue(volume); + ui->sb_Volume->setToolTip(v); } if (volume > 100) @@ -98,10 +98,10 @@ namespace BlackGui volume = 100 + v / 5; } - if (volume != this->ui->hs_Volume->value()) + if (volume != ui->hs_Volume->value()) { - this->ui->hs_Volume->setValue(volume); - this->ui->hs_Volume->setToolTip(v); + ui->hs_Volume->setValue(volume); + ui->hs_Volume->setToolTip(v); } } @@ -118,7 +118,7 @@ namespace BlackGui int v = volume - 100; volume = 100 + v * 5; } - this->ui->hs_Volume->setToolTip(QString::number(volume)); + ui->hs_Volume->setToolTip(QString::number(volume)); Q_ASSERT(sGui->getIContextAudio()); if (sGui->getIContextAudio()->getVoiceOutputVolume() != volume) @@ -129,7 +129,7 @@ namespace BlackGui void CAudioVolumeComponent::ps_changeOutputVolumeFromSpinBox(int volume) { - this->ui->sb_Volume->setToolTip(QString::number(volume)); + ui->sb_Volume->setToolTip(QString::number(volume)); Q_ASSERT(sGui->getIContextAudio()); if (sGui->getIContextAudio()->getVoiceOutputVolume() != volume) { diff --git a/src/blackgui/components/cockpitcomcomponent.cpp b/src/blackgui/components/cockpitcomcomponent.cpp index 1bfc61231..f7d67ddce 100644 --- a/src/blackgui/components/cockpitcomcomponent.cpp +++ b/src/blackgui/components/cockpitcomcomponent.cpp @@ -55,27 +55,27 @@ namespace BlackGui { ui->setupUi(this); this->initLeds(); - connect(this->ui->cbp_ComPanelTransponderMode, &CTransponderModeSelector::transponderModeChanged, this, &CCockpitComComponent::transponderModeChanged); - connect(this->ui->cbp_ComPanelTransponderMode, &CTransponderModeSelector::transponderStateIdentEnded, this, &CCockpitComComponent::transponderStateIdentEnded); + connect(ui->cbp_ComPanelTransponderMode, &CTransponderModeSelector::transponderModeChanged, this, &CCockpitComComponent::transponderModeChanged); + connect(ui->cbp_ComPanelTransponderMode, &CTransponderModeSelector::transponderStateIdentEnded, this, &CCockpitComComponent::transponderStateIdentEnded); // init from aircraft CSimulatedAircraft ownAircraft = this->getOwnAircraft(); this->ps_updateCockpitFromContext(ownAircraft, CIdentifier("dummyInitialValues")); // intentionally different name here // SELCAL pairs in cockpit - this->ui->frp_ComPanelSelcalBottom->clear(); - connect(this->ui->tb_ComPanelSelcalTest, &QPushButton::clicked, this, &CCockpitComComponent::ps_testSelcal); + ui->frp_ComPanelSelcalBottom->clear(); + connect(ui->tb_ComPanelSelcalTest, &QPushButton::clicked, this, &CCockpitComComponent::ps_testSelcal); // COM GUI events - connect(this->ui->tb_ComPanelCom1Toggle, &QPushButton::clicked, this, &CCockpitComComponent::ps_guiChangedCockpitValues); - connect(this->ui->tb_ComPanelCom2Toggle, &QPushButton::clicked, this, &CCockpitComComponent::ps_guiChangedCockpitValues); - connect(this->ui->ds_ComPanelCom1Active, &QDoubleSpinBox::editingFinished, this, &CCockpitComComponent::ps_guiChangedCockpitValues); - connect(this->ui->ds_ComPanelCom2Active, &QDoubleSpinBox::editingFinished, this, &CCockpitComComponent::ps_guiChangedCockpitValues); - connect(this->ui->ds_ComPanelCom1Standby, &QDoubleSpinBox::editingFinished, this, &CCockpitComComponent::ps_guiChangedCockpitValues); - connect(this->ui->ds_ComPanelCom2Standby, &QDoubleSpinBox::editingFinished, this, &CCockpitComComponent::ps_guiChangedCockpitValues); - connect(this->ui->sbp_ComPanelTransponder, &QDoubleSpinBox::editingFinished, this, &CCockpitComComponent::ps_guiChangedCockpitValues); - connect(this->ui->cbp_ComPanelTransponderMode, &CTransponderModeSelector::transponderModeChanged, this, &CCockpitComComponent::ps_guiChangedCockpitValues); - connect(this->ui->frp_ComPanelSelcalBottom, &CSelcalCodeSelector::valueChanged, this, &CCockpitComComponent::ps_guiChangedSelcal); + connect(ui->tb_ComPanelCom1Toggle, &QPushButton::clicked, this, &CCockpitComComponent::ps_guiChangedCockpitValues); + connect(ui->tb_ComPanelCom2Toggle, &QPushButton::clicked, this, &CCockpitComComponent::ps_guiChangedCockpitValues); + connect(ui->ds_ComPanelCom1Active, &QDoubleSpinBox::editingFinished, this, &CCockpitComComponent::ps_guiChangedCockpitValues); + connect(ui->ds_ComPanelCom2Active, &QDoubleSpinBox::editingFinished, this, &CCockpitComComponent::ps_guiChangedCockpitValues); + connect(ui->ds_ComPanelCom1Standby, &QDoubleSpinBox::editingFinished, this, &CCockpitComComponent::ps_guiChangedCockpitValues); + connect(ui->ds_ComPanelCom2Standby, &QDoubleSpinBox::editingFinished, this, &CCockpitComComponent::ps_guiChangedCockpitValues); + connect(ui->sbp_ComPanelTransponder, &QDoubleSpinBox::editingFinished, this, &CCockpitComComponent::ps_guiChangedCockpitValues); + connect(ui->cbp_ComPanelTransponderMode, &CTransponderModeSelector::transponderModeChanged, this, &CCockpitComComponent::ps_guiChangedCockpitValues); + connect(ui->frp_ComPanelSelcalBottom, &CSelcalCodeSelector::valueChanged, this, &CCockpitComComponent::ps_guiChangedSelcal); // hook up with changes from own aircraft context this->connect(sGui->getIContextOwnAircraft(), &IContextOwnAircraft::changedAircraftCockpit, this, &CCockpitComComponent::ps_updateCockpitFromContext); @@ -90,7 +90,7 @@ namespace BlackGui void CCockpitComComponent::setSelectedTransponderModeStateIdent() { - this->ui->cbp_ComPanelTransponderMode->setSelectedTransponderModeStateIdent(); + ui->cbp_ComPanelTransponderMode->setSelectedTransponderModeStateIdent(); } void CCockpitComComponent::paintEvent(QPaintEvent *event) @@ -102,19 +102,19 @@ namespace BlackGui void CCockpitComComponent::ps_guiChangedCockpitValues() { QObject *sender = QObject::sender(); - if (sender == this->ui->tb_ComPanelCom1Toggle) + if (sender == ui->tb_ComPanelCom1Toggle) { - if (this->ui->ds_ComPanelCom1Standby->value() == this->ui->ds_ComPanelCom1Active->value()) return; - double f = this->ui->ds_ComPanelCom1Active->value(); - this->ui->ds_ComPanelCom1Active->setValue(this->ui->ds_ComPanelCom1Standby->value()); - this->ui->ds_ComPanelCom1Standby->setValue(f); + if (ui->ds_ComPanelCom1Standby->value() == ui->ds_ComPanelCom1Active->value()) return; + double f = ui->ds_ComPanelCom1Active->value(); + ui->ds_ComPanelCom1Active->setValue(ui->ds_ComPanelCom1Standby->value()); + ui->ds_ComPanelCom1Standby->setValue(f); } - else if (sender == this->ui->tb_ComPanelCom2Toggle) + else if (sender == ui->tb_ComPanelCom2Toggle) { - if (this->ui->ds_ComPanelCom2Standby->value() == this->ui->ds_ComPanelCom2Active->value()) return; - double f = this->ui->ds_ComPanelCom2Active->value(); - this->ui->ds_ComPanelCom2Active->setValue(this->ui->ds_ComPanelCom2Standby->value()); - this->ui->ds_ComPanelCom2Standby->setValue(f); + if (ui->ds_ComPanelCom2Standby->value() == ui->ds_ComPanelCom2Active->value()) return; + double f = ui->ds_ComPanelCom2Active->value(); + ui->ds_ComPanelCom2Active->setValue(ui->ds_ComPanelCom2Standby->value()); + ui->ds_ComPanelCom2Standby->setValue(f); } const CSimulatedAircraft ownAircraft = this->cockpitValuesToAircraftObject(); @@ -141,12 +141,12 @@ namespace BlackGui // update transponder int tc = transponder.getTransponderCode(); - if (tc != this->ui->sbp_ComPanelTransponder->value()) + if (tc != ui->sbp_ComPanelTransponder->value()) { - this->ui->sbp_ComPanelTransponder->setValue(tc); + ui->sbp_ComPanelTransponder->setValue(tc); } - this->ui->cbp_ComPanelTransponderMode->setSelectedTransponderMode(transponder.getTransponderMode()); + ui->cbp_ComPanelTransponderMode->setSelectedTransponderMode(transponder.getTransponderMode()); if (sGui->getIContextNetwork()) { @@ -155,24 +155,24 @@ namespace BlackGui CAtcStation com2Station = selectedStations.size() > 1 ? selectedStations[1] : CAtcStation(); if (com1Station.getCallsign().isEmpty()) { - this->ui->lbl_ComPanelCom1Active->setToolTip(""); - this->ui->led_ComPanelCom1->setOn(false); + ui->lbl_ComPanelCom1Active->setToolTip(""); + ui->led_ComPanelCom1->setOn(false); } else { - this->ui->lbl_ComPanelCom1Active->setToolTip(com1Station.getCallsign().getStringAsSet()); - this->ui->led_ComPanelCom1->setOn(true); + ui->lbl_ComPanelCom1Active->setToolTip(com1Station.getCallsign().getStringAsSet()); + ui->led_ComPanelCom1->setOn(true); } if (com2Station.getCallsign().isEmpty()) { - this->ui->lbl_ComPanelCom2Active->setToolTip(""); - this->ui->led_ComPanelCom2->setOn(false); + ui->lbl_ComPanelCom2Active->setToolTip(""); + ui->led_ComPanelCom2->setOn(false); } else { - this->ui->lbl_ComPanelCom2Active->setToolTip(com2Station.getCallsign().getStringAsSet()); - this->ui->led_ComPanelCom2->setOn(true); + ui->lbl_ComPanelCom2Active->setToolTip(com2Station.getCallsign().getStringAsSet()); + ui->led_ComPanelCom2->setOn(true); } } } @@ -197,7 +197,7 @@ namespace BlackGui void CCockpitComComponent::ps_onChangedSelcal(const CSelcal &selcal, const CIdentifier &originator) { if (isMyIdentifier(originator)) { return; } // comes from myself - this->ui->frp_ComPanelSelcalBottom->setSelcalCode(selcal); + ui->frp_ComPanelSelcalBottom->setSelcalCode(selcal); } CSelcal CCockpitComComponent::getSelcal() const @@ -208,8 +208,8 @@ namespace BlackGui void CCockpitComComponent::initLeds() { CLedWidget::LedShape shape = CLedWidget::Rounded; - this->ui->led_ComPanelCom1->setValues(CLedWidget::Yellow, CLedWidget::Black, shape, "COM1 connected", "COM1 disconnected", 14); - this->ui->led_ComPanelCom2->setValues(CLedWidget::Yellow, CLedWidget::Black, shape, "COM2 connected", "COM2 disconnected", 14); + ui->led_ComPanelCom1->setValues(CLedWidget::Yellow, CLedWidget::Black, shape, "COM1 connected", "COM1 disconnected", 14); + ui->led_ComPanelCom2->setValues(CLedWidget::Yellow, CLedWidget::Black, shape, "COM2 connected", "COM2 disconnected", 14); } CSimulatedAircraft CCockpitComComponent::cockpitValuesToAircraftObject() @@ -222,7 +222,7 @@ namespace BlackGui // // Transponder // - QString transponderCode = QString::number(this->ui->sbp_ComPanelTransponder->value()); + QString transponderCode = QString::number(ui->sbp_ComPanelTransponder->value()); if (CTransponder::isValidTransponderCode(transponderCode)) { transponder.setTransponderCode(transponderCode); @@ -230,17 +230,17 @@ namespace BlackGui else { CLogMessage().validationWarning("Wrong transponder code, reset"); - this->ui->sbp_ComPanelTransponder->setValue(transponder.getTransponderCode()); + ui->sbp_ComPanelTransponder->setValue(transponder.getTransponderCode()); } - transponder.setTransponderMode(this->ui->cbp_ComPanelTransponderMode->getSelectedTransponderMode()); + transponder.setTransponderMode(ui->cbp_ComPanelTransponderMode->getSelectedTransponderMode()); // // COM units // - com1.setFrequencyActiveMHz(this->ui->ds_ComPanelCom1Active->value()); - com1.setFrequencyStandbyMHz(this->ui->ds_ComPanelCom1Standby->value()); - com2.setFrequencyActiveMHz(this->ui->ds_ComPanelCom2Active->value()); - com2.setFrequencyStandbyMHz(this->ui->ds_ComPanelCom2Standby->value()); + com1.setFrequencyActiveMHz(ui->ds_ComPanelCom1Active->value()); + com1.setFrequencyStandbyMHz(ui->ds_ComPanelCom1Standby->value()); + com2.setFrequencyActiveMHz(ui->ds_ComPanelCom2Active->value()); + com2.setFrequencyStandbyMHz(ui->ds_ComPanelCom2Standby->value()); this->updateFrequencyDisplaysFromComSystems(com1, com2); // back annotation after rounding ownAircraft.setCom1System(com1); @@ -264,27 +264,27 @@ namespace BlackGui void CCockpitComComponent::updateFrequencyDisplaysFromComSystems(const CComSystem &com1, const CComSystem &com2) { double freq = com1.getFrequencyActive().valueRounded(CFrequencyUnit::MHz(), 3); - if (freq != this->ui->ds_ComPanelCom1Active->value()) + if (freq != ui->ds_ComPanelCom1Active->value()) { - this->ui->ds_ComPanelCom1Active->setValue(freq); + ui->ds_ComPanelCom1Active->setValue(freq); } freq = com2.getFrequencyActive().valueRounded(CFrequencyUnit::MHz(), 3); - if (freq != this->ui->ds_ComPanelCom2Active->value()) + if (freq != ui->ds_ComPanelCom2Active->value()) { - this->ui->ds_ComPanelCom2Active->setValue(freq); + ui->ds_ComPanelCom2Active->setValue(freq); } freq = com1.getFrequencyStandby().valueRounded(CFrequencyUnit::MHz(), 3); - if (freq != this->ui->ds_ComPanelCom1Standby->value()) + if (freq != ui->ds_ComPanelCom1Standby->value()) { - this->ui->ds_ComPanelCom1Standby->setValue(freq); + ui->ds_ComPanelCom1Standby->setValue(freq); } freq = com2.getFrequencyStandby().valueRounded(CFrequencyUnit::MHz(), 3); - if (freq != this->ui->ds_ComPanelCom2Standby->value()) + if (freq != ui->ds_ComPanelCom2Standby->value()) { - this->ui->ds_ComPanelCom2Standby->setValue(freq); + ui->ds_ComPanelCom2Standby->setValue(freq); } } @@ -293,8 +293,8 @@ namespace BlackGui Q_ASSERT(selectedVoiceRooms.size() == 2); CVoiceRoom room1 = selectedVoiceRooms[0]; CVoiceRoom room2 = selectedVoiceRooms[1]; - this->ui->led_ComPanelCom1->setOn(room1.isConnected()); - this->ui->led_ComPanelCom2->setOn(room2.isConnected()); + ui->led_ComPanelCom1->setOn(room1.isConnected()); + ui->led_ComPanelCom2->setOn(room2.isConnected()); Q_UNUSED(connected); } } // namespace diff --git a/src/blackgui/components/colorselector.cpp b/src/blackgui/components/colorselector.cpp index aa37b0a57..9b624be22 100644 --- a/src/blackgui/components/colorselector.cpp +++ b/src/blackgui/components/colorselector.cpp @@ -48,15 +48,15 @@ namespace BlackGui ui->setupUi(this); ui->tb_ColorDialog->setIcon(CIcons::color16()); this->setAcceptDrops(true); - connect(this->ui->tb_ColorDialog, &QToolButton::clicked, this, &CColorSelector::ps_colorDialog); - connect(this->ui->le_Color, &QLineEdit::editingFinished, this, &CColorSelector::ps_returnPressed); - connect(this->ui->le_Color, &QLineEdit::returnPressed, this, &CColorSelector::ps_returnPressed); + connect(ui->tb_ColorDialog, &QToolButton::clicked, this, &CColorSelector::ps_colorDialog); + connect(ui->le_Color, &QLineEdit::editingFinished, this, &CColorSelector::ps_returnPressed); + connect(ui->le_Color, &QLineEdit::returnPressed, this, &CColorSelector::ps_returnPressed); QCompleter *completer = new QCompleter(QColor::colorNames(), this); completer->setCaseSensitivity(Qt::CaseInsensitive); completer->setMaxVisibleItems(10); completer->setCompletionMode(QCompleter::PopupCompletion); - this->ui->le_Color->setCompleter(completer); + ui->le_Color->setCompleter(completer); this->connect(completer, static_cast(&QCompleter::activated), this, &CColorSelector::ps_colorName); } @@ -72,8 +72,8 @@ namespace BlackGui } else { - this->ui->le_Color->setText(color.hex()); - this->ui->lbl_ColorIcon->setPixmap(color.toPixmap()); + ui->le_Color->setText(color.hex()); + ui->lbl_ColorIcon->setPixmap(color.toPixmap()); m_lastColor = color; } emit colorChanged(color); @@ -86,21 +86,21 @@ namespace BlackGui const BlackMisc::CRgbColor CColorSelector::getColor() const { - CRgbColor q(this->ui->le_Color->text()); + CRgbColor q(ui->le_Color->text()); return q; } void CColorSelector::setReadOnly(bool readOnly) { - this->ui->le_Color->setReadOnly(readOnly); - this->ui->tb_ColorDialog->setVisible(!readOnly); + ui->le_Color->setReadOnly(readOnly); + ui->tb_ColorDialog->setVisible(!readOnly); this->setAcceptDrops(!readOnly); } void CColorSelector::clear() { - this->ui->le_Color->clear(); - this->ui->lbl_ColorIcon->setPixmap(QPixmap()); + ui->le_Color->clear(); + ui->lbl_ColorIcon->setPixmap(QPixmap()); } void CColorSelector::dragEnterEvent(QDragEnterEvent *event) diff --git a/src/blackgui/components/coreinfoareacomponent.cpp b/src/blackgui/components/coreinfoareacomponent.cpp index 3620fab18..51e432320 100644 --- a/src/blackgui/components/coreinfoareacomponent.cpp +++ b/src/blackgui/components/coreinfoareacomponent.cpp @@ -33,12 +33,12 @@ namespace BlackGui CLogComponent *CCoreInfoAreaComponent::getLogComponent() { - return this->ui->comp_Log; + return ui->comp_Log; } CCoreStatusComponent *CCoreInfoAreaComponent::getStatusComponent() { - return this->ui->comp_Status; + return ui->comp_Status; } QSize CCoreInfoAreaComponent::getPreferredSizeWhenFloating(int areaIndex) const diff --git a/src/blackgui/components/datainfoareacomponent.cpp b/src/blackgui/components/datainfoareacomponent.cpp index 9886ee8fa..32eeacba7 100644 --- a/src/blackgui/components/datainfoareacomponent.cpp +++ b/src/blackgui/components/datainfoareacomponent.cpp @@ -54,32 +54,32 @@ namespace BlackGui CDbModelComponent *CDataInfoAreaComponent::getModelComponent() const { - return this->ui->comp_DbModels; + return ui->comp_DbModels; } CDbLiveryComponent *CDataInfoAreaComponent::getLiveryComponent() const { - return this->ui->comp_DbLiveries; + return ui->comp_DbLiveries; } CDbDistributorComponent *CDataInfoAreaComponent::getDistributorComponent() const { - return this->ui->comp_DbDistributors; + return ui->comp_DbDistributors; } CDbAircraftIcaoComponent *CDataInfoAreaComponent::getAircraftComponent() const { - return this->ui->comp_DbAircraftIcao; + return ui->comp_DbAircraftIcao; } CDbAirlineIcaoComponent *CDataInfoAreaComponent::getAirlineComponent() const { - return this->ui->comp_DbAirlineIcao; + return ui->comp_DbAirlineIcao; } CDbCountryComponent *CDataInfoAreaComponent::getCountryComponent() const { - return this->ui->comp_DbCountries; + return ui->comp_DbCountries; } bool CDataInfoAreaComponent::writeDbDataToResourceDir() const @@ -112,12 +112,12 @@ namespace BlackGui if (s) { CLogMessage(this).info("Read DB data from directory: %1") << CBuildConfig::getSwiftStaticDbFilesDir(); - this->ui->comp_DbAircraftIcao->showLoadIndicator(); - this->ui->comp_DbAirlineIcao->showLoadIndicator(); - this->ui->comp_DbCountries->showLoadIndicator(); - this->ui->comp_DbDistributors->showLoadIndicator(); - this->ui->comp_DbLiveries->showLoadIndicator(); - this->ui->comp_DbModels->showLoadIndicator(); + ui->comp_DbAircraftIcao->showLoadIndicator(); + ui->comp_DbAirlineIcao->showLoadIndicator(); + ui->comp_DbCountries->showLoadIndicator(); + ui->comp_DbDistributors->showLoadIndicator(); + ui->comp_DbLiveries->showLoadIndicator(); + ui->comp_DbModels->showLoadIndicator(); } else { @@ -173,7 +173,7 @@ namespace BlackGui bool requested = false; if (entity.testFlag(CEntityFlags::ModelEntity)) { - this->ui->comp_DbModels->requestUpdatedData(); + ui->comp_DbModels->requestUpdatedData(); requested = true; } diff --git a/src/blackgui/components/datamaininfoareacomponent.cpp b/src/blackgui/components/datamaininfoareacomponent.cpp index 4132aaecd..24004b9a1 100644 --- a/src/blackgui/components/datamaininfoareacomponent.cpp +++ b/src/blackgui/components/datamaininfoareacomponent.cpp @@ -48,17 +48,17 @@ namespace BlackGui CLogComponent *CDataMainInfoAreaComponent::getLogComponent() const { - return this->ui->comp_Log; + return ui->comp_Log; } CDbMappingComponent *CDataMainInfoAreaComponent::getMappingComponent() const { - return this->ui->comp_Mapping; + return ui->comp_Mapping; } CDataInfoAreaComponent *CDataMainInfoAreaComponent::getDataInfoAreaComponent() const { - return this->ui->comp_DataInfoArea; + return ui->comp_DataInfoArea; } void CDataMainInfoAreaComponent::displayLog() diff --git a/src/blackgui/components/dbaircrafticaocomponent.cpp b/src/blackgui/components/dbaircrafticaocomponent.cpp index f9a8c9719..156348d0e 100644 --- a/src/blackgui/components/dbaircrafticaocomponent.cpp +++ b/src/blackgui/components/dbaircrafticaocomponent.cpp @@ -34,12 +34,12 @@ namespace BlackGui ui(new Ui::CDbAircraftIcaoComponent) { ui->setupUi(this); - this->setViewWithIndicator(this->ui->tvp_AircraftIcao); - this->ui->tvp_AircraftIcao->setResizeMode(CAircraftIcaoCodeView::ResizingOff); - connect(this->ui->tvp_AircraftIcao, &CAircraftIcaoCodeView::requestNewBackendData, this, &CDbAircraftIcaoComponent::ps_reload); + this->setViewWithIndicator(ui->tvp_AircraftIcao); + ui->tvp_AircraftIcao->setResizeMode(CAircraftIcaoCodeView::ResizingOff); + connect(ui->tvp_AircraftIcao, &CAircraftIcaoCodeView::requestNewBackendData, this, &CDbAircraftIcaoComponent::ps_reload); - this->ui->tvp_AircraftIcao->allowDragDrop(true, false); - this->ui->tvp_AircraftIcao->setFilterWidget(this->ui->filter_AircraftIcao); + ui->tvp_AircraftIcao->allowDragDrop(true, false); + ui->tvp_AircraftIcao->setFilterWidget(ui->filter_AircraftIcao); connect(sGui->getWebDataServices(), &CWebDataServices::dataRead, this, &CDbAircraftIcaoComponent::ps_icaoRead); this->ps_icaoRead(CEntityFlags::AircraftIcaoEntity, CEntityFlags::ReadFinished, sGui->getWebDataServices()->getAircraftIcaoCodesCount()); @@ -50,7 +50,7 @@ namespace BlackGui void CDbAircraftIcaoComponent::filter(const CAircraftIcaoCode &icao) { - this->ui->filter_AircraftIcao->filter(icao); + ui->filter_AircraftIcao->filter(icao); } void CDbAircraftIcaoComponent::ps_icaoRead(CEntityFlags::Entity entity, CEntityFlags::ReadState readState, int count) @@ -58,7 +58,7 @@ namespace BlackGui Q_UNUSED(count); if (entity.testFlag(CEntityFlags::AircraftIcaoEntity) && readState == CEntityFlags::ReadFinished) { - this->ui->tvp_AircraftIcao->updateContainerMaybeAsync(sGui->getWebDataServices()->getAircraftIcaoCodes()); + ui->tvp_AircraftIcao->updateContainerMaybeAsync(sGui->getWebDataServices()->getAircraftIcaoCodes()); } } diff --git a/src/blackgui/components/dbaircrafticaoselectorcomponent.cpp b/src/blackgui/components/dbaircrafticaoselectorcomponent.cpp index 8918d4265..7e0faa521 100644 --- a/src/blackgui/components/dbaircrafticaoselectorcomponent.cpp +++ b/src/blackgui/components/dbaircrafticaoselectorcomponent.cpp @@ -47,7 +47,7 @@ namespace BlackGui ui->setupUi(this); this->setAcceptDrops(true); this->setAcceptedMetaTypeIds({qMetaTypeId(), qMetaTypeId()}); - this->ui->le_Aircraft->setValidator(new CUpperCaseValidator(this)); + ui->le_Aircraft->setValidator(new CUpperCaseValidator(this)); connect(ui->le_Aircraft, &QLineEdit::returnPressed, this, &CDbAircraftIcaoSelectorComponent::ps_dataChanged); connect(sApp->getWebDataServices(), &CWebDataServices::dataRead, this, &CDbAircraftIcaoSelectorComponent::ps_codesRead); this->ps_codesRead(CEntityFlags::AircraftIcaoEntity, CEntityFlags::ReadFinished, sApp->getWebDataServices()->getAircraftIcaoCodesCount()); @@ -59,7 +59,7 @@ namespace BlackGui void CDbAircraftIcaoSelectorComponent::setAircraftIcao(const CAircraftIcaoCode &icao) { QString icaoStr(icao.getDesignator()); - this->ui->le_Aircraft->setText(icaoStr); + ui->le_Aircraft->setText(icaoStr); ui->lbl_Description->setText(icao.getManufacturer()); if (icao != m_currentIcao) { @@ -80,7 +80,7 @@ namespace BlackGui CAircraftIcaoCode CDbAircraftIcaoSelectorComponent::getAircraftIcao() const { - QString text(this->ui->le_Aircraft->text().trimmed().toUpper()); + QString text(ui->le_Aircraft->text().trimmed().toUpper()); int key = CDatastoreUtility::extractIntegerKey(text); if (key < 0) { @@ -92,7 +92,7 @@ namespace BlackGui void CDbAircraftIcaoSelectorComponent::setReadOnly(bool readOnly) { - this->ui->le_Aircraft->setReadOnly(readOnly); + ui->le_Aircraft->setReadOnly(readOnly); } QString CDbAircraftIcaoSelectorComponent::getRawDesignator() const @@ -102,7 +102,7 @@ namespace BlackGui void CDbAircraftIcaoSelectorComponent::withIcaoDescription(bool description) { - this->ui->lbl_Description->setVisible(description); + ui->lbl_Description->setVisible(description); } bool CDbAircraftIcaoSelectorComponent::isSet() const @@ -112,7 +112,7 @@ namespace BlackGui void CDbAircraftIcaoSelectorComponent::clear() { - this->ui->le_Aircraft->clear(); + ui->le_Aircraft->clear(); } void CDbAircraftIcaoSelectorComponent::dragEnterEvent(QDragEnterEvent *event) @@ -168,7 +168,7 @@ namespace BlackGui c->setMaxVisibleItems(10); this->connect(c, static_cast(&QCompleter::activated), this, &CDbAircraftIcaoSelectorComponent::ps_completerActivated); - this->ui->le_Aircraft->setCompleter(c); + ui->le_Aircraft->setCompleter(c); m_completerIcaoDescription.reset(c); // deletes any old completer this->setReadOnly(false); } @@ -183,7 +183,7 @@ namespace BlackGui void CDbAircraftIcaoSelectorComponent::ps_dataChanged() { if (!sGui) { return; } - int key = CDatastoreUtility::extractIntegerKey(this->ui->le_Aircraft->text()); + int key = CDatastoreUtility::extractIntegerKey(ui->le_Aircraft->text()); CAircraftIcaoCode icao(sGui->getWebDataServices()->getAircraftIcaoCodeForDbKey(key)); this->setAircraftIcao(icao); } diff --git a/src/blackgui/components/dbairlineicaocomponent.cpp b/src/blackgui/components/dbairlineicaocomponent.cpp index 861ee73b4..3fb32691d 100644 --- a/src/blackgui/components/dbairlineicaocomponent.cpp +++ b/src/blackgui/components/dbairlineicaocomponent.cpp @@ -32,12 +32,12 @@ namespace BlackGui ui(new Ui::CDbAirlineIcaoComponent) { ui->setupUi(this); - this->setViewWithIndicator(this->ui->tvp_AirlineIcao); - this->ui->tvp_AirlineIcao->setResizeMode(CAirlineIcaoCodeView::ResizingOff); - this->ui->tvp_AirlineIcao->setResizeMode(CAirlineIcaoCodeView::ResizingOff); - this->ui->tvp_AirlineIcao->allowDragDrop(true, false); - this->ui->tvp_AirlineIcao->setFilterWidget(this->ui->filter_AirlineIcao); - connect(this->ui->tvp_AirlineIcao, &CAirlineIcaoCodeView::requestNewBackendData, this, &CDbAirlineIcaoComponent::ps_reload); + this->setViewWithIndicator(ui->tvp_AirlineIcao); + ui->tvp_AirlineIcao->setResizeMode(CAirlineIcaoCodeView::ResizingOff); + ui->tvp_AirlineIcao->setResizeMode(CAirlineIcaoCodeView::ResizingOff); + ui->tvp_AirlineIcao->allowDragDrop(true, false); + ui->tvp_AirlineIcao->setFilterWidget(ui->filter_AirlineIcao); + connect(ui->tvp_AirlineIcao, &CAirlineIcaoCodeView::requestNewBackendData, this, &CDbAirlineIcaoComponent::ps_reload); connect(sGui->getWebDataServices(), &CWebDataServices::dataRead, this, &CDbAirlineIcaoComponent::ps_icaoRead); this->ps_icaoRead(CEntityFlags::AirlineIcaoEntity, CEntityFlags::ReadFinished, sGui->getWebDataServices()->getAirlineIcaoCodesCount()); @@ -51,7 +51,7 @@ namespace BlackGui Q_UNUSED(count); if (entity.testFlag(CEntityFlags::AirlineIcaoEntity) && readState == CEntityFlags::ReadFinished) { - this->ui->tvp_AirlineIcao->updateContainerMaybeAsync(sGui->getWebDataServices()->getAirlineIcaoCodes()); + ui->tvp_AirlineIcao->updateContainerMaybeAsync(sGui->getWebDataServices()->getAirlineIcaoCodes()); } } diff --git a/src/blackgui/components/dbairlineicaoselectorcomponent.cpp b/src/blackgui/components/dbairlineicaoselectorcomponent.cpp index 101724bbf..e877cab0a 100644 --- a/src/blackgui/components/dbairlineicaoselectorcomponent.cpp +++ b/src/blackgui/components/dbairlineicaoselectorcomponent.cpp @@ -47,27 +47,27 @@ namespace BlackGui void CDbAirlineIcaoSelectorComponent::setReadOnly(bool readOnly) { - this->ui->le_Airline->setReadOnly(readOnly); + ui->le_Airline->setReadOnly(readOnly); } bool CDbAirlineIcaoSelectorComponent::setAirlineIcao(const CAirlineIcaoCode &icao) { if (!CDbAirlineIcaoSelectorBase::setAirlineIcao(icao)) { return false; } const QString icaoStr(icao.getVDesignator()); - this->ui->le_Airline->setText(icaoStr); + ui->le_Airline->setText(icaoStr); ui->lbl_Description->setText(icao.getName()); return true; } void CDbAirlineIcaoSelectorComponent::withIcaoDescription(bool description) { - this->ui->lbl_Description->setVisible(description); + ui->lbl_Description->setVisible(description); } void CDbAirlineIcaoSelectorComponent::clear() { - this->ui->le_Airline->clear(); - this->ui->lbl_Description->clear(); + ui->le_Airline->clear(); + ui->lbl_Description->clear(); } QString CDbAirlineIcaoSelectorComponent::getRawDesignator() const @@ -81,14 +81,14 @@ namespace BlackGui c->setCaseSensitivity(Qt::CaseInsensitive); c->setCompletionMode(QCompleter::PopupCompletion); c->setMaxVisibleItems(10); - this->ui->le_Airline->setCompleter(c); + ui->le_Airline->setCompleter(c); return c; } void CDbAirlineIcaoSelectorComponent::ps_dataChanged() { if (!sGui) { return; } - QString s(this->ui->le_Airline->text()); + QString s(ui->le_Airline->text()); if (s.isEmpty()) { return; } int dbKey = CDatastoreUtility::extractIntegerKey(s); if (dbKey >= 0) diff --git a/src/blackgui/components/dbairlinenameselectorcomponent.cpp b/src/blackgui/components/dbairlinenameselectorcomponent.cpp index c03021c22..97fab17e0 100644 --- a/src/blackgui/components/dbairlinenameselectorcomponent.cpp +++ b/src/blackgui/components/dbairlinenameselectorcomponent.cpp @@ -33,7 +33,7 @@ namespace BlackGui ui(new Ui::CDbAirlineNameSelectorComponent) { ui->setupUi(this); - connect(this->ui->le_AirlineName, &QLineEdit::returnPressed, this, &CDbAirlineNameSelectorComponent::ps_dataChanged); + connect(ui->le_AirlineName, &QLineEdit::returnPressed, this, &CDbAirlineNameSelectorComponent::ps_dataChanged); } CDbAirlineNameSelectorComponent::~CDbAirlineNameSelectorComponent() @@ -45,18 +45,18 @@ namespace BlackGui { if (!CDbAirlineIcaoSelectorBase::setAirlineIcao(icao)) { return false; } QString name(icao.getName()); - this->ui->le_AirlineName->setText(name); + ui->le_AirlineName->setText(name); return true; } void CDbAirlineNameSelectorComponent::clear() { - this->ui->le_AirlineName->clear(); + ui->le_AirlineName->clear(); } void CDbAirlineNameSelectorComponent::setReadOnly(bool readOnly) { - this->ui->le_AirlineName->setReadOnly(readOnly); + ui->le_AirlineName->setReadOnly(readOnly); } QCompleter *CDbAirlineNameSelectorComponent::createCompleter() @@ -65,14 +65,14 @@ namespace BlackGui c->setCaseSensitivity(Qt::CaseInsensitive); c->setCompletionMode(QCompleter::PopupCompletion); c->setMaxVisibleItems(10); - this->ui->le_AirlineName->setCompleter(c); + ui->le_AirlineName->setCompleter(c); return c; } void CDbAirlineNameSelectorComponent::ps_dataChanged() { if (!sGui) { return; } - QString s(this->ui->le_AirlineName->text()); + QString s(ui->le_AirlineName->text()); if (s.isEmpty()) { return; } int dbKey = CDatastoreUtility::extractIntegerKey(s); if (dbKey >= 0) diff --git a/src/blackgui/components/dbcountrycomponent.cpp b/src/blackgui/components/dbcountrycomponent.cpp index e34d31bb6..53ee7ec31 100644 --- a/src/blackgui/components/dbcountrycomponent.cpp +++ b/src/blackgui/components/dbcountrycomponent.cpp @@ -31,13 +31,13 @@ namespace BlackGui ui(new Ui::CDbCountryComponent) { ui->setupUi(this); - this->setViewWithIndicator(this->ui->tvp_Countries); - this->ui->tvp_Countries->setResizeMode(CViewBaseNonTemplate::ResizingOnce); - connect(this->ui->tvp_Countries, &CCountryView::requestNewBackendData, this, &CDbCountryComponent::ps_reload); + this->setViewWithIndicator(ui->tvp_Countries); + ui->tvp_Countries->setResizeMode(CViewBaseNonTemplate::ResizingOnce); + connect(ui->tvp_Countries, &CCountryView::requestNewBackendData, this, &CDbCountryComponent::ps_reload); // filter and drag and drop - this->ui->tvp_Countries->setFilterWidget(this->ui->filter_CountryComponent); - this->ui->tvp_Countries->allowDragDrop(true, false); + ui->tvp_Countries->setFilterWidget(ui->filter_CountryComponent); + ui->tvp_Countries->allowDragDrop(true, false); connect(sApp->getWebDataServices(), &CWebDataServices::dataRead, this, &CDbCountryComponent::ps_countriesRead); this->ps_countriesRead(CEntityFlags::CountryEntity, CEntityFlags::ReadFinished, sGui->getWebDataServices()->getCountriesCount()); @@ -51,7 +51,7 @@ namespace BlackGui Q_UNUSED(count); if (entity.testFlag(CEntityFlags::CountryEntity) && readState == CEntityFlags::ReadFinished) { - this->ui->tvp_Countries->updateContainerMaybeAsync(sApp->getWebDataServices()->getCountries()); + ui->tvp_Countries->updateContainerMaybeAsync(sApp->getWebDataServices()->getCountries()); } } diff --git a/src/blackgui/components/dbcountryselectorcomponent.cpp b/src/blackgui/components/dbcountryselectorcomponent.cpp index 943eb8119..4b64f6dab 100644 --- a/src/blackgui/components/dbcountryselectorcomponent.cpp +++ b/src/blackgui/components/dbcountryselectorcomponent.cpp @@ -50,7 +50,7 @@ namespace BlackGui connect(ui->le_CountryIso, &QLineEdit::editingFinished, this, &CDbCountrySelectorComponent::ps_dataChanged); connect(ui->le_CountryName, &QLineEdit::returnPressed, this, &CDbCountrySelectorComponent::ps_dataChanged); - this->ui->le_CountryIso->setValidator(new CUpperCaseValidator(this)); + ui->le_CountryIso->setValidator(new CUpperCaseValidator(this)); connect(sGui->getWebDataServices(), &CWebDataServices::dataRead, this, &CDbCountrySelectorComponent::ps_CountriesRead); this->ps_CountriesRead(CEntityFlags::DistributorEntity, CEntityFlags::ReadFinished, sGui->getWebDataServices()->getCountriesCount()); } @@ -62,9 +62,9 @@ namespace BlackGui void CDbCountrySelectorComponent::setCountry(const BlackMisc::CCountry &country) { - this->ui->le_CountryIso->setText(country.getIsoCode()); - this->ui->le_CountryName->setText(country.getName()); - this->ui->lbl_CountryIcon->setPixmap(country.toPixmap()); + ui->le_CountryIso->setText(country.getIsoCode()); + ui->le_CountryName->setText(country.getName()); + ui->lbl_CountryIcon->setPixmap(country.toPixmap()); if (country != m_currentCountry) { m_currentCountry = country; @@ -81,8 +81,8 @@ namespace BlackGui BlackMisc::CCountry CDbCountrySelectorComponent::getCountry() const { if (!sGui) { return CCountry(); } - QString iso(this->ui->le_CountryIso->text().trimmed().toUpper()); - QString name(this->ui->le_CountryName->text().trimmed()); + QString iso(ui->le_CountryIso->text().trimmed().toUpper()); + QString name(ui->le_CountryName->text().trimmed()); if (CCountry::isValidIsoCode(iso)) { return sGui->getWebDataServices()->getCountryForIsoCode(iso); @@ -96,10 +96,10 @@ namespace BlackGui void CDbCountrySelectorComponent::setReadOnly(bool readOnly) { - this->ui->le_CountryIso->setReadOnly(readOnly); - this->ui->le_CountryName->setReadOnly(readOnly); - this->ui->le_CountryName->setEnabled((!readOnly)); - this->ui->lbl_CountryIcon->setVisible(!readOnly); + ui->le_CountryIso->setReadOnly(readOnly); + ui->le_CountryName->setReadOnly(readOnly); + ui->le_CountryName->setEnabled((!readOnly)); + ui->lbl_CountryIcon->setVisible(!readOnly); this->setEnabled(!readOnly); } @@ -110,9 +110,9 @@ namespace BlackGui void CDbCountrySelectorComponent::clear() { - this->ui->le_CountryIso->clear(); - this->ui->le_CountryName->clear(); - this->ui->lbl_CountryIcon->setPixmap(QPixmap()); + ui->le_CountryIso->clear(); + ui->le_CountryName->clear(); + ui->lbl_CountryIcon->setPixmap(QPixmap()); } void CDbCountrySelectorComponent::dragEnterEvent(QDragEnterEvent *event) @@ -168,7 +168,7 @@ namespace BlackGui c->setMaxVisibleItems(10); this->connect(c, static_cast(&QCompleter::activated), this, &CDbCountrySelectorComponent::ps_completerActivated); - this->ui->le_CountryName->setCompleter(c); + ui->le_CountryName->setCompleter(c); this->m_completerCountryNames.reset(c); // deletes any old completer } else @@ -182,17 +182,17 @@ namespace BlackGui { if (!sGui) { return; } QObject *sender = this->sender(); - if (sender == this->ui->le_CountryIso) + if (sender == ui->le_CountryIso) { - QString iso(this->ui->le_CountryIso->text().trimmed().toUpper()); + QString iso(ui->le_CountryIso->text().trimmed().toUpper()); if (CCountry::isValidIsoCode(iso)) { this->setCountry(sGui->getWebDataServices()->getCountryForIsoCode(iso)); } } - else if (sender == this->ui->le_CountryName) + else if (sender == ui->le_CountryName) { - QString name(this->ui->le_CountryName->text().trimmed()); + QString name(ui->le_CountryName->text().trimmed()); if (!name.isEmpty()) { this->setCountry(sGui->getWebDataServices()->getCountryForName(name)); @@ -202,7 +202,7 @@ namespace BlackGui void CDbCountrySelectorComponent::ps_completerActivated(const QString &countryName) { - this->ui->le_CountryName->setText(countryName); + ui->le_CountryName->setText(countryName); this->setCountry(sGui->getWebDataServices()->getCountryForName(countryName)); } diff --git a/src/blackgui/components/dbdistributorcomponent.cpp b/src/blackgui/components/dbdistributorcomponent.cpp index 7132a2465..a464e699c 100644 --- a/src/blackgui/components/dbdistributorcomponent.cpp +++ b/src/blackgui/components/dbdistributorcomponent.cpp @@ -32,10 +32,10 @@ namespace BlackGui ui(new Ui::CDbDistributorComponent) { ui->setupUi(this); - this->setViewWithIndicator(this->ui->tvp_Distributors); - this->ui->tvp_Distributors->setResizeMode(CViewBaseNonTemplate::ResizingAuto); - this->ui->tvp_Distributors->allowDragDrop(true, false); - connect(this->ui->tvp_Distributors, &CDistributorView::requestNewBackendData, this, &CDbDistributorComponent::ps_reload); + this->setViewWithIndicator(ui->tvp_Distributors); + ui->tvp_Distributors->setResizeMode(CViewBaseNonTemplate::ResizingAuto); + ui->tvp_Distributors->allowDragDrop(true, false); + connect(ui->tvp_Distributors, &CDistributorView::requestNewBackendData, this, &CDbDistributorComponent::ps_reload); connect(sGui->getWebDataServices(), &CWebDataServices::dataRead, this, &CDbDistributorComponent::ps_distributorsRead); this->ps_distributorsRead(CEntityFlags::DistributorEntity, CEntityFlags::ReadFinished, sGui->getWebDataServices()->getDistributorsCount()); } @@ -48,7 +48,7 @@ namespace BlackGui Q_UNUSED(count); if (entity.testFlag(CEntityFlags::DistributorEntity) && readState == CEntityFlags::ReadFinished) { - this->ui->tvp_Distributors->updateContainer(sGui->getWebDataServices()->getDistributors()); + ui->tvp_Distributors->updateContainer(sGui->getWebDataServices()->getDistributors()); } } diff --git a/src/blackgui/components/dbdistributorselectorcomponent.cpp b/src/blackgui/components/dbdistributorselectorcomponent.cpp index dca2598bd..0bf542476 100644 --- a/src/blackgui/components/dbdistributorselectorcomponent.cpp +++ b/src/blackgui/components/dbdistributorselectorcomponent.cpp @@ -48,7 +48,7 @@ namespace BlackGui ui->setupUi(this); this->setAcceptDrops(true); this->setAcceptedMetaTypeIds({qMetaTypeId(), qMetaTypeId()}); - this->ui->le_Distributor->setValidator(new CUpperCaseValidator(this)); + ui->le_Distributor->setValidator(new CUpperCaseValidator(this)); bool c = connect(ui->le_Distributor, &QLineEdit::returnPressed, this, &CDbDistributorSelectorComponent::ps_dataChanged); Q_ASSERT_X(c, Q_FUNC_INFO, "Missing connect"); @@ -70,7 +70,7 @@ namespace BlackGui if (key.isEmpty()) { return; } if (distributor != m_currentDistributor) { - this->ui->le_Distributor->setText(key); + ui->le_Distributor->setText(key); m_currentDistributor = distributor; emit changedDistributor(distributor); } @@ -87,15 +87,15 @@ namespace BlackGui } else { - this->ui->lbl_Description->setText(""); - this->ui->le_Distributor->setText(keyOrAlias); + ui->lbl_Description->setText(""); + ui->le_Distributor->setText(keyOrAlias); } } CDistributor CDbDistributorSelectorComponent::getDistributor() const { if (!sGui) { return CDistributor(); } - QString distributorKeyOrAlias(this->ui->le_Distributor->text().trimmed().toUpper()); + QString distributorKeyOrAlias(ui->le_Distributor->text().trimmed().toUpper()); if (distributorKeyOrAlias.isEmpty()) { return CDistributor(); } if (this->m_currentDistributor.matchesKeyOrAlias(distributorKeyOrAlias)) { return this->m_currentDistributor; } @@ -110,12 +110,12 @@ namespace BlackGui void CDbDistributorSelectorComponent::setReadOnly(bool readOnly) { - this->ui->le_Distributor->setReadOnly(readOnly); + ui->le_Distributor->setReadOnly(readOnly); } void CDbDistributorSelectorComponent::withDistributorDescription(bool description) { - this->ui->lbl_Description->setVisible(description); + ui->lbl_Description->setVisible(description); } bool CDbDistributorSelectorComponent::isSet() const @@ -125,7 +125,7 @@ namespace BlackGui void CDbDistributorSelectorComponent::clear() { - this->ui->le_Distributor->clear(); + ui->le_Distributor->clear(); } void CDbDistributorSelectorComponent::dragEnterEvent(QDragEnterEvent *event) @@ -182,7 +182,7 @@ namespace BlackGui c->setMaxVisibleItems(10); this->connect(c, static_cast(&QCompleter::activated), this, &CDbDistributorSelectorComponent::ps_completerActivated); - this->ui->le_Distributor->setCompleter(c); + ui->le_Distributor->setCompleter(c); m_completerDistributors.reset(c); // deletes any old completer this->setReadOnly(false); } @@ -197,7 +197,7 @@ namespace BlackGui void CDbDistributorSelectorComponent::ps_dataChanged() { if (!sGui) { return; } - QString keyOrAlias(this->ui->le_Distributor->text().trimmed().toUpper()); + QString keyOrAlias(ui->le_Distributor->text().trimmed().toUpper()); if (keyOrAlias.isEmpty()) { return; } CDistributor d(sGui->getWebDataServices()->getDistributors().findByKeyOrAlias(keyOrAlias)); this->setDistributor(d); diff --git a/src/blackgui/components/dbliverycomponent.cpp b/src/blackgui/components/dbliverycomponent.cpp index 4bdb2d19c..977195054 100644 --- a/src/blackgui/components/dbliverycomponent.cpp +++ b/src/blackgui/components/dbliverycomponent.cpp @@ -30,12 +30,12 @@ namespace BlackGui ui(new Ui::CDbLiveryComponent) { ui->setupUi(this); - this->setViewWithIndicator(this->ui->tvp_Liveries); - connect(this->ui->tvp_Liveries, &CLiveryView::requestNewBackendData, this, &CDbLiveryComponent::ps_reload); + this->setViewWithIndicator(ui->tvp_Liveries); + connect(ui->tvp_Liveries, &CLiveryView::requestNewBackendData, this, &CDbLiveryComponent::ps_reload); // filter and drag and drop - this->ui->tvp_Liveries->setFilterWidget(this->ui->filter_Livery); - this->ui->tvp_Liveries->allowDragDrop(true, false); + ui->tvp_Liveries->setFilterWidget(ui->filter_Livery); + ui->tvp_Liveries->allowDragDrop(true, false); connect(sGui->getWebDataServices(), &CWebDataServices::dataRead, this, &CDbLiveryComponent::ps_liveriesRead); this->ps_liveriesRead(CEntityFlags::LiveryEntity, CEntityFlags::ReadFinished, sGui->getWebDataServices()->getLiveriesCount()); @@ -46,7 +46,7 @@ namespace BlackGui void CDbLiveryComponent::filter(const BlackMisc::Aviation::CLivery &livery) { - this->ui->filter_Livery->filter(livery); + ui->filter_Livery->filter(livery); } void CDbLiveryComponent::ps_liveriesRead(CEntityFlags::Entity entity, CEntityFlags::ReadState readState, int count) @@ -54,7 +54,7 @@ namespace BlackGui Q_UNUSED(count); if (entity.testFlag(CEntityFlags::LiveryEntity) && readState == CEntityFlags::ReadFinished) { - this->ui->tvp_Liveries->updateContainerMaybeAsync(sGui->getWebDataServices()->getLiveries()); + ui->tvp_Liveries->updateContainerMaybeAsync(sGui->getWebDataServices()->getLiveries()); } } diff --git a/src/blackgui/components/dbliveryselectorcomponent.cpp b/src/blackgui/components/dbliveryselectorcomponent.cpp index fc5edcfae..9971b43a3 100644 --- a/src/blackgui/components/dbliveryselectorcomponent.cpp +++ b/src/blackgui/components/dbliveryselectorcomponent.cpp @@ -68,12 +68,12 @@ namespace BlackGui QString code(livery.getCombinedCode()); if (code.isEmpty()) { - this->ui->le_Livery->clear(); + ui->le_Livery->clear(); return; } if (livery != m_currentLivery) { - this->ui->le_Livery->setText(code); + ui->le_Livery->setText(code); m_currentLivery = livery; emit changedLivery(livery); } @@ -95,8 +95,8 @@ namespace BlackGui } else { - this->ui->lbl_Description->setText(""); - this->ui->le_Livery->setText(code); + ui->lbl_Description->setText(""); + ui->le_Livery->setText(code); } } @@ -104,7 +104,7 @@ namespace BlackGui { if (!sApp) { return CLivery(); } const QString liveryCode( - this->stripExtraInfo(this->ui->le_Livery->text()) + this->stripExtraInfo(ui->le_Livery->text()) ); const CLivery liv(sApp->getWebDataServices()->getLiveries().findByCombinedCode(liveryCode)); if (liv.hasCompleteData() && liv.hasValidDbKey()) @@ -120,18 +120,18 @@ namespace BlackGui QString CDbLiverySelectorComponent::getRawCombinedCode() const { - const QString cc(this->ui->le_Livery->text().trimmed().toUpper()); + const QString cc(ui->le_Livery->text().trimmed().toUpper()); return stripDesignatorFromCompleterString(cc); } void CDbLiverySelectorComponent::setReadOnly(bool readOnly) { - this->ui->le_Livery->setReadOnly(readOnly); + ui->le_Livery->setReadOnly(readOnly); } void CDbLiverySelectorComponent::withLiveryDescription(bool description) { - this->ui->lbl_Description->setVisible(description); + ui->lbl_Description->setVisible(description); } bool CDbLiverySelectorComponent::isSet() const @@ -141,7 +141,7 @@ namespace BlackGui void CDbLiverySelectorComponent::clear() { - this->ui->le_Livery->clear(); + ui->le_Livery->clear(); } void CDbLiverySelectorComponent::dragEnterEvent(QDragEnterEvent *event) @@ -198,7 +198,7 @@ namespace BlackGui c->setMaxVisibleItems(10); this->connect(c, static_cast(&QCompleter::activated), this, &CDbLiverySelectorComponent::ps_completerActivated); - this->ui->le_Livery->setCompleter(c); + ui->le_Livery->setCompleter(c); m_completerLiveries.reset(c); // deletes any old completer } else @@ -212,7 +212,7 @@ namespace BlackGui { if (!sApp) { return; } const QString code( - this->stripExtraInfo(this->ui->le_Livery->text()) + this->stripExtraInfo(ui->le_Livery->text()) ); if (code.isEmpty()) { return; } const CLivery livery(sApp->getWebDataServices()->getLiveries().findByCombinedCode(code)); diff --git a/src/blackgui/components/dbmodelcomponent.cpp b/src/blackgui/components/dbmodelcomponent.cpp index 2b51adaa5..457699b76 100644 --- a/src/blackgui/components/dbmodelcomponent.cpp +++ b/src/blackgui/components/dbmodelcomponent.cpp @@ -39,17 +39,17 @@ namespace BlackGui ui(new Ui::CDbModelComponent) { ui->setupUi(this); - this->setViewWithIndicator(this->ui->tvp_AircraftModel); - this->ui->tvp_AircraftModel->setAircraftModelMode(CAircraftModelListModel::Database); - this->ui->tvp_AircraftModel->menuAddItems(CAircraftModelView::MenuStashing); - this->ui->tvp_AircraftModel->menuRemoveItems(CAircraftModelView::MenuHighlightStashed); // not supported here - connect(this->ui->tvp_AircraftModel, &CAircraftModelView::requestNewBackendData, this, &CDbModelComponent::ps_reload); - connect(this->ui->tvp_AircraftModel, &CAircraftModelView::requestStash, this, &CDbModelComponent::requestStash); + this->setViewWithIndicator(ui->tvp_AircraftModel); + ui->tvp_AircraftModel->setAircraftModelMode(CAircraftModelListModel::Database); + ui->tvp_AircraftModel->menuAddItems(CAircraftModelView::MenuStashing); + ui->tvp_AircraftModel->menuRemoveItems(CAircraftModelView::MenuHighlightStashed); // not supported here + connect(ui->tvp_AircraftModel, &CAircraftModelView::requestNewBackendData, this, &CDbModelComponent::ps_reload); + connect(ui->tvp_AircraftModel, &CAircraftModelView::requestStash, this, &CDbModelComponent::requestStash); connect(sGui, &CGuiApplication::styleSheetsChanged, this, &CDbModelComponent::ps_onStyleSheetChanged); // configure view - this->ui->tvp_AircraftModel->setFilterWidget(this->ui->filter_AircraftModelFilter); - this->ui->tvp_AircraftModel->allowDragDrop(true, false); + ui->tvp_AircraftModel->setFilterWidget(ui->filter_AircraftModelFilter); + ui->tvp_AircraftModel->allowDragDrop(true, false); connect(sApp->getWebDataServices(), &CWebDataServices::dataRead, this, &CDbModelComponent::ps_modelsRead); this->ps_modelsRead(CEntityFlags::ModelEntity, CEntityFlags::ReadFinished, sApp->getWebDataServices()->getModelsCount()); @@ -62,15 +62,15 @@ namespace BlackGui bool CDbModelComponent::hasModels() const { - return !this->ui->tvp_AircraftModel->isEmpty(); + return !ui->tvp_AircraftModel->isEmpty(); } void CDbModelComponent::requestUpdatedData() { QDateTime ts; - if (!this->ui->tvp_AircraftModel->isEmpty()) + if (!ui->tvp_AircraftModel->isEmpty()) { - CAircraftModel model(this->ui->tvp_AircraftModel->container().latestObject()); + CAircraftModel model(ui->tvp_AircraftModel->container().latestObject()); ts = model.getUtcTimestamp(); } sGui->getWebDataServices()->triggerReloadFromDb(CEntityFlags::ModelEntity, ts); @@ -83,7 +83,7 @@ namespace BlackGui { if (readState == CEntityFlags::ReadFinished || readState == CEntityFlags::ReadFinishedRestricted) { - this->ui->tvp_AircraftModel->updateContainerMaybeAsync(sGui->getWebDataServices()->getModels()); + ui->tvp_AircraftModel->updateContainerMaybeAsync(sGui->getWebDataServices()->getModels()); } } } @@ -101,8 +101,8 @@ namespace BlackGui void CDbModelComponent::ps_stashSelectedModels() { - if (!this->ui->tvp_AircraftModel->hasSelection()) { return; } - const CAircraftModelList models(this->ui->tvp_AircraftModel->selectedObjects()); + if (!ui->tvp_AircraftModel->hasSelection()) { return; } + const CAircraftModelList models(ui->tvp_AircraftModel->selectedObjects()); if (!models.isEmpty()) { emit requestStash(models); diff --git a/src/blackgui/components/dbmodelmappingmodifycomponent.cpp b/src/blackgui/components/dbmodelmappingmodifycomponent.cpp index c4f7630c5..212b92da4 100644 --- a/src/blackgui/components/dbmodelmappingmodifycomponent.cpp +++ b/src/blackgui/components/dbmodelmappingmodifycomponent.cpp @@ -40,7 +40,7 @@ namespace BlackGui void CDbModelMappingModifyComponent::setValue(const CAircraftModel &model) { - this->ui->editor_ModelMappingModify->setValue(model); + ui->editor_ModelMappingModify->setValue(model); } } // ns } // ns diff --git a/src/blackgui/components/dbownmodelscomponent.cpp b/src/blackgui/components/dbownmodelscomponent.cpp index 30792c6b3..febe36207 100644 --- a/src/blackgui/components/dbownmodelscomponent.cpp +++ b/src/blackgui/components/dbownmodelscomponent.cpp @@ -190,7 +190,7 @@ namespace BlackGui { Q_ASSERT_X(sim.isSingleSimulator(), Q_FUNC_INFO, "Need single simulator"); const QString n("simulator models " + sim.toQString(true)); - this->ui->tvp_OwnAircraftModels->setSaveFileName(n); + ui->tvp_OwnAircraftModels->setSaveFileName(n); } QString CDbOwnModelsComponent::directorySelector(const CSimulatorInfo &simulatorInfo) @@ -390,7 +390,7 @@ namespace BlackGui void CDbOwnModelsComponent::ps_requestOwnModelsUpdate() { if (!this->m_modelLoader) { return; } - this->ui->tvp_OwnAircraftModels->updateContainerMaybeAsync( + ui->tvp_OwnAircraftModels->updateContainerMaybeAsync( this->m_modelLoader->getAircraftModels() ); } @@ -410,7 +410,7 @@ namespace BlackGui } CLogMessage(this).info("Starting loading for %1") << simulator.toQString(); - this->ui->tvp_OwnAircraftModels->showLoadIndicator(); + ui->tvp_OwnAircraftModels->showLoadIndicator(); Q_ASSERT_X(sGui && sGui->getWebDataServices(), Q_FUNC_INFO, "missing web data services"); this->m_modelLoader->startLoading(mode, &CDatabaseUtils::consolidateModelsWithDbData, directory); } @@ -422,7 +422,7 @@ namespace BlackGui { const CAircraftModelList models(this->m_modelLoader->getAircraftModels()); const int modelsLoaded = models.size(); - this->ui->tvp_OwnAircraftModels->updateContainerMaybeAsync(models); + ui->tvp_OwnAircraftModels->updateContainerMaybeAsync(models); if (modelsLoaded < 1) { // loading ok, but no data @@ -431,10 +431,10 @@ namespace BlackGui } else { - this->ui->tvp_OwnAircraftModels->clear(); + ui->tvp_OwnAircraftModels->clear(); CLogMessage(this).error("Loading of models failed, simulator %1") << simulator.toQString(); } - this->ui->tvp_OwnAircraftModels->hideLoadIndicator(); + ui->tvp_OwnAircraftModels->hideLoadIndicator(); } void CDbOwnModelsComponent::ps_requestSimulatorModels(const CSimulatorInfo &simulator, IAircraftModelLoader::LoadMode mode, const QString &directory) diff --git a/src/blackgui/components/dbownmodelsetcomponent.cpp b/src/blackgui/components/dbownmodelsetcomponent.cpp index c9acb926d..de42786ea 100644 --- a/src/blackgui/components/dbownmodelsetcomponent.cpp +++ b/src/blackgui/components/dbownmodelsetcomponent.cpp @@ -102,7 +102,7 @@ namespace BlackGui this->setModelSetSimulator(simulator); if (models.isEmpty()) { - this->ui->tvp_OwnModelSet->clear(); + ui->tvp_OwnModelSet->clear(); return; } @@ -114,7 +114,7 @@ namespace BlackGui CLogMessage(this).warning("Removed %1 models from set because not matching %2") << diff << simulator.toQString(true); } cleanModelList.resetOrder(); - this->ui->tvp_OwnModelSet->updateContainerMaybeAsync(cleanModelList); + ui->tvp_OwnModelSet->updateContainerMaybeAsync(cleanModelList); } void CDbOwnModelSetComponent::replaceOrAddModelSet(const CAircraftModelList &models, const CSimulatorInfo &simulator) @@ -128,10 +128,10 @@ namespace BlackGui CLogMessage(this).warning("Removed %1 models from set because not matching %2") << diff << simulator.toQString(true); } if (cleanModelList.isEmpty()) { return; } - CAircraftModelList updatedModels(this->ui->tvp_OwnModelSet->container()); + CAircraftModelList updatedModels(ui->tvp_OwnModelSet->container()); updatedModels.replaceOrAddModelsWithString(cleanModelList, Qt::CaseInsensitive); updatedModels.resetOrder(); - this->ui->tvp_OwnModelSet->updateContainerMaybeAsync(updatedModels); + ui->tvp_OwnModelSet->updateContainerMaybeAsync(updatedModels); } const CAircraftModelList &CDbOwnModelSetComponent::getModelSet() const @@ -169,7 +169,7 @@ namespace BlackGui if (d > 0) { updateModels.resetOrder(); - this->ui->tvp_OwnModelSet->updateContainerMaybeAsync(updateModels); + ui->tvp_OwnModelSet->updateContainerMaybeAsync(updateModels); return CStatusMessage(this, CStatusMessage::SeverityInfo, "Modified " + QString::number(d) + " entries in model set " + this->getModelSetSimulator().toQString(true), true); } else @@ -225,7 +225,7 @@ namespace BlackGui } else if (sender == ui->pb_LoadExistingSet) { - this->ui->tvp_OwnModelSet->showFileLoadDialog(); + ui->tvp_OwnModelSet->showFileLoadDialog(); } else if (sender == ui->pb_SaveAsSetForSimulator) { @@ -260,7 +260,7 @@ namespace BlackGui Q_UNUSED(withFilter); int realUnfilteredCount = ui->tvp_OwnModelSet->container().size(); bool canSave = this->getModelSetSimulator().isSingleSimulator() && (realUnfilteredCount > 0); - this->ui->pb_SaveAsSetForSimulator->setEnabled(canSave); + ui->pb_SaveAsSetForSimulator->setEnabled(canSave); if (canSave) { this->setSaveFileName(this->getModelSetSimulator()); @@ -299,7 +299,7 @@ namespace BlackGui { Q_ASSERT_X(sim.isSingleSimulator(), Q_FUNC_INFO, "Need single simulator"); const QString name("modelset" + sim.toQString(true)); - this->ui->tvp_OwnModelSet->setSaveFileName(name); + ui->tvp_OwnModelSet->setSaveFileName(name); } void CDbOwnModelSetComponent::updateViewToCurrentModels() diff --git a/src/blackgui/components/infobarstatuscomponent.cpp b/src/blackgui/components/infobarstatuscomponent.cpp index f3099247e..19cf5a293 100644 --- a/src/blackgui/components/infobarstatuscomponent.cpp +++ b/src/blackgui/components/infobarstatuscomponent.cpp @@ -45,8 +45,8 @@ namespace BlackGui ui->setupUi(this); this->initLeds(); - this->ui->lbl_Audio->setContextMenuPolicy(Qt::CustomContextMenu); - connect(this->ui->lbl_Audio, &QLabel::customContextMenuRequested, this, &CInfoBarStatusComponent::ps_customAudioContextMenuRequested); + ui->lbl_Audio->setContextMenuPolicy(Qt::CustomContextMenu); + connect(ui->lbl_Audio, &QLabel::customContextMenuRequested, this, &CInfoBarStatusComponent::ps_customAudioContextMenuRequested); if (sGui->getIContextSimulator()) { @@ -65,12 +65,12 @@ namespace BlackGui if (sGui->getIContextApplication()) { - this->ui->led_DBus->setOn(sGui->getIContextApplication()->isUsingImplementingObject()); + ui->led_DBus->setOn(sGui->getIContextApplication()->isUsingImplementingObject()); } if (sGui->getIContextAudio()) { - this->ui->led_Audio->setOn(!sGui->getIContextAudio()->isMuted()); + ui->led_Audio->setOn(!sGui->getIContextAudio()->isMuted()); connect(sGui->getIContextAudio(), &IContextAudio::changedMute, this, &CInfoBarStatusComponent::ps_onMuteChanged); } } @@ -81,24 +81,24 @@ namespace BlackGui void CInfoBarStatusComponent::initLeds() { CLedWidget::LedShape shape = CLedWidget::Circle; - this->ui->led_DBus->setValues(CLedWidget::Yellow, CLedWidget::Black, shape, "DBus connected", "DBus disconnected", 14); - this->ui->led_Network->setValues(CLedWidget::Yellow, CLedWidget::Black, shape, "Network connected", "Network disconnected", 14); - this->ui->led_Simulator->setValues(CLedWidget::Yellow, CLedWidget::Black, CLedWidget::Blue, shape, "Simulator running", "Simulator disconnected", "Simulator connected", 14); - this->ui->led_MapperReady->setValues(CLedWidget::Yellow, CLedWidget::Black, CLedWidget::Blue, shape, "Mapper ready", "Mappings loading", "Mappings loading", 14); + ui->led_DBus->setValues(CLedWidget::Yellow, CLedWidget::Black, shape, "DBus connected", "DBus disconnected", 14); + ui->led_Network->setValues(CLedWidget::Yellow, CLedWidget::Black, shape, "Network connected", "Network disconnected", 14); + ui->led_Simulator->setValues(CLedWidget::Yellow, CLedWidget::Black, CLedWidget::Blue, shape, "Simulator running", "Simulator disconnected", "Simulator connected", 14); + ui->led_MapperReady->setValues(CLedWidget::Yellow, CLedWidget::Black, CLedWidget::Blue, shape, "Mapper ready", "Mappings loading", "Mappings loading", 14); shape = CLedWidget::Rounded; - this->ui->led_Ptt->setValues(CLedWidget::Yellow, CLedWidget::Black, shape, "Ptt", "Silence", 18); - this->ui->led_Audio->setValues(CLedWidget::Yellow, CLedWidget::Black, shape, "On", "Muted", 18); + ui->led_Ptt->setValues(CLedWidget::Yellow, CLedWidget::Black, shape, "Ptt", "Silence", 18); + ui->led_Audio->setValues(CLedWidget::Yellow, CLedWidget::Black, shape, "On", "Muted", 18); } void CInfoBarStatusComponent::setDBusStatus(bool dbus) { - this->ui->led_DBus->setOn(dbus); + ui->led_DBus->setOn(dbus); } void CInfoBarStatusComponent::setDBusTooltip(const QString &tooltip) { - this->ui->led_DBus->setOnToolTip(tooltip); + ui->led_DBus->setOnToolTip(tooltip); } void CInfoBarStatusComponent::ps_onSimulatorStatusChanged(int status) @@ -113,23 +113,23 @@ namespace BlackGui if (status & ISimulator::Paused) { // in paused state - this->ui->led_Simulator->setTriState(); - this->ui->led_Simulator->setTriStateToolTip(s); + ui->led_Simulator->setTriState(); + ui->led_Simulator->setTriStateToolTip(s); } else if (status & ISimulator::Simulating) { - this->ui->led_Simulator->setOn(true); - this->ui->led_Simulator->setOnToolTip(s); + ui->led_Simulator->setOn(true); + ui->led_Simulator->setOnToolTip(s); } else { - this->ui->led_Simulator->setTriState(); - this->ui->led_Simulator->setTriStateToolTip(s); + ui->led_Simulator->setTriState(); + ui->led_Simulator->setTriStateToolTip(s); } } else { - this->ui->led_Simulator->setOn(false); + ui->led_Simulator->setOn(false); } } @@ -143,17 +143,17 @@ namespace BlackGui case INetwork::DisconnectedError: case INetwork::DisconnectedFailed: case INetwork::DisconnectedLost: - this->ui->led_Network->setOn(false); + ui->led_Network->setOn(false); break; case INetwork::Connected: - this->ui->led_Network->setOn(true); - this->ui->led_Network->setOnToolTip("Connected: " + sGui->getIContextNetwork()->getConnectedServer().getName()); + ui->led_Network->setOn(true); + ui->led_Network->setOnToolTip("Connected: " + sGui->getIContextNetwork()->getConnectedServer().getName()); break; case INetwork::Connecting: - this->ui->led_Network->setTriStateColor(CLedWidget::Yellow); + ui->led_Network->setTriStateColor(CLedWidget::Yellow); break; default: - this->ui->led_Network->setOn(false); + ui->led_Network->setOn(false); break; } } @@ -190,24 +190,24 @@ namespace BlackGui void CInfoBarStatusComponent::ps_onMuteChanged(bool muted) { - this->ui->led_Audio->setOn(!muted); + ui->led_Audio->setOn(!muted); } void CInfoBarStatusComponent::ps_onMapperReady() { if (!sGui->getIContextSimulator()) { - this->ui->led_MapperReady->setOn(false); + ui->led_MapperReady->setOn(false); return; } int models = sGui->getIContextSimulator()->getInstalledModelsCount(); bool on = (models > 0); - this->ui->led_MapperReady->setOn(on); + ui->led_MapperReady->setOn(on); if (on) { QString m = QString("Mapper with %1 models").arg(models); - this->ui->led_MapperReady->setToolTip(m); + ui->led_MapperReady->setToolTip(m); } } } // namespace diff --git a/src/blackgui/components/internalscomponent.cpp b/src/blackgui/components/internalscomponent.cpp index 61548bc60..a9b53107c 100644 --- a/src/blackgui/components/internalscomponent.cpp +++ b/src/blackgui/components/internalscomponent.cpp @@ -80,7 +80,7 @@ namespace BlackGui CLogMessage(this).validationError("Cannot send aircraft parts, network not connected"); return; } - CCallsign callsign(this->ui->comp_RemoteAircraftSelector->getSelectedCallsign()); + CCallsign callsign(ui->comp_RemoteAircraftSelector->getSelectedCallsign()); if (callsign.isEmpty()) { CLogMessage(this).validationError("No valid callsign selected"); @@ -92,7 +92,7 @@ namespace BlackGui if (json) { - QString jsonParts = this->ui->te_AircraftPartsJson->toPlainText().trimmed(); + QString jsonParts = ui->te_AircraftPartsJson->toPlainText().trimmed(); if (jsonParts.isEmpty()) { CLogMessage(this).validationError("No JSON content"); @@ -114,37 +114,37 @@ namespace BlackGui this->ps_guiToJson(); } - sGui->getIContextNetwork()->testAddAircraftParts(callsign, parts, this->ui->cb_AircraftPartsIncremental->isChecked()); + sGui->getIContextNetwork()->testAddAircraftParts(callsign, parts, ui->cb_AircraftPartsIncremental->isChecked()); CLogMessage(this).info("Added parts for %1") << callsign.toQString(); } void CInternalsComponent::ps_setAllLights() { bool on = QObject::sender() == ui->pb_AircraftPartsLightsOn ? true : false; - this->ui->cb_AircraftPartsLightsStrobe->setChecked(on); - this->ui->cb_AircraftPartsLightsLanding->setChecked(on); - this->ui->cb_AircraftPartsLightsTaxi->setChecked(on); - this->ui->cb_AircraftPartsLightsBeacon->setChecked(on); - this->ui->cb_AircraftPartsLightsNav->setChecked(on); - this->ui->cb_AircraftPartsLightsLogo->setChecked(on); + ui->cb_AircraftPartsLightsStrobe->setChecked(on); + ui->cb_AircraftPartsLightsLanding->setChecked(on); + ui->cb_AircraftPartsLightsTaxi->setChecked(on); + ui->cb_AircraftPartsLightsBeacon->setChecked(on); + ui->cb_AircraftPartsLightsNav->setChecked(on); + ui->cb_AircraftPartsLightsLogo->setChecked(on); } void CInternalsComponent::ps_setAllEngines() { bool on = QObject::sender() == ui->pb_AircraftPartsEnginesOn ? true : false; - this->ui->cb_AircraftPartsEngine1->setChecked(on); - this->ui->cb_AircraftPartsEngine2->setChecked(on); - this->ui->cb_AircraftPartsEngine3->setChecked(on); - this->ui->cb_AircraftPartsEngine4->setChecked(on); - this->ui->cb_AircraftPartsEngine5->setChecked(on); - this->ui->cb_AircraftPartsEngine6->setChecked(on); + ui->cb_AircraftPartsEngine1->setChecked(on); + ui->cb_AircraftPartsEngine2->setChecked(on); + ui->cb_AircraftPartsEngine3->setChecked(on); + ui->cb_AircraftPartsEngine4->setChecked(on); + ui->cb_AircraftPartsEngine5->setChecked(on); + ui->cb_AircraftPartsEngine6->setChecked(on); } void CInternalsComponent::ps_guiToJson() { QJsonDocument json(guiToAircraftParts().toJson()); QString j(json.toJson(QJsonDocument::Indented)); - this->ui->te_AircraftPartsJson->setText(j); + ui->te_AircraftPartsJson->setText(j); } void CInternalsComponent::ps_enableDebug(int state) @@ -167,8 +167,8 @@ namespace BlackGui else if (sender == ui->cb_DebugDriver || sender == ui->cb_DebugInterpolator) { sGui->getIContextSimulator()->enableDebugMessages( - this->ui->cb_DebugDriver->isChecked(), - this->ui->cb_DebugInterpolator->isChecked() + ui->cb_DebugDriver->isChecked(), + ui->cb_DebugInterpolator->isChecked() ); } } @@ -176,55 +176,55 @@ namespace BlackGui CAircraftParts CInternalsComponent::guiToAircraftParts() const { CAircraftLights lights( - this->ui->cb_AircraftPartsLightsStrobe->isChecked(), - this->ui->cb_AircraftPartsLightsLanding->isChecked(), - this->ui->cb_AircraftPartsLightsTaxi->isChecked(), - this->ui->cb_AircraftPartsLightsBeacon->isChecked(), - this->ui->cb_AircraftPartsLightsNav->isChecked(), - this->ui->cb_AircraftPartsLightsLogo->isChecked() + ui->cb_AircraftPartsLightsStrobe->isChecked(), + ui->cb_AircraftPartsLightsLanding->isChecked(), + ui->cb_AircraftPartsLightsTaxi->isChecked(), + ui->cb_AircraftPartsLightsBeacon->isChecked(), + ui->cb_AircraftPartsLightsNav->isChecked(), + ui->cb_AircraftPartsLightsLogo->isChecked() ); CAircraftEngineList engines( { - this->ui->cb_AircraftPartsEngine1->isChecked(), - this->ui->cb_AircraftPartsEngine2->isChecked(), - this->ui->cb_AircraftPartsEngine3->isChecked(), - this->ui->cb_AircraftPartsEngine4->isChecked(), - this->ui->cb_AircraftPartsEngine5->isChecked(), - this->ui->cb_AircraftPartsEngine6->isChecked() + ui->cb_AircraftPartsEngine1->isChecked(), + ui->cb_AircraftPartsEngine2->isChecked(), + ui->cb_AircraftPartsEngine3->isChecked(), + ui->cb_AircraftPartsEngine4->isChecked(), + ui->cb_AircraftPartsEngine5->isChecked(), + ui->cb_AircraftPartsEngine6->isChecked() } ); CAircraftParts parts(lights, - this->ui->cb_AircraftPartsGearDown->isChecked(), - this->ui->sb_AircraftPartsFlapsPercentage->value(), - this->ui->cb_AircraftPartsSpoilers->isChecked(), + ui->cb_AircraftPartsGearDown->isChecked(), + ui->sb_AircraftPartsFlapsPercentage->value(), + ui->cb_AircraftPartsSpoilers->isChecked(), engines, - this->ui->cb_AircraftPartsIsOnGround->isChecked() + ui->cb_AircraftPartsIsOnGround->isChecked() ); return parts; } void CInternalsComponent::partsToGui(const CAircraftParts &parts) { - this->ui->cb_AircraftPartsGearDown->setChecked(parts.isGearDown()); - this->ui->cb_AircraftPartsIsOnGround->setChecked(parts.isOnGround()); - this->ui->cb_AircraftPartsSpoilers->setChecked(parts.isSpoilersOut()); - this->ui->sb_AircraftPartsFlapsPercentage->setValue(parts.getFlapsPercent()); + ui->cb_AircraftPartsGearDown->setChecked(parts.isGearDown()); + ui->cb_AircraftPartsIsOnGround->setChecked(parts.isOnGround()); + ui->cb_AircraftPartsSpoilers->setChecked(parts.isSpoilersOut()); + ui->sb_AircraftPartsFlapsPercentage->setValue(parts.getFlapsPercent()); CAircraftLights lights = parts.getLights(); - this->ui->cb_AircraftPartsLightsBeacon->setChecked(lights.isBeaconOn()); - this->ui->cb_AircraftPartsLightsLanding->setChecked(lights.isLandingOn()); - this->ui->cb_AircraftPartsLightsLogo->setChecked(lights.isLogoOn()); - this->ui->cb_AircraftPartsLightsNav->setChecked(lights.isNavOn()); - this->ui->cb_AircraftPartsLightsStrobe->setChecked(lights.isStrobeOn()); - this->ui->cb_AircraftPartsLightsTaxi->setChecked(lights.isTaxiOn()); + ui->cb_AircraftPartsLightsBeacon->setChecked(lights.isBeaconOn()); + ui->cb_AircraftPartsLightsLanding->setChecked(lights.isLandingOn()); + ui->cb_AircraftPartsLightsLogo->setChecked(lights.isLogoOn()); + ui->cb_AircraftPartsLightsNav->setChecked(lights.isNavOn()); + ui->cb_AircraftPartsLightsStrobe->setChecked(lights.isStrobeOn()); + ui->cb_AircraftPartsLightsTaxi->setChecked(lights.isTaxiOn()); CAircraftEngineList engines = parts.getEngines(); - this->ui->cb_AircraftPartsEngine1->setChecked(engines.isEngineOn(1)); - this->ui->cb_AircraftPartsEngine2->setChecked(engines.isEngineOn(2)); - this->ui->cb_AircraftPartsEngine3->setChecked(engines.isEngineOn(3)); - this->ui->cb_AircraftPartsEngine4->setChecked(engines.isEngineOn(4)); - this->ui->cb_AircraftPartsEngine5->setChecked(engines.isEngineOn(5)); - this->ui->cb_AircraftPartsEngine6->setChecked(engines.isEngineOn(6)); + ui->cb_AircraftPartsEngine1->setChecked(engines.isEngineOn(1)); + ui->cb_AircraftPartsEngine2->setChecked(engines.isEngineOn(2)); + ui->cb_AircraftPartsEngine3->setChecked(engines.isEngineOn(3)); + ui->cb_AircraftPartsEngine4->setChecked(engines.isEngineOn(4)); + ui->cb_AircraftPartsEngine5->setChecked(engines.isEngineOn(5)); + ui->cb_AircraftPartsEngine6->setChecked(engines.isEngineOn(6)); } diff --git a/src/blackgui/components/logcomponent.cpp b/src/blackgui/components/logcomponent.cpp index e93e01cd3..4ca4f7c78 100644 --- a/src/blackgui/components/logcomponent.cpp +++ b/src/blackgui/components/logcomponent.cpp @@ -49,10 +49,10 @@ namespace BlackGui QFrame(parent), ui(new Ui::CLogComponent) { ui->setupUi(this); - this->ui->tvp_StatusMessages->setAutoResizeFrequency(3); - connect(this->ui->tvp_StatusMessages, &CStatusMessageView::objectSelected, this->ui->form_StatusMessage, &CStatusMessageForm::setVariant); - this->ui->tvp_StatusMessages->setCustomMenu(new CLogMenu(this)); - this->ui->tvp_StatusMessages->menuAddItems(CStatusMessageView::MenuSave); + ui->tvp_StatusMessages->setAutoResizeFrequency(3); + connect(ui->tvp_StatusMessages, &CStatusMessageView::objectSelected, ui->form_StatusMessage, &CStatusMessageForm::setVariant); + ui->tvp_StatusMessages->setCustomMenu(new CLogMenu(this)); + ui->tvp_StatusMessages->menuAddItems(CStatusMessageView::MenuSave); } CLogComponent::~CLogComponent() @@ -60,13 +60,13 @@ namespace BlackGui void CLogComponent::displayLog(bool attention) { - this->ui->tw_StatusPage->setCurrentIndex(0); + ui->tw_StatusPage->setCurrentIndex(0); if (attention) { emit requestAttention(); } } void CLogComponent::displayConsole(bool attention) { - this->ui->tw_StatusPage->setCurrentIndex(1); + ui->tw_StatusPage->setCurrentIndex(1); if (attention) { emit requestAttention(); } } @@ -78,24 +78,24 @@ namespace BlackGui void CLogComponent::appendStatusMessageToConsole(const CStatusMessage &statusMessage) { if (statusMessage.isEmpty()) return; - this->ui->tep_StatusPageConsole->appendHtml(statusMessage.toHtml()); + ui->tep_StatusPageConsole->appendHtml(statusMessage.toHtml()); } void CLogComponent::appendPlainTextToConsole(const QString &text) { - this->ui->tep_StatusPageConsole->appendPlainText(text); + ui->tep_StatusPageConsole->appendPlainText(text); } void CLogComponent::appendStatusMessageToList(const CStatusMessage &statusMessage) { if (statusMessage.isEmpty()) { return; } - this->ui->tvp_StatusMessages->insert(statusMessage); + ui->tvp_StatusMessages->insert(statusMessage); } void CLogComponent::appendStatusMessagesToList(const CStatusMessageList &statusMessages) { if (statusMessages.isEmpty()) { return; } - this->ui->tvp_StatusMessages->insert(statusMessages); + ui->tvp_StatusMessages->insert(statusMessages); } void CLogComponent::CLogMenu::customMenu(CMenuActions &menuActions) diff --git a/src/blackgui/components/maininfoareacomponent.cpp b/src/blackgui/components/maininfoareacomponent.cpp index 6b4c7e31d..6c7f3f00a 100644 --- a/src/blackgui/components/maininfoareacomponent.cpp +++ b/src/blackgui/components/maininfoareacomponent.cpp @@ -37,63 +37,63 @@ namespace BlackGui CAtcStationComponent *CMainInfoAreaComponent::getAtcStationComponent() { - return this->ui->comp_AtcStations; + return ui->comp_AtcStations; } CAircraftComponent *CMainInfoAreaComponent::getAircraftComponent() { - return this->ui->comp_Aircraft; + return ui->comp_Aircraft; } CMappingComponent *CMainInfoAreaComponent::getMappingComponet() { - return this->ui->comp_Mappings; + return ui->comp_Mappings; } CUserComponent *CMainInfoAreaComponent::getUserComponent() { - return this->ui->comp_Users; + return ui->comp_Users; } CCockpitComponent *CMainInfoAreaComponent::getCockpitComponent() { - return this->ui->comp_Cockpit; + return ui->comp_Cockpit; } CFlightPlanComponent *CMainInfoAreaComponent::getFlightPlanComponent() { - return this->ui->comp_FlightPlan; + return ui->comp_FlightPlan; } CSettingsComponent *CMainInfoAreaComponent::getSettingsComponent() { - return this->ui->comp_Settings; + return ui->comp_Settings; } CLogComponent *CMainInfoAreaComponent::getLogComponent() { - return this->ui->comp_Log; + return ui->comp_Log; } CSimulatorComponent *CMainInfoAreaComponent::getSimulatorComponent() { - return this->ui->comp_Simulator; + return ui->comp_Simulator; } CTextMessageComponent *CMainInfoAreaComponent::getTextMessageComponent() { - return this->ui->comp_TextMessages; + return ui->comp_TextMessages; } void CMainInfoAreaComponent::displayLog() { - this->ui->comp_Log->displayLog(); + ui->comp_Log->displayLog(); this->selectArea(InfoAreaLog); } void CMainInfoAreaComponent::displayConsole() { - this->ui->comp_Log->displayConsole(); + ui->comp_Log->displayConsole(); this->selectArea(InfoAreaLog); } @@ -129,7 +129,7 @@ namespace BlackGui void CMainInfoAreaComponent::selectSettingsTab(int index) { this->selectArea(InfoAreaSettings); - this->ui->comp_Settings->setSettingsTab(static_cast(index)); + ui->comp_Settings->setSettingsTab(static_cast(index)); } const QPixmap &CMainInfoAreaComponent::indexToPixmap(int areaIndex) const diff --git a/src/blackgui/components/mainkeypadareacomponent.cpp b/src/blackgui/components/mainkeypadareacomponent.cpp index 91a49bf6f..09e43d21e 100644 --- a/src/blackgui/components/mainkeypadareacomponent.cpp +++ b/src/blackgui/components/mainkeypadareacomponent.cpp @@ -41,28 +41,28 @@ namespace BlackGui // Info areas // pressed collides, as this toggles button again // using toggle collides, as checking/unchecking toggles again -> infinite loop - connect(this->ui->pb_MainAircrafts, &QPushButton::released, this, &CMainKeypadAreaComponent::ps_buttonSelected); - connect(this->ui->pb_MainAtc, &QPushButton::released, this, &CMainKeypadAreaComponent::ps_buttonSelected); - connect(this->ui->pb_MainCockpit, &QPushButton::released, this, &CMainKeypadAreaComponent::ps_buttonSelected); - connect(this->ui->pb_MainFlightplan, &QPushButton::released, this, &CMainKeypadAreaComponent::ps_buttonSelected); - connect(this->ui->pb_MainLog, &QPushButton::released, this, &CMainKeypadAreaComponent::ps_buttonSelected); - connect(this->ui->pb_MainMappings, &QPushButton::released, this, &CMainKeypadAreaComponent::ps_buttonSelected); - connect(this->ui->pb_MainSettings, &QPushButton::released, this, &CMainKeypadAreaComponent::ps_buttonSelected); - connect(this->ui->pb_MainSimulator, &QPushButton::released, this, &CMainKeypadAreaComponent::ps_buttonSelected); - connect(this->ui->pb_MainTextMessages, &QPushButton::released, this, &CMainKeypadAreaComponent::ps_buttonSelected); - connect(this->ui->pb_MainUsers, &QPushButton::released, this, &CMainKeypadAreaComponent::ps_buttonSelected); - connect(this->ui->pb_MainWeather, &QPushButton::released, this, &CMainKeypadAreaComponent::ps_buttonSelected); + connect(ui->pb_MainAircrafts, &QPushButton::released, this, &CMainKeypadAreaComponent::ps_buttonSelected); + connect(ui->pb_MainAtc, &QPushButton::released, this, &CMainKeypadAreaComponent::ps_buttonSelected); + connect(ui->pb_MainCockpit, &QPushButton::released, this, &CMainKeypadAreaComponent::ps_buttonSelected); + connect(ui->pb_MainFlightplan, &QPushButton::released, this, &CMainKeypadAreaComponent::ps_buttonSelected); + connect(ui->pb_MainLog, &QPushButton::released, this, &CMainKeypadAreaComponent::ps_buttonSelected); + connect(ui->pb_MainMappings, &QPushButton::released, this, &CMainKeypadAreaComponent::ps_buttonSelected); + connect(ui->pb_MainSettings, &QPushButton::released, this, &CMainKeypadAreaComponent::ps_buttonSelected); + connect(ui->pb_MainSimulator, &QPushButton::released, this, &CMainKeypadAreaComponent::ps_buttonSelected); + connect(ui->pb_MainTextMessages, &QPushButton::released, this, &CMainKeypadAreaComponent::ps_buttonSelected); + connect(ui->pb_MainUsers, &QPushButton::released, this, &CMainKeypadAreaComponent::ps_buttonSelected); + connect(ui->pb_MainWeather, &QPushButton::released, this, &CMainKeypadAreaComponent::ps_buttonSelected); // non info areas - connect(this->ui->pb_Connect, &QPushButton::pressed, this, &CMainKeypadAreaComponent::ps_buttonSelected); - connect(this->ui->pb_CockpitIdent, &QPushButton::released, this, &CMainKeypadAreaComponent::ps_buttonSelected); - connect(this->ui->pb_Opacity050, &QPushButton::pressed, this, &CMainKeypadAreaComponent::ps_buttonSelected); - connect(this->ui->pb_Opacity100, &QPushButton::pressed, this, &CMainKeypadAreaComponent::ps_buttonSelected); - connect(this->ui->pb_SoundMaxVolume, &QPushButton::pressed, this, &CMainKeypadAreaComponent::ps_buttonSelected); - connect(this->ui->pb_SoundMute, &QPushButton::released, this, &CMainKeypadAreaComponent::ps_buttonSelected); + connect(ui->pb_Connect, &QPushButton::pressed, this, &CMainKeypadAreaComponent::ps_buttonSelected); + connect(ui->pb_CockpitIdent, &QPushButton::released, this, &CMainKeypadAreaComponent::ps_buttonSelected); + connect(ui->pb_Opacity050, &QPushButton::pressed, this, &CMainKeypadAreaComponent::ps_buttonSelected); + connect(ui->pb_Opacity100, &QPushButton::pressed, this, &CMainKeypadAreaComponent::ps_buttonSelected); + connect(ui->pb_SoundMaxVolume, &QPushButton::pressed, this, &CMainKeypadAreaComponent::ps_buttonSelected); + connect(ui->pb_SoundMute, &QPushButton::released, this, &CMainKeypadAreaComponent::ps_buttonSelected); // command line - this->connect(this->ui->le_CommandLineInput, &QLineEdit::returnPressed, this, &CMainKeypadAreaComponent::ps_commandEntered); + this->connect(ui->le_CommandLineInput, &QLineEdit::returnPressed, this, &CMainKeypadAreaComponent::ps_commandEntered); connect(sGui->getIContextNetwork(), &IContextNetwork::connectionStatusChanged, this, &CMainKeypadAreaComponent::ps_connectionStatusChanged); connect(sGui->getIContextOwnAircraft(), &IContextOwnAircraft::changedAircraftCockpit, this, &CMainKeypadAreaComponent::ps_ownAircraftCockpitChanged); @@ -108,28 +108,28 @@ namespace BlackGui senderButton->setChecked(true); // re-check if got unchecked, we use checked buttons like normal buttons return; } - else if (senderButton == this->ui->pb_CockpitIdent && sGui->getIContextOwnAircraft()) + else if (senderButton == ui->pb_CockpitIdent && sGui->getIContextOwnAircraft()) { emit identPressed(); } - else if (senderButton == this->ui->pb_Opacity050) + else if (senderButton == ui->pb_Opacity050) { emit changedOpacity(50); } - else if (senderButton == this->ui->pb_Opacity100) + else if (senderButton == ui->pb_Opacity100) { emit changedOpacity(100); } - else if (senderButton == this->ui->pb_SoundMaxVolume && sGui->getIContextAudio()) + else if (senderButton == ui->pb_SoundMaxVolume && sGui->getIContextAudio()) { sGui->getIContextAudio()->setVoiceOutputVolume(100); } - else if (senderButton == this->ui->pb_SoundMute && sGui->getIContextAudio()) + else if (senderButton == ui->pb_SoundMute && sGui->getIContextAudio()) { bool mute = sGui->getIContextAudio()->isMuted(); sGui->getIContextAudio()->setMute(!mute); } - else if (senderButton == this->ui->pb_Connect) + else if (senderButton == ui->pb_Connect) { emit connectPressed(); } @@ -142,22 +142,22 @@ namespace BlackGui // Connected button if (to == INetwork::Connected) { - this->ui->pb_Connect->setText("Disconnect"); - this->ui->pb_Connect->setStyleSheet("background-color: green"); + ui->pb_Connect->setText("Disconnect"); + ui->pb_Connect->setStyleSheet("background-color: green"); } else { - this->ui->pb_Connect->setText("Connect"); - this->ui->pb_Connect->setStyleSheet("background-color: "); + ui->pb_Connect->setText("Connect"); + ui->pb_Connect->setStyleSheet("background-color: "); } } void CMainKeypadAreaComponent::ps_commandEntered() { - QString c(this->ui->le_CommandLineInput->text().trimmed().simplified()); + QString c(ui->le_CommandLineInput->text().trimmed().simplified()); if (c.isEmpty()) { return; } emit this->commandEntered(c, keypadIdentifier()); - this->ui->le_CommandLineInput->clear(); + ui->le_CommandLineInput->clear(); } void CMainKeypadAreaComponent::ps_ownAircraftCockpitChanged(const CSimulatedAircraft &aircraft, const CIdentifier &originator) @@ -166,18 +166,18 @@ namespace BlackGui bool ident = aircraft.getTransponder().getTransponderMode() == CTransponder::StateIdent; //check state to avoid undelibarate signals - if (ident != this->ui->pb_CockpitIdent->isChecked()) + if (ident != ui->pb_CockpitIdent->isChecked()) { - this->ui->pb_CockpitIdent->setChecked(ident); + ui->pb_CockpitIdent->setChecked(ident); } } void CMainKeypadAreaComponent::ps_muteChanged(bool muted) { //check state to avoid undelibarate signals - if (muted != this->ui->pb_SoundMute->isChecked()) + if (muted != ui->pb_SoundMute->isChecked()) { - this->ui->pb_SoundMute->setChecked(muted); + ui->pb_SoundMute->setChecked(muted); } } diff --git a/src/blackgui/components/mappingcomponent.cpp b/src/blackgui/components/mappingcomponent.cpp index 329f0637e..bdb8e1e01 100644 --- a/src/blackgui/components/mappingcomponent.cpp +++ b/src/blackgui/components/mappingcomponent.cpp @@ -62,38 +62,38 @@ namespace BlackGui m_updateTimer(new CUpdateTimer("CMappingComponent", &CMappingComponent::ps_backgroundUpdate, this)) { ui->setupUi(this); - this->ui->tvp_AircraftModels->setAircraftModelMode(CAircraftModelListModel::OwnSimulatorModel); - this->ui->tvp_AircraftModels->setResizeMode(CAircraftModelView::ResizingOff); - this->ui->tvp_AircraftModels->addFilterDialog(); + ui->tvp_AircraftModels->setAircraftModelMode(CAircraftModelListModel::OwnSimulatorModel); + ui->tvp_AircraftModels->setResizeMode(CAircraftModelView::ResizingOff); + ui->tvp_AircraftModels->addFilterDialog(); - this->ui->tvp_SimulatedAircraft->setAircraftMode(CSimulatedAircraftListModel::ModelMode); - this->ui->tvp_SimulatedAircraft->setResizeMode(CAircraftModelView::ResizingOnce); + ui->tvp_SimulatedAircraft->setAircraftMode(CSimulatedAircraftListModel::ModelMode); + ui->tvp_SimulatedAircraft->setResizeMode(CAircraftModelView::ResizingOnce); - connect(this->ui->tvp_AircraftModels, &CAircraftModelView::requestUpdate, this, &CMappingComponent::ps_onModelsUpdateRequested); - connect(this->ui->tvp_AircraftModels, &CAircraftModelView::modelDataChanged, this, &CMappingComponent::ps_onRowCountChanged); - connect(this->ui->tvp_AircraftModels, &CAircraftModelView::clicked, this, &CMappingComponent::ps_onModelSelectedInView); - connect(this->ui->tvp_AircraftModels, &CAircraftModelView::requestNewBackendData, this, &CMappingComponent::ps_onMenuRequestModelReload); + connect(ui->tvp_AircraftModels, &CAircraftModelView::requestUpdate, this, &CMappingComponent::ps_onModelsUpdateRequested); + connect(ui->tvp_AircraftModels, &CAircraftModelView::modelDataChanged, this, &CMappingComponent::ps_onRowCountChanged); + connect(ui->tvp_AircraftModels, &CAircraftModelView::clicked, this, &CMappingComponent::ps_onModelSelectedInView); + connect(ui->tvp_AircraftModels, &CAircraftModelView::requestNewBackendData, this, &CMappingComponent::ps_onMenuRequestModelReload); - connect(this->ui->tvp_SimulatedAircraft, &CSimulatedAircraftView::modelDataChanged, this, &CMappingComponent::ps_onRowCountChanged); - connect(this->ui->tvp_SimulatedAircraft, &CSimulatedAircraftView::clicked, this, &CMappingComponent::ps_onAircraftSelectedInView); - connect(this->ui->tvp_SimulatedAircraft, &CSimulatedAircraftView::requestUpdate, this, &CMappingComponent::ps_onSimulatedAircraftUpdateRequested); - connect(this->ui->tvp_SimulatedAircraft, &CSimulatedAircraftView::requestTextMessageWidget, this, &CMappingComponent::requestTextMessageWidget); - connect(this->ui->tvp_SimulatedAircraft, &CSimulatedAircraftView::requestEnableAircraft, this, &CMappingComponent::ps_onMenuEnableAircraft); - connect(this->ui->tvp_SimulatedAircraft, &CSimulatedAircraftView::requestFastPositionUpdates, this, &CMappingComponent::ps_onMenuChangeFastPositionUpdates); - connect(this->ui->tvp_SimulatedAircraft, &CSimulatedAircraftView::requestHighlightInSimulator, this, &CMappingComponent::ps_onMenuHighlightInSimulator); + connect(ui->tvp_SimulatedAircraft, &CSimulatedAircraftView::modelDataChanged, this, &CMappingComponent::ps_onRowCountChanged); + connect(ui->tvp_SimulatedAircraft, &CSimulatedAircraftView::clicked, this, &CMappingComponent::ps_onAircraftSelectedInView); + connect(ui->tvp_SimulatedAircraft, &CSimulatedAircraftView::requestUpdate, this, &CMappingComponent::ps_onSimulatedAircraftUpdateRequested); + connect(ui->tvp_SimulatedAircraft, &CSimulatedAircraftView::requestTextMessageWidget, this, &CMappingComponent::requestTextMessageWidget); + connect(ui->tvp_SimulatedAircraft, &CSimulatedAircraftView::requestEnableAircraft, this, &CMappingComponent::ps_onMenuEnableAircraft); + connect(ui->tvp_SimulatedAircraft, &CSimulatedAircraftView::requestFastPositionUpdates, this, &CMappingComponent::ps_onMenuChangeFastPositionUpdates); + connect(ui->tvp_SimulatedAircraft, &CSimulatedAircraftView::requestHighlightInSimulator, this, &CMappingComponent::ps_onMenuHighlightInSimulator); - connect(this->ui->pb_SaveAircraft, &QPushButton::clicked, this, &CMappingComponent::ps_onSaveAircraft); + connect(ui->pb_SaveAircraft, &QPushButton::clicked, this, &CMappingComponent::ps_onSaveAircraft); this->m_modelCompleter = new QCompleter(this); this->m_currentMappingsViewDelegate = new CCheckBoxDelegate(":/diagona/icons/diagona/icons/tick.png", ":/diagona/icons/diagona/icons/cross.png", this); - this->ui->tvp_SimulatedAircraft->setItemDelegateForColumn(0, this->m_currentMappingsViewDelegate); + ui->tvp_SimulatedAircraft->setItemDelegateForColumn(0, this->m_currentMappingsViewDelegate); // Aircraft previews - connect(this->ui->cb_AircraftIconDisplayed, &QCheckBox::stateChanged, this, &CMappingComponent::ps_onModelPreviewChanged); - this->ui->lbl_AircraftIconDisplayed->setText("Icon displayed here"); + connect(ui->cb_AircraftIconDisplayed, &QCheckBox::stateChanged, this, &CMappingComponent::ps_onModelPreviewChanged); + ui->lbl_AircraftIconDisplayed->setText("Icon displayed here"); // Updates - this->ui->tvp_AircraftModels->setDisplayAutomatically(false); + ui->tvp_AircraftModels->setDisplayAutomatically(false); this->m_updateTimer->setUpdateInterval(10 * 1000); connect(sGui->getIContextSimulator(), &IContextSimulator::installedAircraftModelsChanged, this, &CMappingComponent::ps_onAircraftModelsLoaded); @@ -105,7 +105,7 @@ namespace BlackGui connect(sGui->getIContextNetwork(), &IContextNetwork::connectionStatusChanged, this, &CMappingComponent::ps_onConnectionStatusChanged); // requires simulator context - connect(this->ui->tvp_SimulatedAircraft, &CAircraftModelView::objectChanged, this, &CMappingComponent::ps_onChangedSimulatedAircraftInView); + connect(ui->tvp_SimulatedAircraft, &CAircraftModelView::objectChanged, this, &CMappingComponent::ps_onChangedSimulatedAircraftInView); // with external core models might be already available this->ps_onAircraftModelsLoaded(); @@ -116,20 +116,20 @@ namespace BlackGui int CMappingComponent::countCurrentMappings() const { - Q_ASSERT(this->ui->tvp_SimulatedAircraft); - return this->ui->tvp_SimulatedAircraft->rowCount(); + Q_ASSERT(ui->tvp_SimulatedAircraft); + return ui->tvp_SimulatedAircraft->rowCount(); } int CMappingComponent::countAircraftModels() const { - Q_ASSERT(this->ui->tvp_AircraftModels); - return this->ui->tvp_AircraftModels->rowCount(); + Q_ASSERT(ui->tvp_AircraftModels); + return ui->tvp_AircraftModels->rowCount(); } CAircraftModelList CMappingComponent::findModelsStartingWith(const QString modelName, Qt::CaseSensitivity cs) { - Q_ASSERT(this->ui->tvp_AircraftModels); - return this->ui->tvp_AircraftModels->container().findModelsStartingWith(modelName, cs); + Q_ASSERT(ui->tvp_AircraftModels); + return ui->tvp_AircraftModels->container().findModelsStartingWith(modelName, cs); } void CMappingComponent::ps_onAircraftModelsLoaded() @@ -154,15 +154,15 @@ namespace BlackGui { Q_UNUSED(count); Q_UNUSED(withFilter); - int am = this->ui->tw_ListViews->indexOf(this->ui->tb_AircraftModels); - int cm = this->ui->tw_ListViews->indexOf(this->ui->tb_CurrentMappings); - QString amf = this->ui->tvp_AircraftModels->derivedModel()->hasFilter() ? "F" : ""; - QString a = this->ui->tw_ListViews->tabBar()->tabText(am); - QString c = this->ui->tw_ListViews->tabBar()->tabText(cm); + int am = ui->tw_ListViews->indexOf(ui->tb_AircraftModels); + int cm = ui->tw_ListViews->indexOf(ui->tb_CurrentMappings); + QString amf = ui->tvp_AircraftModels->derivedModel()->hasFilter() ? "F" : ""; + QString a = ui->tw_ListViews->tabBar()->tabText(am); + QString c = ui->tw_ListViews->tabBar()->tabText(cm); a = CGuiUtility::replaceTabCountValue(a, this->countAircraftModels()) + amf; c = CGuiUtility::replaceTabCountValue(c, this->countCurrentMappings()); - this->ui->tw_ListViews->tabBar()->setTabText(am, a); - this->ui->tw_ListViews->tabBar()->setTabText(cm, c); + ui->tw_ListViews->tabBar()->setTabText(am, a); + ui->tw_ListViews->tabBar()->setTabText(cm, c); } void CMappingComponent::ps_onChangedSimulatedAircraftInView(const BlackMisc::CVariant &object, const BlackMisc::CPropertyIndex &index) @@ -185,27 +185,27 @@ namespace BlackGui void CMappingComponent::ps_onAircraftSelectedInView(const QModelIndex &index) { - const CSimulatedAircraft simAircraft = this->ui->tvp_SimulatedAircraft->at(index); - this->ui->cb_AircraftEnabled->setChecked(simAircraft.isEnabled()); - this->ui->le_Callsign->setText(simAircraft.getCallsign().asString()); - this->ui->le_AircraftModel->setText(simAircraft.getModel().getModelString()); + const CSimulatedAircraft simAircraft = ui->tvp_SimulatedAircraft->at(index); + ui->cb_AircraftEnabled->setChecked(simAircraft.isEnabled()); + ui->le_Callsign->setText(simAircraft.getCallsign().asString()); + ui->le_AircraftModel->setText(simAircraft.getModel().getModelString()); } void CMappingComponent::ps_onModelSelectedInView(const QModelIndex &index) { - const CAircraftModel model = this->ui->tvp_AircraftModels->at(index); - this->ui->le_AircraftModel->setText(model.getModelString()); + const CAircraftModel model = ui->tvp_AircraftModels->at(index); + ui->le_AircraftModel->setText(model.getModelString()); - if (this->ui->cb_AircraftIconDisplayed->isChecked()) + if (ui->cb_AircraftIconDisplayed->isChecked()) { const int MaxHeight = 125; - this->ui->lbl_AircraftIconDisplayed->setText(""); - this->ui->lbl_AircraftIconDisplayed->setToolTip(model.getDescription()); + ui->lbl_AircraftIconDisplayed->setText(""); + ui->lbl_AircraftIconDisplayed->setToolTip(model.getDescription()); QString modelString(model.getModelString()); CPixmap pm = sGui->getIContextSimulator()->iconForModel(modelString); if (pm.isNull()) { - this->ui->lbl_AircraftIconDisplayed->setPixmap(CIcons::crossWhite16()); + ui->lbl_AircraftIconDisplayed->setPixmap(CIcons::crossWhite16()); } else { @@ -214,7 +214,7 @@ namespace BlackGui { qpm = qpm.scaledToWidth(MaxHeight, Qt::SmoothTransformation); } - this->ui->lbl_AircraftIconDisplayed->setPixmap(qpm); + ui->lbl_AircraftIconDisplayed->setPixmap(qpm); } } else @@ -233,21 +233,21 @@ namespace BlackGui } const CCallsign callsign(cs); - bool hasCallsign = this->ui->tvp_SimulatedAircraft->container().containsCallsign(callsign); + bool hasCallsign = ui->tvp_SimulatedAircraft->container().containsCallsign(callsign); if (!hasCallsign) { CLogMessage(this).validationError("Unmapped callsign %1 for mapping") << callsign.asString(); return; } - QString modelString = this->ui->le_AircraftModel->text().trimmed(); + QString modelString = ui->le_AircraftModel->text().trimmed(); if (modelString.isEmpty()) { CLogMessage(this).validationError("Missing model for mapping"); return; } - bool hasModel = this->ui->tvp_AircraftModels->container().containsModelString(modelString); + bool hasModel = ui->tvp_AircraftModels->container().containsModelString(modelString); if (!hasModel) { CLogMessage(this).validationError("Invalid model for mapping"); @@ -255,7 +255,7 @@ namespace BlackGui } CSimulatedAircraft aircraftFromBackend = sGui->getIContextNetwork()->getAircraftInRangeForCallsign(callsign); - bool enabled = this->ui->cb_AircraftEnabled->isChecked(); + bool enabled = ui->cb_AircraftEnabled->isChecked(); bool changed = false; if (aircraftFromBackend.getModelString() != modelString) { @@ -295,13 +295,13 @@ namespace BlackGui Qt::CheckState s = static_cast(state); if (s == Qt::Unchecked) { - this->ui->lbl_AircraftIconDisplayed->setPixmap(empty); - this->ui->lbl_AircraftIconDisplayed->setText("Icon disabled"); + ui->lbl_AircraftIconDisplayed->setPixmap(empty); + ui->lbl_AircraftIconDisplayed->setText("Icon disabled"); } else if (s == Qt::Checked) { - this->ui->lbl_AircraftIconDisplayed->setPixmap(empty); - this->ui->lbl_AircraftIconDisplayed->setText("Icon will go here"); + ui->lbl_AircraftIconDisplayed->setPixmap(empty); + ui->lbl_AircraftIconDisplayed->setText("Icon will go here"); } } @@ -313,7 +313,7 @@ namespace BlackGui void CMappingComponent::ps_onModelsUpdateRequested() { CAircraftModelList ml(sGui->getIContextSimulator()->getInstalledModels()); - this->ui->tvp_AircraftModels->updateContainer(ml); + ui->tvp_AircraftModels->updateContainer(ml); // model completer this->m_modelCompleter->setModel(new QStringListModel(ml.getModelStringList(), this->m_modelCompleter)); @@ -321,7 +321,7 @@ namespace BlackGui this->m_modelCompleter->setCaseSensitivity(Qt::CaseInsensitive); this->m_modelCompleter->setWrapAround(true); this->m_modelCompleter->setCompletionMode(QCompleter::InlineCompletion); - this->ui->le_AircraftModel->setCompleter(this->m_modelCompleter); + ui->le_AircraftModel->setCompleter(this->m_modelCompleter); } void CMappingComponent::ps_onRemoteAircraftModelChanged(const CSimulatedAircraft &aircraft) @@ -347,7 +347,7 @@ namespace BlackGui Q_UNUSED(from); if (INetwork::isDisconnectedStatus(to)) { - this->ui->tvp_SimulatedAircraft->clear(); + ui->tvp_SimulatedAircraft->clear(); } } @@ -410,11 +410,11 @@ namespace BlackGui if (sGui->getIContextSimulator()->getSimulatorStatus() > 0) { const CSimulatedAircraftList aircraft(sGui->getIContextNetwork()->getAircraftInRange()); - this->ui->tvp_SimulatedAircraft->updateContainer(aircraft); + ui->tvp_SimulatedAircraft->updateContainer(aircraft); } else { - this->ui->tvp_SimulatedAircraft->clear(); + ui->tvp_SimulatedAircraft->clear(); } } diff --git a/src/blackgui/components/modelmatchercomponent.cpp b/src/blackgui/components/modelmatchercomponent.cpp index aa022e0fa..d4c370973 100644 --- a/src/blackgui/components/modelmatchercomponent.cpp +++ b/src/blackgui/components/modelmatchercomponent.cpp @@ -111,7 +111,7 @@ namespace BlackGui CStatusMessageList msgs; this->ps_simulatorChanged(ui->comp_SimulatorSelector->getValue()); // update model set to latest version CSimulatedAircraft remoteAircraft(createAircraft()); - if (this->ui->cb_withReverseLookup->isChecked()) + if (ui->cb_withReverseLookup->isChecked()) { const QString liveryString(ui->comp_LiverySelector->getRawCombinedCode()); const CAircraftModel reverseModel = CAircraftMatcher::reverselLookupModel(remoteAircraft.getModel(), liveryString, &msgs); diff --git a/src/blackgui/components/navigatordialog.cpp b/src/blackgui/components/navigatordialog.cpp index cd3bd09bb..28cc56d8e 100644 --- a/src/blackgui/components/navigatordialog.cpp +++ b/src/blackgui/components/navigatordialog.cpp @@ -78,21 +78,21 @@ namespace BlackGui this->ps_onStyleSheetsChanged(); // remove old layout - CGuiUtility::deleteLayout(this->ui->fr_NavigatorDialogInner->layout(), false); + CGuiUtility::deleteLayout(ui->fr_NavigatorDialogInner->layout(), false); // new layout - QGridLayout *gridLayout = new QGridLayout(this->ui->fr_NavigatorDialogInner); + QGridLayout *gridLayout = new QGridLayout(ui->fr_NavigatorDialogInner); gridLayout->setObjectName("gl_CNavigatorDialog"); gridLayout->setSpacing(0); gridLayout->setMargin(0); gridLayout->setContentsMargins(0, 0, 0, 0); - this->ui->fr_NavigatorDialogInner->setLayout(gridLayout); + ui->fr_NavigatorDialogInner->setLayout(gridLayout); int r = 0; int c = 0; for (const auto &action : this->actions()) { - QToolButton *tb = new QToolButton(this->ui->fr_NavigatorDialogInner); + QToolButton *tb = new QToolButton(ui->fr_NavigatorDialogInner); tb->setDefaultAction(action); tb->setObjectName(this->objectName().append(":").append(action->objectName())); @@ -272,7 +272,7 @@ namespace BlackGui // adjust const QSize min(w + 2, h + 2); - this->ui->fr_NavigatorDialogInner->setMinimumSize(min); + ui->fr_NavigatorDialogInner->setMinimumSize(min); this->setMinimumSize(min); this->adjustSize(); } diff --git a/src/blackgui/components/registercomponent.cpp b/src/blackgui/components/registercomponent.cpp index 52a8d7f6b..170fe8afb 100644 --- a/src/blackgui/components/registercomponent.cpp +++ b/src/blackgui/components/registercomponent.cpp @@ -40,7 +40,7 @@ namespace BlackGui { if (!sGui) { return; } Q_ASSERT_X(sGui->supportsContexts(), Q_FUNC_INFO, "Application does not support contexts"); - this->ui->tvp_RegisteredComponents->updateContainer(sGui->getIContextApplication()->getRegisteredApplications()); + ui->tvp_RegisteredComponents->updateContainer(sGui->getIContextApplication()->getRegisteredApplications()); } } // ns } // ns diff --git a/src/blackgui/components/remoteaircraftselector.cpp b/src/blackgui/components/remoteaircraftselector.cpp index b90ddc95d..92a4639e6 100644 --- a/src/blackgui/components/remoteaircraftselector.cpp +++ b/src/blackgui/components/remoteaircraftselector.cpp @@ -81,7 +81,7 @@ namespace BlackGui { if (!this->isVisible()) { return; } // for performance reasons m_aircraft = sGui->getIContextNetwork()->getAircraftInRange(); - this->ui->cb_RemoteAircraftSelector->clear(); + ui->cb_RemoteAircraftSelector->clear(); if (m_aircraft.isEmpty()) { return; } CCallsign currentSelection(this->getSelectedCallsign()); @@ -105,14 +105,14 @@ namespace BlackGui } // new combobox - this->ui->cb_RemoteAircraftSelector->addItems(items); + ui->cb_RemoteAircraftSelector->addItems(items); // set old selection if possible if (currentSelection.isEmpty()) { return; } int index = m_aircraft.firstIndexOfCallsign(currentSelection); - if (index >= 0 && index < this->ui->cb_RemoteAircraftSelector->count()) + if (index >= 0 && index < ui->cb_RemoteAircraftSelector->count()) { - this->ui->cb_RemoteAircraftSelector->setCurrentIndex(index); + ui->cb_RemoteAircraftSelector->setCurrentIndex(index); } } diff --git a/src/blackgui/components/settingsnetworkserverscomponent.cpp b/src/blackgui/components/settingsnetworkserverscomponent.cpp index 2c0ba5d70..ae664bc99 100644 --- a/src/blackgui/components/settingsnetworkserverscomponent.cpp +++ b/src/blackgui/components/settingsnetworkserverscomponent.cpp @@ -45,10 +45,10 @@ namespace BlackGui ui->setupUi(this); // Settings server - this->connect(this->ui->pb_RemoveServer, &QPushButton::pressed, this, &CSettingsNetworkServersComponent::ps_alterTrafficServer); - this->connect(this->ui->pb_SaveServer, &QPushButton::pressed, this, &CSettingsNetworkServersComponent::ps_alterTrafficServer); - this->connect(this->ui->pb_AddServer, &QPushButton::pressed, this, &CSettingsNetworkServersComponent::ps_alterTrafficServer); - this->connect(this->ui->tvp_Servers, &QTableView::clicked, this, &CSettingsNetworkServersComponent::ps_serverSelected); + this->connect(ui->pb_RemoveServer, &QPushButton::pressed, this, &CSettingsNetworkServersComponent::ps_alterTrafficServer); + this->connect(ui->pb_SaveServer, &QPushButton::pressed, this, &CSettingsNetworkServersComponent::ps_alterTrafficServer); + this->connect(ui->pb_AddServer, &QPushButton::pressed, this, &CSettingsNetworkServersComponent::ps_alterTrafficServer); + this->connect(ui->tvp_Servers, &QTableView::clicked, this, &CSettingsNetworkServersComponent::ps_serverSelected); this->ps_reloadSettings(); } @@ -65,18 +65,18 @@ namespace BlackGui { serverList.push_back(sGui->getGlobalSetup().getFsdTestServersPlusHardcodedServers()); } - this->ui->tvp_Servers->updateContainer(serverList); + ui->tvp_Servers->updateContainer(serverList); } void CSettingsNetworkServersComponent::ps_serverSelected(const QModelIndex &index) { - const CServer clickedServer = this->ui->tvp_Servers->at(index); - this->ui->form_Server->setServer(clickedServer); + const CServer clickedServer = ui->tvp_Servers->at(index); + ui->form_Server->setServer(clickedServer); } void CSettingsNetworkServersComponent::ps_alterTrafficServer() { - CServer server(this->ui->form_Server->getServer()); + CServer server(ui->form_Server->getServer()); CStatusMessageList msgs = server.validate(); if (!msgs.isEmpty()) { msgs.addCategories(this); } @@ -85,13 +85,13 @@ namespace BlackGui CStatusMessage msg; bool changed = false; bool save = false; - if (sender == this->ui->pb_RemoveServer) + if (sender == ui->pb_RemoveServer) { // lenient name removal serverList.removeByName(server.getName()); changed = true; } - else if (sender == this->ui->pb_AddServer) + else if (sender == ui->pb_AddServer) { if (!msgs.isEmpty()) { @@ -101,7 +101,7 @@ namespace BlackGui serverList.replaceOrAdd(&CServer::getName, server.getName(), server); changed = true; } - else if (sender == this->ui->pb_SaveServer) + else if (sender == ui->pb_SaveServer) { save = true; if (msgs.isEmpty() && server.hasAddressAndPort()) diff --git a/src/blackgui/components/settingssimulatorcomponent.cpp b/src/blackgui/components/settingssimulatorcomponent.cpp index 178b43221..635f4a0e9 100644 --- a/src/blackgui/components/settingssimulatorcomponent.cpp +++ b/src/blackgui/components/settingssimulatorcomponent.cpp @@ -58,21 +58,21 @@ namespace BlackGui m_plugins->collectPlugins(); ui->setupUi(this); CLedWidget::LedShape shape = CLedWidget::Circle; - this->ui->led_RestrictedRendering->setValues(CLedWidget::Yellow, CLedWidget::Black, shape, "Limited", "Unlimited", 14); - this->ui->led_RenderingEnabled->setValues(CLedWidget::Yellow, CLedWidget::Black, shape, "Rendering enabled", "No aircraft will be rendered", 14); + ui->led_RestrictedRendering->setValues(CLedWidget::Yellow, CLedWidget::Black, shape, "Limited", "Unlimited", 14); + ui->led_RenderingEnabled->setValues(CLedWidget::Yellow, CLedWidget::Black, shape, "Rendering enabled", "No aircraft will be rendered", 14); // connects connect(sGui->getIContextSimulator(), &IContextSimulator::simulatorPluginChanged, this, &CSettingsSimulatorComponent::ps_simulatorPluginChanged); - connect(this->ui->ps_EnabledSimulators, &CPluginSelector::pluginStateChanged, this, &CSettingsSimulatorComponent::ps_pluginStateChanged); - connect(this->ui->ps_EnabledSimulators, &CPluginSelector::pluginDetailsRequested, this, &CSettingsSimulatorComponent::ps_showPluginDetails); - connect(this->ui->ps_EnabledSimulators, &CPluginSelector::pluginConfigRequested, this, &CSettingsSimulatorComponent::ps_showPluginConfig); - connect(this->ui->pb_ApplyMaxAircraft, &QCheckBox::pressed, this, &CSettingsSimulatorComponent::ps_onApplyMaxRenderedAircraft); - connect(this->ui->pb_ApplyTimeSync, &QCheckBox::pressed, this, &CSettingsSimulatorComponent::ps_onApplyTimeSync); - connect(this->ui->pb_ApplyMaxDistance, &QCheckBox::pressed, this, &CSettingsSimulatorComponent::ps_onApplyMaxRenderedDistance); - connect(this->ui->pb_ClearRestrictedRendering, &QCheckBox::pressed, this, &CSettingsSimulatorComponent::ps_clearRestricedRendering); - connect(this->ui->pb_DisableRendering, &QCheckBox::pressed, this, &CSettingsSimulatorComponent::ps_onApplyDisableRendering); - connect(this->ui->sb_MaxAircraft, &QSpinBox::editingFinished, this, &CSettingsSimulatorComponent::ps_onApplyMaxRenderedAircraft); - connect(this->ui->sb_MaxDistance, &QSpinBox::editingFinished, this, &CSettingsSimulatorComponent::ps_onApplyMaxRenderedDistance); + connect(ui->ps_EnabledSimulators, &CPluginSelector::pluginStateChanged, this, &CSettingsSimulatorComponent::ps_pluginStateChanged); + connect(ui->ps_EnabledSimulators, &CPluginSelector::pluginDetailsRequested, this, &CSettingsSimulatorComponent::ps_showPluginDetails); + connect(ui->ps_EnabledSimulators, &CPluginSelector::pluginConfigRequested, this, &CSettingsSimulatorComponent::ps_showPluginConfig); + connect(ui->pb_ApplyMaxAircraft, &QCheckBox::pressed, this, &CSettingsSimulatorComponent::ps_onApplyMaxRenderedAircraft); + connect(ui->pb_ApplyTimeSync, &QCheckBox::pressed, this, &CSettingsSimulatorComponent::ps_onApplyTimeSync); + connect(ui->pb_ApplyMaxDistance, &QCheckBox::pressed, this, &CSettingsSimulatorComponent::ps_onApplyMaxRenderedDistance); + connect(ui->pb_ClearRestrictedRendering, &QCheckBox::pressed, this, &CSettingsSimulatorComponent::ps_clearRestricedRendering); + connect(ui->pb_DisableRendering, &QCheckBox::pressed, this, &CSettingsSimulatorComponent::ps_onApplyDisableRendering); + connect(ui->sb_MaxAircraft, &QSpinBox::editingFinished, this, &CSettingsSimulatorComponent::ps_onApplyMaxRenderedAircraft); + connect(ui->sb_MaxDistance, &QSpinBox::editingFinished, this, &CSettingsSimulatorComponent::ps_onApplyMaxRenderedDistance); // list all available simulators for (const auto &p : getAvailablePlugins()) @@ -90,42 +90,42 @@ namespace BlackGui void CSettingsSimulatorComponent::setGuiValues() { // time sync - this->ui->cb_TimeSync->setEnabled(m_pluginLoaded); - this->ui->le_TimeSyncOffset->setEnabled(m_pluginLoaded); - this->ui->pb_ApplyTimeSync->setEnabled(m_pluginLoaded); + ui->cb_TimeSync->setEnabled(m_pluginLoaded); + ui->le_TimeSyncOffset->setEnabled(m_pluginLoaded); + ui->pb_ApplyTimeSync->setEnabled(m_pluginLoaded); // led - this->ui->led_RestrictedRendering->setOn(m_pluginLoaded ? sGui->getIContextSimulator()->isRenderingRestricted() : false); - this->ui->lbl_RestrictionText->setText(m_pluginLoaded ? sGui->getIContextSimulator()->getRenderRestrictionText() : ""); + ui->led_RestrictedRendering->setOn(m_pluginLoaded ? sGui->getIContextSimulator()->isRenderingRestricted() : false); + ui->lbl_RestrictionText->setText(m_pluginLoaded ? sGui->getIContextSimulator()->getRenderRestrictionText() : ""); - this->ui->sb_MaxDistance->setEnabled(m_pluginLoaded); - this->ui->sb_MaxAircraft->setEnabled(m_pluginLoaded); - this->ui->pb_ApplyMaxAircraft->setEnabled(m_pluginLoaded); - this->ui->pb_ApplyMaxDistance->setEnabled(m_pluginLoaded); - this->ui->pb_ClearRestrictedRendering->setEnabled((m_pluginLoaded)); - this->ui->pb_DisableRendering->setEnabled(m_pluginLoaded); + ui->sb_MaxDistance->setEnabled(m_pluginLoaded); + ui->sb_MaxAircraft->setEnabled(m_pluginLoaded); + ui->pb_ApplyMaxAircraft->setEnabled(m_pluginLoaded); + ui->pb_ApplyMaxDistance->setEnabled(m_pluginLoaded); + ui->pb_ClearRestrictedRendering->setEnabled((m_pluginLoaded)); + ui->pb_DisableRendering->setEnabled(m_pluginLoaded); if (m_pluginLoaded) { bool timeSynced = sGui->getIContextSimulator()->isTimeSynchronized(); - this->ui->cb_TimeSync->setChecked(timeSynced); + ui->cb_TimeSync->setChecked(timeSynced); CTime timeOffset = sGui->getIContextSimulator()->getTimeSynchronizationOffset(); - this->ui->le_TimeSyncOffset->setText(timeOffset.formattedHrsMin()); + ui->le_TimeSyncOffset->setText(timeOffset.formattedHrsMin()); int maxAircraft = sGui->getIContextSimulator()->getMaxRenderedAircraft(); - this->ui->sb_MaxAircraft->setValue(maxAircraft); + ui->sb_MaxAircraft->setValue(maxAircraft); CLength distanceBoundary(sGui->getIContextSimulator()->getRenderedDistanceBoundary()); int distanceBoundaryNM = distanceBoundary.valueInteger(CLengthUnit::NM()); CLength maxDistance(sGui->getIContextSimulator()->getMaxRenderedDistance()); int distanceNM = maxDistance.isNull() ? distanceBoundaryNM : maxDistance.valueInteger(CLengthUnit::NM()); - this->ui->sb_MaxDistance->setMaximum(distanceBoundaryNM); - this->ui->sb_MaxDistance->setValue(distanceNM); - this->ui->led_RenderingEnabled->setOn(sGui->getIContextSimulator()->isRenderingEnabled()); + ui->sb_MaxDistance->setMaximum(distanceBoundaryNM); + ui->sb_MaxDistance->setValue(distanceNM); + ui->led_RenderingEnabled->setOn(sGui->getIContextSimulator()->isRenderingEnabled()); } else { - this->ui->led_RenderingEnabled->setOn(false); + ui->led_RenderingEnabled->setOn(false); } } @@ -169,7 +169,7 @@ namespace BlackGui void CSettingsSimulatorComponent::ps_onApplyMaxRenderedAircraft() { // get initial aircraft to render - int noRequested = this->ui->sb_MaxAircraft->value(); + int noRequested = ui->sb_MaxAircraft->value(); int oldValue = sGui->getIContextSimulator()->getMaxRenderedAircraft(); if (oldValue == noRequested) { return; } @@ -185,7 +185,7 @@ namespace BlackGui else { CLogMessage(this).info("Max.rendered aircraft: %1, requested: %2") << noRendered << noRequested; - this->ui->sb_MaxAircraft->setValue(noRendered); + ui->sb_MaxAircraft->setValue(noRendered); } this->setGuiValues(); } @@ -193,7 +193,7 @@ namespace BlackGui void CSettingsSimulatorComponent::ps_onApplyMaxRenderedDistance() { // get initial aircraft to render - int maxDistanceNM = this->ui->sb_MaxDistance->value(); + int maxDistanceNM = ui->sb_MaxDistance->value(); CLength currentDistance(sGui->getIContextSimulator()->getMaxRenderedDistance()); if (maxDistanceNM == currentDistance.valueInteger(CLengthUnit::NM())) { @@ -216,8 +216,8 @@ namespace BlackGui void CSettingsSimulatorComponent::ps_onApplyTimeSync() { - bool timeSync = this->ui->cb_TimeSync->isChecked(); - const QString os = this->ui->le_TimeSyncOffset->text(); + bool timeSync = ui->cb_TimeSync->isChecked(); + const QString os = ui->le_TimeSyncOffset->text(); CTime ost(0, CTimeUnit::hrmin()); if (!os.isEmpty()) { @@ -248,12 +248,12 @@ namespace BlackGui if (!info.isUnspecified()) { m_pluginLoaded = true; - this->ui->lbl_PluginInfo->setText(info.getDescription()); + ui->lbl_PluginInfo->setText(info.getDescription()); } else { m_pluginLoaded = false; - this->ui->lbl_PluginInfo->setText("No plugin loaded"); + ui->lbl_PluginInfo->setText("No plugin loaded"); } this->setGuiValues(); } diff --git a/src/blackgui/components/simulatorcomponent.cpp b/src/blackgui/components/simulatorcomponent.cpp index 14c10957f..db33bfc7e 100644 --- a/src/blackgui/components/simulatorcomponent.cpp +++ b/src/blackgui/components/simulatorcomponent.cpp @@ -44,8 +44,8 @@ namespace BlackGui m_updateTimer(new CUpdateTimer("CSimulatorComponent", &CSimulatorComponent::update, this)) { ui->setupUi(this); - this->ui->tvp_LiveData->setIconMode(true); - this->ui->tvp_LiveData->setAutoResizeFrequency(10); // only resize every n-th time + ui->tvp_LiveData->setIconMode(true); + ui->tvp_LiveData->setAutoResizeFrequency(10); // only resize every n-th time this->addOrUpdateByName("info", "no data yet", CIcons::StandardIconWarning16); connect(sGui->getIContextSimulator(), &IContextSimulator::simulatorStatusChanged, this, &CSimulatorComponent::ps_onSimulatorStatusChanged); @@ -61,8 +61,8 @@ namespace BlackGui void CSimulatorComponent::addOrUpdateByName(const QString &name, const QString &value, const CIcon &icon) { - bool resize = this->currentWidget() == this->ui->tb_LiveData; // simulator live data selected? - this->ui->tvp_LiveData->addOrUpdateByName(name, value, icon, resize, false); + bool resize = this->currentWidget() == ui->tb_LiveData; // simulator live data selected? + ui->tvp_LiveData->addOrUpdateByName(name, value, icon, resize, false); } void CSimulatorComponent::addOrUpdateByName(const QString &name, const QString &value, CIcons::IconIndex iconIndex) @@ -72,12 +72,12 @@ namespace BlackGui int CSimulatorComponent::rowCount() const { - return this->ui->tvp_LiveData->rowCount(); + return ui->tvp_LiveData->rowCount(); } void CSimulatorComponent::clear() { - this->ui->tvp_LiveData->clear(); + ui->tvp_LiveData->clear(); } void CSimulatorComponent::update() diff --git a/src/blackgui/components/simulatorselector.cpp b/src/blackgui/components/simulatorselector.cpp index dc949cecb..39403a438 100644 --- a/src/blackgui/components/simulatorselector.cpp +++ b/src/blackgui/components/simulatorselector.cpp @@ -29,15 +29,15 @@ namespace BlackGui ui->setupUi(this); this->setMode(CheckBoxes); - connect(this->ui->rb_FS9, &QRadioButton::clicked, this, &CSimulatorSelector::ps_RadioButtonChanged); - connect(this->ui->rb_FSX, &QRadioButton::clicked, this, &CSimulatorSelector::ps_RadioButtonChanged); - connect(this->ui->rb_P3D, &QRadioButton::clicked, this, &CSimulatorSelector::ps_RadioButtonChanged); - connect(this->ui->rb_XPlane, &QRadioButton::clicked, this, &CSimulatorSelector::ps_RadioButtonChanged); + connect(ui->rb_FS9, &QRadioButton::clicked, this, &CSimulatorSelector::ps_RadioButtonChanged); + connect(ui->rb_FSX, &QRadioButton::clicked, this, &CSimulatorSelector::ps_RadioButtonChanged); + connect(ui->rb_P3D, &QRadioButton::clicked, this, &CSimulatorSelector::ps_RadioButtonChanged); + connect(ui->rb_XPlane, &QRadioButton::clicked, this, &CSimulatorSelector::ps_RadioButtonChanged); - connect(this->ui->cb_FS9, &QRadioButton::clicked, this, &CSimulatorSelector::ps_CheckBoxChanged); - connect(this->ui->cb_FSX, &QRadioButton::clicked, this, &CSimulatorSelector::ps_CheckBoxChanged); - connect(this->ui->cb_P3D, &QRadioButton::clicked, this, &CSimulatorSelector::ps_CheckBoxChanged); - connect(this->ui->cb_XPlane, &QRadioButton::clicked, this, &CSimulatorSelector::ps_CheckBoxChanged); + connect(ui->cb_FS9, &QRadioButton::clicked, this, &CSimulatorSelector::ps_CheckBoxChanged); + connect(ui->cb_FSX, &QRadioButton::clicked, this, &CSimulatorSelector::ps_CheckBoxChanged); + connect(ui->cb_P3D, &QRadioButton::clicked, this, &CSimulatorSelector::ps_CheckBoxChanged); + connect(ui->cb_XPlane, &QRadioButton::clicked, this, &CSimulatorSelector::ps_CheckBoxChanged); } CSimulatorSelector::~CSimulatorSelector() @@ -50,12 +50,12 @@ namespace BlackGui { default: case CheckBoxes: - this->ui->wi_CheckBoxes->setVisible(true); - this->ui->wi_RadioButtons->setVisible(false); + ui->wi_CheckBoxes->setVisible(true); + ui->wi_RadioButtons->setVisible(false); break; case RadioButtons: - this->ui->wi_CheckBoxes->setVisible(false); - this->ui->wi_RadioButtons->setVisible(true); + ui->wi_CheckBoxes->setVisible(false); + ui->wi_RadioButtons->setVisible(true); break; } } @@ -71,11 +71,11 @@ namespace BlackGui { default: case CheckBoxes: - return CSimulatorInfo(this->ui->cb_FSX->isChecked(), this->ui->cb_FS9->isChecked(), - this->ui->cb_XPlane->isChecked(), this->ui->cb_P3D->isChecked()); + return CSimulatorInfo(ui->cb_FSX->isChecked(), ui->cb_FS9->isChecked(), + ui->cb_XPlane->isChecked(), ui->cb_P3D->isChecked()); case RadioButtons: - return CSimulatorInfo(this->ui->rb_FSX->isChecked(), this->ui->rb_FS9->isChecked(), - this->ui->rb_XPlane->isChecked(), this->ui->rb_P3D->isChecked()); + return CSimulatorInfo(ui->rb_FSX->isChecked(), ui->rb_FS9->isChecked(), + ui->rb_XPlane->isChecked(), ui->rb_P3D->isChecked()); } } @@ -85,16 +85,16 @@ namespace BlackGui if (simulator == current) { return; } // avoid unnecessary signals // checkboxes - this->ui->cb_FSX->setChecked(simulator.fsx()); - this->ui->cb_FS9->setChecked(simulator.fs9()); - this->ui->cb_XPlane->setChecked(simulator.xplane()); - this->ui->cb_P3D->setChecked(simulator.p3d()); + ui->cb_FSX->setChecked(simulator.fsx()); + ui->cb_FS9->setChecked(simulator.fs9()); + ui->cb_XPlane->setChecked(simulator.xplane()); + ui->cb_P3D->setChecked(simulator.p3d()); // radio buttons - if (simulator.fsx()) { this->ui->rb_FSX->setChecked(simulator.fsx()); return; } - if (simulator.fs9()) { this->ui->rb_FS9->setChecked(simulator.fs9()); return; } - if (simulator.xplane()) { this->ui->rb_XPlane->setChecked(simulator.xplane()); return; } - if (simulator.p3d()) { this->ui->rb_P3D->setChecked(simulator.p3d()); return; } + if (simulator.fsx()) { ui->rb_FSX->setChecked(simulator.fsx()); return; } + if (simulator.fs9()) { ui->rb_FS9->setChecked(simulator.fs9()); return; } + if (simulator.xplane()) { ui->rb_XPlane->setChecked(simulator.xplane()); return; } + if (simulator.p3d()) { ui->rb_P3D->setChecked(simulator.p3d()); return; } } void CSimulatorSelector::setToLastSelection() @@ -106,13 +106,13 @@ namespace BlackGui void CSimulatorSelector::setAll() { // checkboxes - this->ui->cb_FSX->setChecked(true); - this->ui->cb_FS9->setChecked(true); - this->ui->cb_XPlane->setChecked(true); - this->ui->cb_P3D->setChecked(true); + ui->cb_FSX->setChecked(true); + ui->cb_FS9->setChecked(true); + ui->cb_XPlane->setChecked(true); + ui->cb_P3D->setChecked(true); // radio - this->ui->rb_FSX->setChecked(true); + ui->rb_FSX->setChecked(true); } bool CSimulatorSelector::isUnselected() const @@ -122,12 +122,12 @@ namespace BlackGui { default: case CheckBoxes: - c = this->ui->cb_FSX->isChecked() || this->ui->cb_FS9->isChecked() || - this->ui->cb_XPlane->isChecked() || this->ui->cb_P3D->isChecked(); + c = ui->cb_FSX->isChecked() || ui->cb_FS9->isChecked() || + ui->cb_XPlane->isChecked() || ui->cb_P3D->isChecked(); break; case RadioButtons: - c = this->ui->rb_FSX->isChecked() || this->ui->rb_FS9->isChecked() || - this->ui->rb_XPlane->isChecked() || this->ui->cb_P3D->isChecked(); + c = ui->rb_FSX->isChecked() || ui->rb_FS9->isChecked() || + ui->rb_XPlane->isChecked() || ui->cb_P3D->isChecked(); break; } return !c; @@ -140,8 +140,8 @@ namespace BlackGui { default: case CheckBoxes: - c = this->ui->cb_FSX->isChecked() && this->ui->cb_FS9->isChecked() && - this->ui->cb_XPlane->isChecked() && this->ui->cb_P3D->isChecked(); + c = ui->cb_FSX->isChecked() && ui->cb_FS9->isChecked() && + ui->cb_XPlane->isChecked() && ui->cb_P3D->isChecked(); break; case RadioButtons: // actually this should never be true diff --git a/src/blackgui/components/textmessagecomponent.cpp b/src/blackgui/components/textmessagecomponent.cpp index 68d2e48b1..9a56ab0d2 100644 --- a/src/blackgui/components/textmessagecomponent.cpp +++ b/src/blackgui/components/textmessagecomponent.cpp @@ -63,10 +63,10 @@ namespace BlackGui { ui->setupUi(this); - this->ui->le_textMessages->setVisible(false); - this->ui->tvp_TextMessagesAll->setResizeMode(CTextMessageView::ResizingAuto); + ui->le_textMessages->setVisible(false); + ui->tvp_TextMessagesAll->setResizeMode(CTextMessageView::ResizingAuto); - bool c = connect(this->ui->le_textMessages, &QLineEdit::returnPressed, this, &CTextMessageComponent::ps_textMessageEntered); + bool c = connect(ui->le_textMessages, &QLineEdit::returnPressed, this, &CTextMessageComponent::ps_textMessageEntered); Q_ASSERT_X(c, Q_FUNC_INFO, "Missing connect"); c = connect(sGui->getIContextOwnAircraft(), &IContextOwnAircraft::changedAircraftCockpit, this, &CTextMessageComponent::ps_onChangedAircraftCockpit); Q_ASSERT_X(c, Q_FUNC_INFO, "Missing connect"); @@ -91,13 +91,13 @@ namespace BlackGui switch (tab) { case TextMessagesAll: - return this->ui->tb_TextMessagesAll; + return ui->tb_TextMessagesAll; case TextMessagesCom1: - return this->ui->tb_TextMessagesCOM1; + return ui->tb_TextMessagesCOM1; case TextMessagesCom2: - return this->ui->tb_TextMessagesCOM2; + return ui->tb_TextMessagesCOM2; case TextMessagesUnicom: - return this->ui->tb_TextMessagesUnicom; + return ui->tb_TextMessagesUnicom; default: Q_ASSERT_X(false, Q_FUNC_INFO, "Wrong index"); break; @@ -110,7 +110,7 @@ namespace BlackGui QWidget *w = getTabWidget(tab); if (w) { - this->ui->tw_TextMessages->setCurrentWidget(w); + ui->tw_TextMessages->setCurrentWidget(w); } } @@ -139,7 +139,7 @@ namespace BlackGui // UNICOM if (message.isSendToUnicom()) { - this->ui->tep_TextMessagesUnicom->insertTextMessage(message); + ui->tep_TextMessagesUnicom->insertTextMessage(message); relevantForMe = true; } @@ -149,12 +149,12 @@ namespace BlackGui // check for own COM frequencies if (message.isSendToFrequency(this->getOwnAircraft().getCom1System().getFrequencyActive())) { - this->ui->tep_TextMessagesCOM1->insertTextMessage(message); + ui->tep_TextMessagesCOM1->insertTextMessage(message); relevantForMe = true; } if (message.isSendToFrequency(this->getOwnAircraft().getCom2System().getFrequencyActive())) { - this->ui->tep_TextMessagesCOM2->insertTextMessage(message); + ui->tep_TextMessagesCOM2->insertTextMessage(message); relevantForMe = true; } } @@ -168,7 +168,7 @@ namespace BlackGui // message for me? right frequency? otherwise quit if (relevantForMe || message.isServerMessage()) { - this->ui->tvp_TextMessagesAll->insert(message); + ui->tvp_TextMessagesAll->insert(message); } if (!relevantForMe) { return; } @@ -209,20 +209,20 @@ namespace BlackGui if (cs.isEmpty()) return false; QWidget *tab = this->findTextMessageTabByName(cs.getStringAsSet()); if (!tab) { return false; } - return this->ui->tw_TextMessages->currentWidget() == tab; + return ui->tw_TextMessages->currentWidget() == tab; } else { // frequency message const CSimulatedAircraft ownAircraft = this->getOwnAircraft(); - if (this->ui->tw_TextMessages->currentWidget() == this->ui->tb_TextMessagesAll) { return true; } + if (ui->tw_TextMessages->currentWidget() == ui->tb_TextMessagesAll) { return true; } if (textMessage.isSendToFrequency(ownAircraft.getCom1System().getFrequencyActive())) { - return this->ui->tw_TextMessages->currentWidget() == this->ui->tb_TextMessagesCOM1; + return ui->tw_TextMessages->currentWidget() == ui->tb_TextMessagesCOM1; } if (textMessage.isSendToFrequency(ownAircraft.getCom2System().getFrequencyActive())) { - return this->ui->tw_TextMessages->currentWidget() == this->ui->tb_TextMessagesCOM2; + return ui->tw_TextMessages->currentWidget() == ui->tb_TextMessagesCOM2; } return false; } @@ -241,10 +241,10 @@ namespace BlackGui f2n.sprintf("%03.3f", ownAircraft.getCom2System().getFrequencyActive().valueRounded(CFrequencyUnit::MHz(), 3)); const QString f1 = QString("COM1: %1").arg(f1n); const QString f2 = QString("COM2: %1").arg(f2n); - this->ui->tb_TextMessagesCOM1->setToolTip(f1); - this->ui->tb_TextMessagesCOM1->setToolTip(f2); - this->ui->tw_TextMessages->setTabText(this->ui->tw_TextMessages->indexOf(this->ui->tb_TextMessagesCOM1), f1); - this->ui->tw_TextMessages->setTabText(this->ui->tw_TextMessages->indexOf(this->ui->tb_TextMessagesCOM2), f2); + ui->tb_TextMessagesCOM1->setToolTip(f1); + ui->tb_TextMessagesCOM1->setToolTip(f2); + ui->tw_TextMessages->setTabText(ui->tw_TextMessages->indexOf(ui->tb_TextMessagesCOM1), f1); + ui->tw_TextMessages->setTabText(ui->tw_TextMessages->indexOf(ui->tb_TextMessagesCOM2), f2); } QWidget *CTextMessageComponent::addNewTextMessageTab(const CCallsign &callsign) @@ -260,20 +260,20 @@ namespace BlackGui QVBoxLayout *layout = new QVBoxLayout(newTab); CTextMessageTextEdit *textEdit = new CTextMessageTextEdit(newTab); int marginLeft, marginRight, marginTop, marginBottom; - this->ui->tb_TextMessagesAll->layout()->getContentsMargins(&marginLeft, &marginTop, &marginRight, &marginBottom); + ui->tb_TextMessagesAll->layout()->getContentsMargins(&marginLeft, &marginTop, &marginRight, &marginBottom); newTab->layout()->setContentsMargins(marginLeft, marginTop, marginRight, 2); layout->addWidget(textEdit); layout->addWidget(closeButton); newTab->setLayout(layout); textEdit->setContextMenuPolicy(Qt::CustomContextMenu); - int index = this->ui->tw_TextMessages->addTab(newTab, tabName); + int index = ui->tw_TextMessages->addTab(newTab, tabName); this->connect(closeButton, &QPushButton::released, this, &CTextMessageComponent::ps_closeTextMessageTab); - this->ui->tw_TextMessages->setCurrentIndex(index); + ui->tw_TextMessages->setCurrentIndex(index); if (sGui->getIContextNetwork()) { QString realName = sGui->getIContextNetwork()->getUserForCallsign(CCallsign(tabName)).getRealName(); - if (!realName.isEmpty()) this->ui->tw_TextMessages->setTabToolTip(index, realName); + if (!realName.isEmpty()) ui->tw_TextMessages->setTabToolTip(index, realName); } return newTab; } @@ -330,11 +330,11 @@ namespace BlackGui { if (name.isEmpty()) { return nullptr; } QString n = name.trimmed(); - for (int index = 0; index < this->ui->tw_TextMessages->count(); index++) + for (int index = 0; index < ui->tw_TextMessages->count(); index++) { - QString tabName = this->ui->tw_TextMessages->tabText(index); + QString tabName = ui->tw_TextMessages->tabText(index); if (tabName.indexOf(n, 0, Qt::CaseInsensitive) < 0) { continue; } - QWidget *tab = this->ui->tw_TextMessages->widget(index); + QWidget *tab = ui->tw_TextMessages->widget(index); return tab; } return nullptr; @@ -349,26 +349,26 @@ namespace BlackGui while (index < 0 && parentWidget) { - index = this->ui->tw_TextMessages->indexOf(parentWidget); + index = ui->tw_TextMessages->indexOf(parentWidget); parentWidget = parentWidget->parentWidget(); } - if (index >= 0) { this->ui->tw_TextMessages->removeTab(index); } + if (index >= 0) { ui->tw_TextMessages->removeTab(index); } } void CTextMessageComponent::ps_topLevelChanged(QWidget *widget, bool topLevel) { // own input field if floating window Q_UNUSED(widget); - this->ui->le_textMessages->setVisible(topLevel); + ui->le_textMessages->setVisible(topLevel); } void CTextMessageComponent::ps_textMessageEntered() { - if (!this->ui->le_textMessages->isVisible()) { return; } + if (!ui->le_textMessages->isVisible()) { return; } if (!this->isVisible()) { return; } - QString cl(this->ui->le_textMessages->text().trimmed().simplified()); - this->ui->le_textMessages->clear(); + QString cl(ui->le_textMessages->text().trimmed().simplified()); + ui->le_textMessages->clear(); this->handleEnteredTextMessage(cl); } @@ -396,31 +396,31 @@ namespace BlackGui // only if visible if (enteredLine.isEmpty()) { return ""; } - int index = this->ui->tw_TextMessages->currentIndex(); + int index = ui->tw_TextMessages->currentIndex(); QString cmd(".msg "); - if (index < 0 || index == this->ui->tw_TextMessages->indexOf(this->ui->tb_TextMessagesAll)) + if (index < 0 || index == ui->tw_TextMessages->indexOf(ui->tb_TextMessagesAll)) { CLogMessage(this).validationError("Incorrect message channel"); return ""; } else { - if (index == this->ui->tw_TextMessages->indexOf(this->ui->tb_TextMessagesCOM1)) + if (index == ui->tw_TextMessages->indexOf(ui->tb_TextMessagesCOM1)) { cmd.append(QString::number(this->getOwnAircraft().getCom1System().getFrequencyActive().valueRounded(3))); } - else if (index == this->ui->tw_TextMessages->indexOf(this->ui->tb_TextMessagesCOM2)) + else if (index == ui->tw_TextMessages->indexOf(ui->tb_TextMessagesCOM2)) { cmd.append(QString::number(this->getOwnAircraft().getCom2System().getFrequencyActive().valueRounded(3))); } - else if (index == this->ui->tw_TextMessages->indexOf(this->ui->tb_TextMessagesUnicom)) + else if (index == ui->tw_TextMessages->indexOf(ui->tb_TextMessagesUnicom)) { cmd.append(QString::number(CPhysicalQuantitiesConstants::FrequencyUnicom().valueRounded(3))); } else { // not a standard channel - QString selectedTabText = this->ui->tw_TextMessages->tabText(index).trimmed(); + QString selectedTabText = ui->tw_TextMessages->tabText(index).trimmed(); bool isNumber; double frequency = selectedTabText.toDouble(&isNumber); if (isNumber) @@ -485,7 +485,7 @@ namespace BlackGui } } if (!w) { return; } - this->ui->tw_TextMessages->setCurrentWidget(w); + ui->tw_TextMessages->setCurrentWidget(w); this->displayMyself(); } diff --git a/src/blackgui/components/usercomponent.cpp b/src/blackgui/components/usercomponent.cpp index 8fb3722ca..bf77a4b68 100644 --- a/src/blackgui/components/usercomponent.cpp +++ b/src/blackgui/components/usercomponent.cpp @@ -37,8 +37,8 @@ namespace BlackGui ui->setupUi(this); this->tabBar()->setExpanding(false); this->tabBar()->setUsesScrollButtons(true); - connect(this->ui->tvp_AllUsers, &CUserView::modelDataChanged, this, &CUserComponent::ps_onCountChanged); - connect(this->ui->tvp_Clients, &CClientView::modelDataChanged, this, &CUserComponent::ps_onCountChanged); + connect(ui->tvp_AllUsers, &CUserView::modelDataChanged, this, &CUserComponent::ps_onCountChanged); + connect(ui->tvp_Clients, &CClientView::modelDataChanged, this, &CUserComponent::ps_onCountChanged); connect(sGui->getIContextNetwork(), &IContextNetwork::connectionStatusChanged, this, &CUserComponent::ps_connectionStatusChanged); } @@ -47,21 +47,21 @@ namespace BlackGui int CUserComponent::countClients() const { - Q_ASSERT(this->ui->tvp_Clients); - return this->ui->tvp_Clients->rowCount(); + Q_ASSERT(ui->tvp_Clients); + return ui->tvp_Clients->rowCount(); } int CUserComponent::countUsers() const { - Q_ASSERT(this->ui->tvp_AllUsers); - return this->ui->tvp_AllUsers->rowCount(); + Q_ASSERT(ui->tvp_AllUsers); + return ui->tvp_AllUsers->rowCount(); } void CUserComponent::update() { if (!sGui || !sGui->getIContextNetwork()) { return; } - Q_ASSERT(this->ui->tvp_AllUsers); - Q_ASSERT(this->ui->tvp_Clients); + Q_ASSERT(ui->tvp_AllUsers); + Q_ASSERT(ui->tvp_Clients); if (sGui->getIContextNetwork()->isConnected()) { @@ -73,8 +73,8 @@ namespace BlackGui } // load data - this->ui->tvp_Clients->updateContainer(sGui->getIContextNetwork()->getOtherClients()); - this->ui->tvp_AllUsers->updateContainer(sGui->getIContextNetwork()->getUsers()); + ui->tvp_Clients->updateContainer(sGui->getIContextNetwork()->getOtherClients()); + ui->tvp_AllUsers->updateContainer(sGui->getIContextNetwork()->getUsers()); } } @@ -82,8 +82,8 @@ namespace BlackGui { Q_UNUSED(count); Q_UNUSED(withFilter); - int iu = this->indexOf(this->ui->tb_AllUsers); - int ic = this->indexOf(this->ui->tb_Clients); + int iu = this->indexOf(ui->tb_AllUsers); + int ic = this->indexOf(ui->tb_Clients); QString u = this->tabBar()->tabText(iu); QString c = this->tabBar()->tabText(ic); u = CGuiUtility::replaceTabCountValue(u, this->countUsers()); @@ -97,8 +97,8 @@ namespace BlackGui Q_UNUSED(from); if (INetwork::isDisconnectedStatus(to)) { - this->ui->tvp_AllUsers->clear(); - this->ui->tvp_Clients->clear(); + ui->tvp_AllUsers->clear(); + ui->tvp_Clients->clear(); } } } // namespace diff --git a/src/blackgui/components/voiceroomscomponent.cpp b/src/blackgui/components/voiceroomscomponent.cpp index 43d770c92..c5c3d56d7 100644 --- a/src/blackgui/components/voiceroomscomponent.cpp +++ b/src/blackgui/components/voiceroomscomponent.cpp @@ -60,8 +60,8 @@ namespace BlackGui Q_ASSERT(sGui->getIContextOwnAircraft()); // voice room resolution is part of own aircraft QString url1; QString url2; - if (this->ui->cb_CockpitVoiceRoom1Override->isChecked()) { url1 = this->ui->le_CockpitVoiceRoomCom1->text().trimmed(); } - if (this->ui->cb_CockpitVoiceRoom2Override->isChecked()) { url2 = this->ui->le_CockpitVoiceRoomCom2->text().trimmed(); } + if (ui->cb_CockpitVoiceRoom1Override->isChecked()) { url1 = ui->le_CockpitVoiceRoomCom1->text().trimmed(); } + if (ui->cb_CockpitVoiceRoom2Override->isChecked()) { url2 = ui->le_CockpitVoiceRoomCom2->text().trimmed(); } sGui->getIContextOwnAircraft()->setAudioVoiceRoomOverrideUrls(url1, url2); } @@ -69,8 +69,8 @@ namespace BlackGui { bool c1 = ui->cb_CockpitVoiceRoom1Override->isChecked(); bool c2 = ui->cb_CockpitVoiceRoom2Override->isChecked(); - this->ui->le_CockpitVoiceRoomCom1->setReadOnly(!c1); - this->ui->le_CockpitVoiceRoomCom2->setReadOnly(!c2); + ui->le_CockpitVoiceRoomCom1->setReadOnly(!c1); + ui->le_CockpitVoiceRoomCom2->setReadOnly(!c2); } void CVoiceRoomsComponent::ps_updateAudioVoiceRoomsFromContext(const CVoiceRoomList &selectedVoiceRooms, bool connected) @@ -82,29 +82,29 @@ namespace BlackGui // remark // isAudioPlaying() is not set, as this is only a temporary value when really "something is playing" - bool changedUrl1 = (room1.getVoiceRoomUrl() == this->ui->le_CockpitVoiceRoomCom1->text()); - this->ui->le_CockpitVoiceRoomCom1->setText(room1.getVoiceRoomUrl()); + bool changedUrl1 = (room1.getVoiceRoomUrl() == ui->le_CockpitVoiceRoomCom1->text()); + ui->le_CockpitVoiceRoomCom1->setText(room1.getVoiceRoomUrl()); if (room1.isConnected()) { - this->ui->le_CockpitVoiceRoomCom1->setStyleSheet("background: green"); - if (sGui->getIContextAudio()) this->ui->tvp_CockpitVoiceRoom1->updateContainer(sGui->getIContextAudio()->getRoomUsers(BlackMisc::Aviation::CComSystem::Com1)); + ui->le_CockpitVoiceRoomCom1->setStyleSheet("background: green"); + if (sGui->getIContextAudio()) ui->tvp_CockpitVoiceRoom1->updateContainer(sGui->getIContextAudio()->getRoomUsers(BlackMisc::Aviation::CComSystem::Com1)); } else { - this->ui->le_CockpitVoiceRoomCom1->setStyleSheet(""); - this->ui->tvp_CockpitVoiceRoom1->clear(); + ui->le_CockpitVoiceRoomCom1->setStyleSheet(""); + ui->tvp_CockpitVoiceRoom1->clear(); } - bool changedUrl2 = (room2.getVoiceRoomUrl() == this->ui->le_CockpitVoiceRoomCom2->text()); - this->ui->le_CockpitVoiceRoomCom2->setText(room2.getVoiceRoomUrl()); + bool changedUrl2 = (room2.getVoiceRoomUrl() == ui->le_CockpitVoiceRoomCom2->text()); + ui->le_CockpitVoiceRoomCom2->setText(room2.getVoiceRoomUrl()); if (room2.isConnected()) { - this->ui->le_CockpitVoiceRoomCom2->setStyleSheet("background: green"); + ui->le_CockpitVoiceRoomCom2->setStyleSheet("background: green"); } else { - this->ui->le_CockpitVoiceRoomCom2->setStyleSheet(""); - this->ui->tvp_CockpitVoiceRoom2->clear(); + ui->le_CockpitVoiceRoomCom2->setStyleSheet(""); + ui->tvp_CockpitVoiceRoom2->clear(); } if (changedUrl1 || changedUrl2) { @@ -124,22 +124,22 @@ namespace BlackGui void CVoiceRoomsComponent::ps_updateVoiceRoomMembers() { if (!sGui->getIContextAudio()) { return; } - if (!this->ui->le_CockpitVoiceRoomCom1->text().trimmed().isEmpty()) + if (!ui->le_CockpitVoiceRoomCom1->text().trimmed().isEmpty()) { - this->ui->tvp_CockpitVoiceRoom1->updateContainer(sGui->getIContextAudio()->getRoomUsers(BlackMisc::Aviation::CComSystem::Com1)); + ui->tvp_CockpitVoiceRoom1->updateContainer(sGui->getIContextAudio()->getRoomUsers(BlackMisc::Aviation::CComSystem::Com1)); } else { - this->ui->tvp_CockpitVoiceRoom1->clear(); + ui->tvp_CockpitVoiceRoom1->clear(); } - if (!this->ui->le_CockpitVoiceRoomCom2->text().trimmed().isEmpty()) + if (!ui->le_CockpitVoiceRoomCom2->text().trimmed().isEmpty()) { - this->ui->tvp_CockpitVoiceRoom2->updateContainer(sGui->getIContextAudio()->getRoomUsers(BlackMisc::Aviation::CComSystem::Com2)); + ui->tvp_CockpitVoiceRoom2->updateContainer(sGui->getIContextAudio()->getRoomUsers(BlackMisc::Aviation::CComSystem::Com2)); } else { - this->ui->tvp_CockpitVoiceRoom2->clear(); + ui->tvp_CockpitVoiceRoom2->clear(); } } } // namespace diff --git a/src/blackgui/editors/aircrafticaoform.cpp b/src/blackgui/editors/aircrafticaoform.cpp index a975deb6a..0109aa1c4 100644 --- a/src/blackgui/editors/aircrafticaoform.cpp +++ b/src/blackgui/editors/aircrafticaoform.cpp @@ -43,16 +43,16 @@ namespace BlackGui ui(new Ui::CAircraftIcaoForm) { ui->setupUi(this); - this->ui->lai_id->set(CIcons::appAircraftIcao16(), "Id:"); - this->ui->le_Updated->setReadOnly(true); - this->ui->le_Id->setReadOnly(true); - this->ui->aircraft_Selector->withIcaoDescription(false); - connect(this->ui->aircraft_Selector, &CDbAircraftIcaoSelectorComponent::changedAircraftIcao, this, &CAircraftIcaoForm::setValue); + ui->lai_id->set(CIcons::appAircraftIcao16(), "Id:"); + ui->le_Updated->setReadOnly(true); + ui->le_Id->setReadOnly(true); + ui->aircraft_Selector->withIcaoDescription(false); + connect(ui->aircraft_Selector, &CDbAircraftIcaoSelectorComponent::changedAircraftIcao, this, &CAircraftIcaoForm::setValue); // drag and drop - connect(this->ui->drop_DropData, &CDropSite::droppedValueObject, this, &CAircraftIcaoForm::ps_droppedCode); - this->ui->drop_DropData->setInfoText(""); - this->ui->drop_DropData->setAcceptedMetaTypeIds({ qMetaTypeId(), qMetaTypeId()}); + connect(ui->drop_DropData, &CDropSite::droppedValueObject, this, &CAircraftIcaoForm::ps_droppedCode); + ui->drop_DropData->setInfoText(""); + ui->drop_DropData->setAcceptedMetaTypeIds({ qMetaTypeId(), qMetaTypeId()}); } CAircraftIcaoForm::~CAircraftIcaoForm() @@ -63,30 +63,30 @@ namespace BlackGui if (icao == this->m_originalCode) { return false; } this->m_originalCode = icao; - this->ui->le_Id->setText(icao.getDbKeyAsString()); - this->ui->aircraft_Selector->setAircraftIcao(icao); - this->ui->le_Manufacturer->setText(icao.getManufacturer()); - this->ui->le_ModelDescription->setText(icao.getModelDescription()); - this->ui->le_Family->setText(icao.getFamily()); - this->ui->le_Iata->setText(icao.getIataCode()); + ui->le_Id->setText(icao.getDbKeyAsString()); + ui->aircraft_Selector->setAircraftIcao(icao); + ui->le_Manufacturer->setText(icao.getManufacturer()); + ui->le_ModelDescription->setText(icao.getModelDescription()); + ui->le_Family->setText(icao.getFamily()); + ui->le_Iata->setText(icao.getIataCode()); - this->ui->cb_Legacy->setChecked(icao.isLegacyAircraft()); - this->ui->cb_Military->setChecked(icao.isMilitary()); - this->ui->cb_RealWorld->setChecked(icao.isRealWorld()); - this->ui->combined_TypeSelector->setCombinedType(icao.getCombinedType()); + ui->cb_Legacy->setChecked(icao.isLegacyAircraft()); + ui->cb_Military->setChecked(icao.isMilitary()); + ui->cb_RealWorld->setChecked(icao.isRealWorld()); + ui->combined_TypeSelector->setCombinedType(icao.getCombinedType()); QString rank(icao.getRankString()); QString wtc(icao.getWtc()); - CGuiUtility::setComboBoxValueByStartingString(this->ui->cb_Rank, rank, "unspecified"); - CGuiUtility::setComboBoxValueByStartingString(this->ui->cb_Wtc, wtc, "unspecified"); + CGuiUtility::setComboBoxValueByStartingString(ui->cb_Rank, rank, "unspecified"); + CGuiUtility::setComboBoxValueByStartingString(ui->cb_Wtc, wtc, "unspecified"); - this->ui->le_Updated->setText(icao.getFormattedUtcTimestampYmdhms()); + ui->le_Updated->setText(icao.getFormattedUtcTimestampYmdhms()); return true; } CAircraftIcaoCode CAircraftIcaoForm::getValue() const { - CAircraftIcaoCode icao(this->ui->aircraft_Selector->getAircraftIcao()); + CAircraftIcaoCode icao(ui->aircraft_Selector->getAircraftIcao()); if (!icao.hasValidDbKey()) { // not based on DB yet, do we have a DB key @@ -103,18 +103,18 @@ namespace BlackGui } } - const QString manufacturer(this->ui->le_Manufacturer->text().trimmed().toUpper()); - const QString modelDescription(this->ui->le_ModelDescription->text().trimmed()); - const QString iata(this->ui->le_Family->text().trimmed().toUpper()); - const QString family(this->ui->le_Iata->text().trimmed().toUpper()); + const QString manufacturer(ui->le_Manufacturer->text().trimmed().toUpper()); + const QString modelDescription(ui->le_ModelDescription->text().trimmed()); + const QString iata(ui->le_Family->text().trimmed().toUpper()); + const QString family(ui->le_Iata->text().trimmed().toUpper()); const QString wtc(ui->cb_Wtc->currentText().left(1)); const QString combined(ui->combined_TypeSelector->getCombinedType()); bool ok; - int rank = this->ui->cb_Rank->currentText().toInt(&ok); + int rank = ui->cb_Rank->currentText().toInt(&ok); if (!ok) { rank = 10; } - bool legacy = this->ui->cb_Legacy->isChecked(); - bool military = this->ui->cb_Military->isChecked(); - bool realWorld = this->ui->cb_RealWorld->isChecked(); + bool legacy = ui->cb_Legacy->isChecked(); + bool military = ui->cb_Military->isChecked(); + bool realWorld = ui->cb_RealWorld->isChecked(); icao.setManufacturer(manufacturer); icao.setModelDescription(modelDescription); icao.setWtc(wtc); @@ -131,13 +131,13 @@ namespace BlackGui Q_UNUSED(nested); CAircraftIcaoCode code(getValue()); CStatusMessageList msgs(code.validate()); - this->ui->val_Indicator->setState(msgs); + ui->val_Indicator->setState(msgs); return msgs; } void CAircraftIcaoForm::allowDrop(bool allowDrop) { - this->ui->drop_DropData->allowDrop(allowDrop); + ui->drop_DropData->allowDrop(allowDrop); } bool CAircraftIcaoForm::isDropAllowed() const @@ -148,25 +148,25 @@ namespace BlackGui void CAircraftIcaoForm::setReadOnly(bool readOnly) { this->m_readOnly = readOnly; - this->ui->aircraft_Selector->setReadOnly(readOnly); - this->ui->le_Manufacturer->setReadOnly(readOnly); - this->ui->le_ModelDescription->setReadOnly(readOnly); - this->ui->le_Family->setReadOnly(readOnly); - this->ui->le_Iata->setReadOnly(readOnly); + ui->aircraft_Selector->setReadOnly(readOnly); + ui->le_Manufacturer->setReadOnly(readOnly); + ui->le_ModelDescription->setReadOnly(readOnly); + ui->le_Family->setReadOnly(readOnly); + ui->le_Iata->setReadOnly(readOnly); - CGuiUtility::checkBoxReadOnly(this->ui->cb_Legacy, readOnly); - CGuiUtility::checkBoxReadOnly(this->ui->cb_Military, readOnly); - CGuiUtility::checkBoxReadOnly(this->ui->cb_RealWorld, readOnly); + CGuiUtility::checkBoxReadOnly(ui->cb_Legacy, readOnly); + CGuiUtility::checkBoxReadOnly(ui->cb_Military, readOnly); + CGuiUtility::checkBoxReadOnly(ui->cb_RealWorld, readOnly); - this->ui->cb_Wtc->setEnabled(!readOnly); - this->ui->cb_Rank->setEnabled(!readOnly); - this->ui->combined_TypeSelector->setReadOnly(readOnly); + ui->cb_Wtc->setEnabled(!readOnly); + ui->cb_Rank->setEnabled(!readOnly); + ui->combined_TypeSelector->setReadOnly(readOnly); } void CAircraftIcaoForm::setSelectOnly() { this->setReadOnly(true); - this->ui->aircraft_Selector->setReadOnly(false); + ui->aircraft_Selector->setReadOnly(false); } void CAircraftIcaoForm::clear() @@ -196,7 +196,7 @@ namespace BlackGui int CAircraftIcaoForm::getDbKeyFromGui() const { - QString key(this->ui->le_Id->text().trimmed()); + QString key(ui->le_Id->text().trimmed()); return IDatastoreObjectWithIntegerKey::stringToDbKey(key); } } // ns diff --git a/src/blackgui/editors/airlineicaoform.cpp b/src/blackgui/editors/airlineicaoform.cpp index f57f26221..5a4adc7fb 100644 --- a/src/blackgui/editors/airlineicaoform.cpp +++ b/src/blackgui/editors/airlineicaoform.cpp @@ -38,18 +38,18 @@ namespace BlackGui ui(new Ui::CAirlineIcaoForm) { ui->setupUi(this); - this->ui->le_Updated->setReadOnly(true); - this->ui->le_Id->setReadOnly(true); - this->ui->lai_Id->set(CIcons::appAirlineIcao16(), "Id:"); + ui->le_Updated->setReadOnly(true); + ui->le_Id->setReadOnly(true); + ui->lai_Id->set(CIcons::appAirlineIcao16(), "Id:"); - this->ui->selector_AirlineDesignator->withIcaoDescription(false); - connect(this->ui->selector_AirlineName, &CDbAirlineIcaoSelectorComponent::changedAirlineIcao, this, &CAirlineIcaoForm::setValue); - connect(this->ui->selector_AirlineDesignator, &CDbAirlineIcaoSelectorComponent::changedAirlineIcao, this, &CAirlineIcaoForm::setValue); + ui->selector_AirlineDesignator->withIcaoDescription(false); + connect(ui->selector_AirlineName, &CDbAirlineIcaoSelectorComponent::changedAirlineIcao, this, &CAirlineIcaoForm::setValue); + connect(ui->selector_AirlineDesignator, &CDbAirlineIcaoSelectorComponent::changedAirlineIcao, this, &CAirlineIcaoForm::setValue); // drag and drop - connect(this->ui->drop_DropData, &CDropSite::droppedValueObject, this, &CAirlineIcaoForm::ps_droppedCode); - this->ui->drop_DropData->setInfoText(""); - this->ui->drop_DropData->setAcceptedMetaTypeIds({ qMetaTypeId(), qMetaTypeId()}); + connect(ui->drop_DropData, &CDropSite::droppedValueObject, this, &CAirlineIcaoForm::ps_droppedCode); + ui->drop_DropData->setInfoText(""); + ui->drop_DropData->setAcceptedMetaTypeIds({ qMetaTypeId(), qMetaTypeId()}); } CAirlineIcaoForm::~CAirlineIcaoForm() @@ -60,15 +60,15 @@ namespace BlackGui if (this->m_originalCode == icao) { return; } this->m_originalCode = icao; - this->ui->selector_AirlineDesignator->setAirlineIcao(icao); - this->ui->selector_AirlineName->setAirlineIcao(icao); - this->ui->le_Id->setText(icao.getDbKeyAsString()); - this->ui->le_TelephonyDesignator->setText(icao.getTelephonyDesignator()); - this->ui->le_Updated->setText(icao.getFormattedUtcTimestampYmdhms()); - this->ui->cb_Va->setChecked(icao.isVirtualAirline()); - this->ui->cb_Military->setChecked(icao.isMilitary()); - this->ui->country_Selector->setCountry(icao.getCountry()); - this->ui->lbl_AirlineIcon->setPixmap(icao.toPixmap()); + ui->selector_AirlineDesignator->setAirlineIcao(icao); + ui->selector_AirlineName->setAirlineIcao(icao); + ui->le_Id->setText(icao.getDbKeyAsString()); + ui->le_TelephonyDesignator->setText(icao.getTelephonyDesignator()); + ui->le_Updated->setText(icao.getFormattedUtcTimestampYmdhms()); + ui->cb_Va->setChecked(icao.isVirtualAirline()); + ui->cb_Military->setChecked(icao.isMilitary()); + ui->country_Selector->setCountry(icao.getCountry()); + ui->lbl_AirlineIcon->setPixmap(icao.toPixmap()); if (this->m_originalCode.hasCompleteData()) { @@ -79,11 +79,11 @@ namespace BlackGui CAirlineIcaoCode CAirlineIcaoForm::getValue() const { CAirlineIcaoCode code(m_originalCode); - code.setVirtualAirline(this->ui->cb_Va->isChecked()); - code.setMilitary(this->ui->cb_Military->isChecked()); - code.setCountry(this->ui->country_Selector->getCountry()); - code.setName(this->ui->selector_AirlineName->getAirlineIcao().getName()); - code.setTelephonyDesignator(this->ui->le_TelephonyDesignator->text()); + code.setVirtualAirline(ui->cb_Va->isChecked()); + code.setMilitary(ui->cb_Military->isChecked()); + code.setCountry(ui->country_Selector->getCountry()); + code.setName(ui->selector_AirlineName->getAirlineIcao().getName()); + code.setTelephonyDesignator(ui->le_TelephonyDesignator->text()); return code; } @@ -98,36 +98,36 @@ namespace BlackGui msgs.removeWarningsAndBelow(); } - this->ui->val_Indicator->setState(msgs); + ui->val_Indicator->setState(msgs); return msgs; } void CAirlineIcaoForm::allowDrop(bool allowDrop) { - this->ui->drop_DropData->allowDrop(allowDrop); + ui->drop_DropData->allowDrop(allowDrop); } bool CAirlineIcaoForm::isDropAllowed() const { - return this->ui->drop_DropData->isDropAllowed(); + return ui->drop_DropData->isDropAllowed(); } void CAirlineIcaoForm::setReadOnly(bool readOnly) { - this->ui->selector_AirlineDesignator->setReadOnly(readOnly); - this->ui->selector_AirlineName->setReadOnly(readOnly); - this->ui->le_TelephonyDesignator->setReadOnly(readOnly); - this->ui->country_Selector->setReadOnly(readOnly); + ui->selector_AirlineDesignator->setReadOnly(readOnly); + ui->selector_AirlineName->setReadOnly(readOnly); + ui->le_TelephonyDesignator->setReadOnly(readOnly); + ui->country_Selector->setReadOnly(readOnly); - CGuiUtility::checkBoxReadOnly(this->ui->cb_Va, readOnly); - CGuiUtility::checkBoxReadOnly(this->ui->cb_Military, readOnly); + CGuiUtility::checkBoxReadOnly(ui->cb_Va, readOnly); + CGuiUtility::checkBoxReadOnly(ui->cb_Military, readOnly); } void CAirlineIcaoForm::setSelectOnly() { this->setReadOnly(true); - this->ui->selector_AirlineDesignator->setReadOnly(false); - this->ui->selector_AirlineName->setReadOnly(false); + ui->selector_AirlineDesignator->setReadOnly(false); + ui->selector_AirlineName->setReadOnly(false); } void CAirlineIcaoForm::clear() diff --git a/src/blackgui/editors/distributorform.cpp b/src/blackgui/editors/distributorform.cpp index ed6ab2c52..260cff4e0 100644 --- a/src/blackgui/editors/distributorform.cpp +++ b/src/blackgui/editors/distributorform.cpp @@ -34,15 +34,15 @@ namespace BlackGui ui(new Ui::CDistributorForm) { ui->setupUi(this); - this->ui->le_Updated->setReadOnly(true); - this->ui->distributor_Selector->withDistributorDescription(false); + ui->le_Updated->setReadOnly(true); + ui->distributor_Selector->withDistributorDescription(false); ui->lai_Id->set(CIcons::appDistributors16(), "Id:"); // drag and drop - connect(this->ui->drop_DropData, &CDropSite::droppedValueObject, this, &CDistributorForm::ps_droppedCode); - connect(this->ui->distributor_Selector, &CDbDistributorSelectorComponent::changedDistributor, this, &CDistributorForm::setValue); - this->ui->drop_DropData->setInfoText(""); - this->ui->drop_DropData->setAcceptedMetaTypeIds({ qMetaTypeId(), qMetaTypeId()}); + connect(ui->drop_DropData, &CDropSite::droppedValueObject, this, &CDistributorForm::ps_droppedCode); + connect(ui->distributor_Selector, &CDbDistributorSelectorComponent::changedDistributor, this, &CDistributorForm::setValue); + ui->drop_DropData->setInfoText(""); + ui->drop_DropData->setAcceptedMetaTypeIds({ qMetaTypeId(), qMetaTypeId()}); } CDistributorForm::~CDistributorForm() @@ -53,20 +53,20 @@ namespace BlackGui const CDistributor currentDistributor(this->getValue()); if (currentDistributor == distributor) { return false; } - this->ui->distributor_Selector->setDistributor(distributor); - this->ui->le_Description->setText(distributor.getDescription()); - this->ui->le_Alias1->setText(distributor.getAlias1()); - this->ui->le_Alias2->setText(distributor.getAlias2()); - this->ui->le_Updated->setText(distributor.getFormattedUtcTimestampYmdhms()); + ui->distributor_Selector->setDistributor(distributor); + ui->le_Description->setText(distributor.getDescription()); + ui->le_Alias1->setText(distributor.getAlias1()); + ui->le_Alias2->setText(distributor.getAlias2()); + ui->le_Updated->setText(distributor.getFormattedUtcTimestampYmdhms()); return true; } CDistributor CDistributorForm::getValue() const { CDistributor distributor(ui->distributor_Selector->getDistributor()); - distributor.setAlias1(this->ui->le_Alias1->text()); - distributor.setAlias2(this->ui->le_Alias2->text()); - distributor.setDescription(this->ui->le_Description->text()); + distributor.setAlias1(ui->le_Alias1->text()); + distributor.setAlias2(ui->le_Alias2->text()); + distributor.setDescription(ui->le_Description->text()); return distributor; } @@ -80,38 +80,38 @@ namespace BlackGui // in readonly I cannot change the data anyway, so skip warnings msgs.removeWarningsAndBelow(); } - this->ui->val_Indicator->setState(msgs); + ui->val_Indicator->setState(msgs); return msgs; } void CDistributorForm::allowDrop(bool allowDrop) { - this->ui->drop_DropData->allowDrop(allowDrop); + ui->drop_DropData->allowDrop(allowDrop); } bool CDistributorForm::isDropAllowed() const { - return this->ui->drop_DropData->isDropAllowed(); + return ui->drop_DropData->isDropAllowed(); } void CDistributorForm::setReadOnly(bool readOnly) { - this->ui->le_Alias1->setReadOnly(readOnly); - this->ui->le_Alias2->setReadOnly(readOnly); - this->ui->le_Description->setReadOnly(readOnly); - this->ui->distributor_Selector->setReadOnly(readOnly); + ui->le_Alias1->setReadOnly(readOnly); + ui->le_Alias2->setReadOnly(readOnly); + ui->le_Description->setReadOnly(readOnly); + ui->distributor_Selector->setReadOnly(readOnly); } void CDistributorForm::setSelectOnly() { this->setReadOnly(true); - this->ui->distributor_Selector->setReadOnly(false); + ui->distributor_Selector->setReadOnly(false); } void CDistributorForm::clear() { setValue(CDistributor()); - this->ui->distributor_Selector->setReadOnly(false); + ui->distributor_Selector->setReadOnly(false); } void CDistributorForm::ps_droppedCode(const BlackMisc::CVariant &variantDropped) diff --git a/src/blackgui/editors/modelmappingform.cpp b/src/blackgui/editors/modelmappingform.cpp index ddde4ee01..fcc6b7f09 100644 --- a/src/blackgui/editors/modelmappingform.cpp +++ b/src/blackgui/editors/modelmappingform.cpp @@ -47,11 +47,11 @@ namespace BlackGui BlackMisc::Simulation::CAircraftModel CModelMappingForm::getValue() const { CAircraftModel model(m_originalModel); - model.setSimulator(this->ui->selector_Simulator->getValue()); - model.setDescription(this->ui->le_Description->text()); - model.setModelString(this->ui->le_ModelKey->text()); - model.setName(this->ui->le_Name->text()); - model.setModelMode(this->ui->selector_ModelMode->getMode()); + model.setSimulator(ui->selector_Simulator->getValue()); + model.setDescription(ui->le_Description->text()); + model.setModelString(ui->le_ModelKey->text()); + model.setName(ui->le_Name->text()); + model.setModelMode(ui->selector_ModelMode->getMode()); return model; } @@ -59,15 +59,15 @@ namespace BlackGui { CAircraftModel model(getValue()); CStatusMessageList msgs(model.validate(withNestedObjects)); - this->ui->val_Indicator->setState(msgs); + ui->val_Indicator->setState(msgs); return msgs; } void CModelMappingForm::setReadOnly(bool readOnly) { - this->ui->le_Description->setReadOnly(readOnly); - this->ui->le_ModelKey->setReadOnly(readOnly); - this->ui->le_Name->setReadOnly(readOnly); + ui->le_Description->setReadOnly(readOnly); + ui->le_ModelKey->setReadOnly(readOnly); + ui->le_Name->setReadOnly(readOnly); } void CModelMappingForm::setSelectOnly() diff --git a/src/blackgui/editors/modelmappingmodifyform.cpp b/src/blackgui/editors/modelmappingmodifyform.cpp index e2108159d..561dad7ef 100644 --- a/src/blackgui/editors/modelmappingmodifyform.cpp +++ b/src/blackgui/editors/modelmappingmodifyform.cpp @@ -78,10 +78,10 @@ namespace BlackGui void CModelMappingModifyForm::setValue(const CAircraftModel &model) { - this->ui->le_Description->setText(model.getDescription()); - this->ui->le_Name->setText(model.getName()); - this->ui->selector_SimulatorSelector->setValue(model.getSimulator()); - this->ui->selector_ModeSelector->setValue(model); + ui->le_Description->setText(model.getDescription()); + ui->le_Name->setText(model.getName()); + ui->selector_SimulatorSelector->setValue(model.getSimulator()); + ui->selector_ModeSelector->setValue(model); } void CModelMappingModifyForm::setReadOnly(bool readOnly) diff --git a/src/blackgui/editors/serverform.cpp b/src/blackgui/editors/serverform.cpp index 1f05b2bc2..818958bf0 100644 --- a/src/blackgui/editors/serverform.cpp +++ b/src/blackgui/editors/serverform.cpp @@ -26,7 +26,7 @@ namespace BlackGui ui(new Ui::CNetworkServerForm) { ui->setupUi(this); - this->ui->le_Port->setValidator(new QIntValidator(1, 65535, this)); + ui->le_Port->setValidator(new QIntValidator(1, 65535, this)); } CServerForm::~CServerForm() @@ -35,51 +35,51 @@ namespace BlackGui void CServerForm::setServer(const CServer &server) { CUser user = server.getUser(); - this->ui->le_NetworkId->setText(user.getId()); - this->ui->le_RealName->setText(user.getRealName()); - this->ui->le_Name->setText(server.getName()); - this->ui->le_Password->setText(user.getPassword()); - this->ui->le_Description->setText(server.getDescription()); - this->ui->le_Address->setText(server.getAddress()); - this->ui->le_Port->setText(QString::number(server.getPort())); - this->ui->form_ServerFsd->setValue(server.getFsdSetup()); + ui->le_NetworkId->setText(user.getId()); + ui->le_RealName->setText(user.getRealName()); + ui->le_Name->setText(server.getName()); + ui->le_Password->setText(user.getPassword()); + ui->le_Description->setText(server.getDescription()); + ui->le_Address->setText(server.getAddress()); + ui->le_Port->setText(QString::number(server.getPort())); + ui->form_ServerFsd->setValue(server.getFsdSetup()); } BlackMisc::Network::CServer CServerForm::getServer() const { CUser user( - this->ui->le_NetworkId->text().trimmed(), - this->ui->le_RealName->text().trimmed().simplified(), + ui->le_NetworkId->text().trimmed(), + ui->le_RealName->text().trimmed().simplified(), "", - this->ui->le_Password->text().trimmed() + ui->le_Password->text().trimmed() ); CServer server( - this->ui->le_Name->text().trimmed().simplified(), - this->ui->le_Description->text().trimmed().simplified(), - this->ui->le_Address->text().trimmed(), - this->ui->le_Port->text().trimmed().toInt(), + ui->le_Name->text().trimmed().simplified(), + ui->le_Description->text().trimmed().simplified(), + ui->le_Address->text().trimmed(), + ui->le_Port->text().trimmed().toInt(), user ); - CFsdSetup setup(this->ui->form_ServerFsd->getValue()); + CFsdSetup setup(ui->form_ServerFsd->getValue()); server.setFsdSetup(setup); return server; } void CServerForm::setReadOnly(bool readOnly) { - this->ui->le_NetworkId->setReadOnly(readOnly); - this->ui->le_RealName->setReadOnly(readOnly); - this->ui->le_Name->setReadOnly(readOnly); - this->ui->le_Description->setReadOnly(readOnly); - this->ui->le_Address->setReadOnly(readOnly); - this->ui->le_Port->setReadOnly(readOnly); - this->ui->le_Password->setReadOnly(readOnly); - this->ui->form_ServerFsd->setReadOnly(readOnly); + ui->le_NetworkId->setReadOnly(readOnly); + ui->le_RealName->setReadOnly(readOnly); + ui->le_Name->setReadOnly(readOnly); + ui->le_Description->setReadOnly(readOnly); + ui->le_Address->setReadOnly(readOnly); + ui->le_Port->setReadOnly(readOnly); + ui->le_Password->setReadOnly(readOnly); + ui->form_ServerFsd->setReadOnly(readOnly); } void CServerForm::showPasswordField(bool show) { - if (this->ui->le_Password->isVisible() == show) { return; } + if (ui->le_Password->isVisible() == show) { return; } if (m_passwordNameLabel.isEmpty()) { m_passwordNameLabel = ui->lbl_IdPassword->text(); } if (show) { @@ -89,7 +89,7 @@ namespace BlackGui { ui->lbl_IdPassword->setText("Id"); } - this->ui->le_Password->setVisible(show); + ui->le_Password->setVisible(show); } BlackMisc::CStatusMessageList CServerForm::validate(bool nested) const diff --git a/src/blackgui/filters/aircrafticaofilterbar.cpp b/src/blackgui/filters/aircrafticaofilterbar.cpp index 947a921b5..5dd500887 100644 --- a/src/blackgui/filters/aircrafticaofilterbar.cpp +++ b/src/blackgui/filters/aircrafticaofilterbar.cpp @@ -32,14 +32,14 @@ namespace BlackGui ui(new Ui::CAircraftIcaoFilterBar) { ui->setupUi(this); - this->setButtonsAndCount(this->ui->filter_Buttons); + this->setButtonsAndCount(ui->filter_Buttons); connect(ui->le_Designator, &QLineEdit::returnPressed, this, &CFilterWidget::triggerFilter); connect(ui->le_Manufacturer, &QLineEdit::returnPressed, this, &CFilterWidget::triggerFilter); connect(ui->le_Description, &QLineEdit::returnPressed, this, &CFilterWidget::triggerFilter); CUpperCaseValidator *ucv = new CUpperCaseValidator(this); - this->ui->le_Designator->setValidator(ucv); - this->ui->le_Manufacturer->setValidator(ucv); + ui->le_Designator->setValidator(ucv); + ui->le_Manufacturer->setValidator(ucv); // reset form this->clearForm(); @@ -52,10 +52,10 @@ namespace BlackGui { return std::unique_ptr( new CAircraftIcaoFilter( - this->ui->le_Designator->text(), - this->ui->le_Manufacturer->text(), - this->ui->le_Description->text(), - this->ui->combinedType_Selector->getCombinedType() + ui->le_Designator->text(), + ui->le_Manufacturer->text(), + ui->le_Description->text(), + ui->combinedType_Selector->getCombinedType() )); } @@ -64,28 +64,28 @@ namespace BlackGui bool filter = false; if (icao.hasDesignator()) { - this->ui->le_Designator->setText(icao.getDesignator()); + ui->le_Designator->setText(icao.getDesignator()); filter = true; } if (icao.hasManufacturer()) { - this->ui->le_Manufacturer->setText(icao.getManufacturer()); + ui->le_Manufacturer->setText(icao.getManufacturer()); filter = true; } if (icao.hasModelDescription()) { - this->ui->le_Manufacturer->setText("*" + icao.getModelDescription() + "*"); + ui->le_Manufacturer->setText("*" + icao.getModelDescription() + "*"); filter = true; } if (filter) { - this->ui->filter_Buttons->clickButton(CFilterBarButtons::Filter); + ui->filter_Buttons->clickButton(CFilterBarButtons::Filter); } } void CAircraftIcaoFilterBar::onRowCountChanged(int count, bool withFilter) { - this->ui->filter_Buttons->onRowCountChanged(count, withFilter); + ui->filter_Buttons->onRowCountChanged(count, withFilter); } void CAircraftIcaoFilterBar::clearForm() diff --git a/src/blackgui/filters/aircraftmodelfilterbar.cpp b/src/blackgui/filters/aircraftmodelfilterbar.cpp index e23e6f976..de057ce81 100644 --- a/src/blackgui/filters/aircraftmodelfilterbar.cpp +++ b/src/blackgui/filters/aircraftmodelfilterbar.cpp @@ -37,9 +37,9 @@ namespace BlackGui ui(new Ui::CAircraftModelFilterBar) { ui->setupUi(this); - this->ui->frp_SimulatorSelector->setAll(); - this->ui->comp_DistributorSelector->withDistributorDescription(false); - this->setButtonsAndCount(this->ui->filter_Buttons); + ui->frp_SimulatorSelector->setAll(); + ui->comp_DistributorSelector->withDistributorDescription(false); + this->setButtonsAndCount(ui->filter_Buttons); connect(ui->le_AircraftIcao, &QLineEdit::returnPressed, this, &CFilterWidget::triggerFilter); connect(ui->le_AircraftManufacturer, &QLineEdit::returnPressed, this, &CFilterWidget::triggerFilter); @@ -59,11 +59,11 @@ namespace BlackGui connect(ui->comp_DistributorSelector, &CDbDistributorSelectorComponent::changedDistributor, this, &CAircraftModelFilterBar::ps_distributorChanged); CUpperCaseValidator *ucv = new CUpperCaseValidator(this); - this->ui->le_AircraftIcao->setValidator(ucv); - this->ui->le_AirlineIcao->setValidator(ucv); - this->ui->le_ModelString->setValidator(ucv); - this->ui->le_AircraftManufacturer->setValidator(ucv); - this->ui->le_LiveryCode->setValidator(ucv); + ui->le_AircraftIcao->setValidator(ucv); + ui->le_AirlineIcao->setValidator(ucv); + ui->le_ModelString->setValidator(ucv); + ui->le_AircraftManufacturer->setValidator(ucv); + ui->le_LiveryCode->setValidator(ucv); // reset form this->clearForm(); @@ -101,44 +101,44 @@ namespace BlackGui return std::unique_ptr( new CAircraftModelFilter( - this->ui->le_ModelString->text(), - this->ui->le_ModelDescription->text(), + ui->le_ModelString->text(), + ui->le_ModelDescription->text(), mf, dbf, ui->cbt_Military->checkState(), ui->cbt_ColorLiveries->checkState(), - this->ui->le_AircraftIcao->text(), - this->ui->le_AircraftManufacturer->text(), - this->ui->le_AirlineIcao->text(), - this->ui->le_AirlineName->text(), - this->ui->le_LiveryCode->text(), - this->ui->le_FileName->text(), - this->ui->frp_SimulatorSelector->getValue(), - this->ui->comp_DistributorSelector->getDistributor() + ui->le_AircraftIcao->text(), + ui->le_AircraftManufacturer->text(), + ui->le_AirlineIcao->text(), + ui->le_AirlineName->text(), + ui->le_LiveryCode->text(), + ui->le_FileName->text(), + ui->frp_SimulatorSelector->getValue(), + ui->comp_DistributorSelector->getDistributor() )); } void CAircraftModelFilterBar::onRowCountChanged(int count, bool withFilter) { - this->ui->filter_Buttons->onRowCountChanged(count, withFilter); + ui->filter_Buttons->onRowCountChanged(count, withFilter); } void CAircraftModelFilterBar::clearForm() { - this->ui->le_ModelString->clear(); - this->ui->le_ModelDescription->clear(); - this->ui->le_AircraftIcao->clear(); - this->ui->le_AircraftManufacturer->clear(); - this->ui->le_AirlineIcao->clear(); - this->ui->le_AirlineName->clear(); - this->ui->le_LiveryCode->clear(); - this->ui->le_FileName->clear(); - this->ui->frp_SimulatorSelector->setAll(); - this->ui->comp_DistributorSelector->clear(); - this->ui->cbt_IncludeExclude->setCheckState(Qt::PartiallyChecked); - this->ui->cbt_Db->setCheckState(Qt::PartiallyChecked); - this->ui->cbt_Military->setCheckState(Qt::PartiallyChecked); - this->ui->cbt_ColorLiveries->setCheckState(Qt::PartiallyChecked); + ui->le_ModelString->clear(); + ui->le_ModelDescription->clear(); + ui->le_AircraftIcao->clear(); + ui->le_AircraftManufacturer->clear(); + ui->le_AirlineIcao->clear(); + ui->le_AirlineName->clear(); + ui->le_LiveryCode->clear(); + ui->le_FileName->clear(); + ui->frp_SimulatorSelector->setAll(); + ui->comp_DistributorSelector->clear(); + ui->cbt_IncludeExclude->setCheckState(Qt::PartiallyChecked); + ui->cbt_Db->setCheckState(Qt::PartiallyChecked); + ui->cbt_Military->setCheckState(Qt::PartiallyChecked); + ui->cbt_ColorLiveries->setCheckState(Qt::PartiallyChecked); } void CAircraftModelFilterBar::ps_simulatorSelectionChanged(const BlackMisc::Simulation::CSimulatorInfo &info) diff --git a/src/blackgui/filters/airlineicaofilterbar.cpp b/src/blackgui/filters/airlineicaofilterbar.cpp index 8c5c0ac87..01df03541 100644 --- a/src/blackgui/filters/airlineicaofilterbar.cpp +++ b/src/blackgui/filters/airlineicaofilterbar.cpp @@ -34,7 +34,7 @@ namespace BlackGui ui(new Ui::CAirlineIcaoFilterBar) { ui->setupUi(this); - this->setButtonsAndCount(this->ui->filter_Buttons); + this->setButtonsAndCount(ui->filter_Buttons); connect(ui->le_Designator, &QLineEdit::returnPressed, this, &CFilterWidget::triggerFilter); connect(ui->le_Name, &QLineEdit::returnPressed, this, &CFilterWidget::triggerFilter); @@ -52,11 +52,11 @@ namespace BlackGui { return std::unique_ptr( new CAirlineIcaoFilter( - this->ui->le_Designator->text().trimmed(), - this->ui->le_Name->text().trimmed(), - this->ui->country_Selector->isSet() ? this->ui->country_Selector->getCountry().getIsoCode() : "", - this->ui->cb_RealAirline->isChecked(), - this->ui->cb_VirtualAirline->isChecked() + ui->le_Designator->text().trimmed(), + ui->le_Name->text().trimmed(), + ui->country_Selector->isSet() ? ui->country_Selector->getCountry().getIsoCode() : "", + ui->cb_RealAirline->isChecked(), + ui->cb_VirtualAirline->isChecked() )); } @@ -65,41 +65,41 @@ namespace BlackGui bool filter = false; if (icao.hasValidDesignator()) { - this->ui->le_Designator->setText(icao.getVDesignator()); + ui->le_Designator->setText(icao.getVDesignator()); filter = true; } if (icao.hasName()) { - this->ui->le_Name->setText(icao.getName()); + ui->le_Name->setText(icao.getName()); filter = true; } if (filter) { - this->ui->filter_Buttons->clickButton(CFilterBarButtons::Filter); + ui->filter_Buttons->clickButton(CFilterBarButtons::Filter); } } void CAirlineIcaoFilterBar::onRowCountChanged(int count, bool withFilter) { - this->ui->filter_Buttons->onRowCountChanged(count, withFilter); + ui->filter_Buttons->onRowCountChanged(count, withFilter); } void CAirlineIcaoFilterBar::ps_CountryChanged(const CCountry &country) { if (country.hasIsoCode()) { - this->ui->filter_Buttons->clickButton(CFilterBarButtons::Filter); + ui->filter_Buttons->clickButton(CFilterBarButtons::Filter); } } void CAirlineIcaoFilterBar::clearForm() { - this->ui->le_Designator->clear(); - this->ui->le_Name->clear(); - this->ui->country_Selector->clear(); - this->ui->cb_RealAirline->setChecked(true); - this->ui->cb_VirtualAirline->setChecked(true); + ui->le_Designator->clear(); + ui->le_Name->clear(); + ui->country_Selector->clear(); + ui->cb_RealAirline->setChecked(true); + ui->cb_VirtualAirline->setChecked(true); } } // ns diff --git a/src/blackgui/filters/countryfilterbar.cpp b/src/blackgui/filters/countryfilterbar.cpp index f8630fd38..ad1d2254b 100644 --- a/src/blackgui/filters/countryfilterbar.cpp +++ b/src/blackgui/filters/countryfilterbar.cpp @@ -30,12 +30,12 @@ namespace BlackGui ui(new Ui::CCountryFilterBar) { ui->setupUi(this); - this->setButtonsAndCount(this->ui->filter_Buttons); + this->setButtonsAndCount(ui->filter_Buttons); connect(ui->le_IsoCode, &QLineEdit::returnPressed, this, &CFilterWidget::triggerFilter); connect(ui->le_Name, &QLineEdit::returnPressed, this, &CFilterWidget::triggerFilter); CUpperCaseValidator *ucv = new CUpperCaseValidator(this); - this->ui->le_IsoCode->setValidator(ucv); + ui->le_IsoCode->setValidator(ucv); // reset form this->clearForm(); @@ -55,7 +55,7 @@ namespace BlackGui void CCountryFilterBar::onRowCountChanged(int count, bool withFilter) { - this->ui->filter_Buttons->onRowCountChanged(count, withFilter); + ui->filter_Buttons->onRowCountChanged(count, withFilter); } void CCountryFilterBar::clearForm() diff --git a/src/blackgui/filters/filterbarbuttons.cpp b/src/blackgui/filters/filterbarbuttons.cpp index 060d3a39c..32835d0fd 100644 --- a/src/blackgui/filters/filterbarbuttons.cpp +++ b/src/blackgui/filters/filterbarbuttons.cpp @@ -23,9 +23,9 @@ namespace BlackGui ui(new Ui::CFilterBarButtons) { ui->setupUi(this); - connect(this->ui->tb_ClearForm, &QToolButton::clicked, this, &CFilterBarButtons::ps_buttonClicked); - connect(this->ui->tb_Filter, &QToolButton::clicked, this, &CFilterBarButtons::ps_buttonClicked); - connect(this->ui->tb_RemoveFilter, &QToolButton::clicked, this, &CFilterBarButtons::ps_buttonClicked); + connect(ui->tb_ClearForm, &QToolButton::clicked, this, &CFilterBarButtons::ps_buttonClicked); + connect(ui->tb_Filter, &QToolButton::clicked, this, &CFilterBarButtons::ps_buttonClicked); + connect(ui->tb_RemoveFilter, &QToolButton::clicked, this, &CFilterBarButtons::ps_buttonClicked); } CFilterBarButtons::~CFilterBarButtons() @@ -48,7 +48,7 @@ namespace BlackGui { QString v = QString::number(count); if (withFilter) { v += "F";} - this->ui->le_Count->setText(v); + ui->le_Count->setText(v); } void CFilterBarButtons::clickButton(CFilterBarButtons::FilterButton filterButton) @@ -56,13 +56,13 @@ namespace BlackGui switch (filterButton) { case ClearForm: - this->ui->tb_ClearForm->click(); + ui->tb_ClearForm->click(); break; case RemoveFilter: - this->ui->tb_RemoveFilter->click(); + ui->tb_RemoveFilter->click(); break; case Filter: - this->ui->tb_Filter->click(); + ui->tb_Filter->click(); break; default: break; diff --git a/src/blackgui/filters/liveryfilterbar.cpp b/src/blackgui/filters/liveryfilterbar.cpp index 6ef3fecf8..3e6a324d4 100644 --- a/src/blackgui/filters/liveryfilterbar.cpp +++ b/src/blackgui/filters/liveryfilterbar.cpp @@ -34,7 +34,7 @@ namespace BlackGui ui(new Ui::CLiveryFilterBar) { ui->setupUi(this); - this->setButtonsAndCount(this->ui->filter_Buttons); + this->setButtonsAndCount(ui->filter_Buttons); connect(ui->le_AirlineIcaoCode, &QLineEdit::returnPressed, this, &CFilterWidget::triggerFilter); connect(ui->le_Description, &QLineEdit::returnPressed, this, &CFilterWidget::triggerFilter); @@ -61,14 +61,14 @@ namespace BlackGui double maxColorDistance = ui->hs_ColorDistance->value() / 100.0; return std::unique_ptr( new CLiveryFilter( - this->ui->le_LiveryCode->text(), - this->ui->le_Description->text(), - this->ui->le_AirlineIcaoCode->text(), - this->ui->color_Fuselage->getColor(), - this->ui->color_Tail->getColor(), + ui->le_LiveryCode->text(), + ui->le_Description->text(), + ui->le_AirlineIcaoCode->text(), + ui->color_Fuselage->getColor(), + ui->color_Tail->getColor(), maxColorDistance, - this->ui->cb_Colors->isChecked(), - this->ui->cb_Airlines->isChecked() + ui->cb_Colors->isChecked(), + ui->cb_Airlines->isChecked() )); } @@ -76,22 +76,22 @@ namespace BlackGui { if (livery.hasCombinedCode()) { - this->ui->le_LiveryCode->setText(livery.getCombinedCode()); + ui->le_LiveryCode->setText(livery.getCombinedCode()); } else if (livery.hasValidAirlineDesignator()) { - this->ui->le_AirlineIcaoCode->setText(livery.getAirlineIcaoCodeDesignator()); + ui->le_AirlineIcaoCode->setText(livery.getAirlineIcaoCodeDesignator()); } else { return; } - this->ui->filter_Buttons->clickButton(CFilterBarButtons::Filter); + ui->filter_Buttons->clickButton(CFilterBarButtons::Filter); } void CLiveryFilterBar::onRowCountChanged(int count, bool withFilter) { - this->ui->filter_Buttons->onRowCountChanged(count, withFilter); + ui->filter_Buttons->onRowCountChanged(count, withFilter); } void CLiveryFilterBar::clearForm() diff --git a/src/blackgui/guiapplication.cpp b/src/blackgui/guiapplication.cpp index 3335edcfa..ff371da9b 100644 --- a/src/blackgui/guiapplication.cpp +++ b/src/blackgui/guiapplication.cpp @@ -178,7 +178,7 @@ namespace BlackGui mainWindow->setWindowTitle(name); mainWindow->setWindowIcon(m_windowIcon); mainWindow->setWindowIconText(name); - emit this->uiObjectTreeReady(); + emit uiObjectTreeReady(); } void CGuiApplication::setWindowIcon(const QPixmap &icon) diff --git a/src/blackgui/loginmodebuttons.cpp b/src/blackgui/loginmodebuttons.cpp index c0d694e20..b3cccb6c1 100644 --- a/src/blackgui/loginmodebuttons.cpp +++ b/src/blackgui/loginmodebuttons.cpp @@ -29,11 +29,11 @@ namespace BlackGui BlackCore::INetwork::LoginMode BlackGui::CLoginModeButtons::getLoginMode() const { INetwork::LoginMode mode = INetwork::LoginNormal; - if (this->ui->rb_LoginStealth->isChecked()) + if (ui->rb_LoginStealth->isChecked()) { mode = INetwork::LoginStealth; } - else if (this->ui->rb_LoginObserver->isChecked()) + else if (ui->rb_LoginObserver->isChecked()) { mode = INetwork::LoginAsObserver; } @@ -45,14 +45,14 @@ namespace BlackGui switch (mode) { case INetwork::LoginAsObserver: - this->ui->rb_LoginObserver->setChecked(true); + ui->rb_LoginObserver->setChecked(true); break; case INetwork::LoginStealth: - this->ui->rb_LoginStealth->setChecked(true); + ui->rb_LoginStealth->setChecked(true); break; default: case INetwork::LoginNormal: - this->ui->rb_LoginNormal->setChecked(true); + ui->rb_LoginNormal->setChecked(true); break; } } diff --git a/src/blackgui/overlaymessages.cpp b/src/blackgui/overlaymessages.cpp index 7ae2e6cf8..7e056d698 100644 --- a/src/blackgui/overlaymessages.cpp +++ b/src/blackgui/overlaymessages.cpp @@ -45,11 +45,11 @@ namespace BlackGui { this->init(w, h); connect(sGui, &CGuiApplication::styleSheetsChanged, this, &COverlayMessages::ps_onStyleSheetsChanged); - connect(this->ui->pb_Ok, &QPushButton::clicked, this, &COverlayMessages::ps_okClicked); - connect(this->ui->pb_Cancel, &QPushButton::clicked, this, &COverlayMessages::ps_cancelClicked); + connect(ui->pb_Ok, &QPushButton::clicked, this, &COverlayMessages::ps_okClicked); + connect(ui->pb_Cancel, &QPushButton::clicked, this, &COverlayMessages::ps_cancelClicked); - this->ui->tvp_StatusMessages->setResizeMode(CStatusMessageView::ResizingAuto); - this->ui->fr_Confirmation->setVisible(false); + ui->tvp_StatusMessages->setResizeMode(CStatusMessageView::ResizingAuto); + ui->fr_Confirmation->setVisible(false); this->setDefaultConfirmationButton(QMessageBox::Cancel); } @@ -66,8 +66,8 @@ namespace BlackGui ui->setupUi(this); resize(w, h); this->setAutoFillBackground(true); - this->ui->tvp_StatusMessages->setMode(CStatusMessageListModel::Simplified); - connect(this->ui->tb_Close, &QToolButton::released, this, &COverlayMessages::close); + ui->tvp_StatusMessages->setMode(CStatusMessageListModel::Simplified); + connect(ui->tb_Close, &QToolButton::released, this, &COverlayMessages::close); m_autoCloseTimer.setObjectName(objectName() + ":autoCloseTimer"); connect(&m_autoCloseTimer, &QTimer::timeout, this, &COverlayMessages::close); } @@ -117,7 +117,7 @@ namespace BlackGui { if (messages.isEmpty()) { return; } this->setModeToMessages(); - this->ui->tvp_StatusMessages->updateContainer(messages); + ui->tvp_StatusMessages->updateContainer(messages); this->display(timeOutMs); } @@ -127,12 +127,12 @@ namespace BlackGui if (this->useSmall()) { this->setModeToMessageSmall(); - this->ui->form_StatusMessageSmall->setValue(message); + ui->form_StatusMessageSmall->setValue(message); } else { this->setModeToMessage(); - this->ui->form_StatusMessage->setValue(message); + ui->form_StatusMessage->setValue(message); } this->display(timeOutMs); } @@ -143,10 +143,10 @@ namespace BlackGui this->setModeToTextMessage(); // message and display - this->ui->le_TmFrom->setText(textMessage.getSenderCallsign().asString()); - this->ui->le_TmTo->setText(textMessage.getRecipientCallsign().asString()); - this->ui->le_TmReceived->setText(textMessage.getFormattedUtcTimestampHms()); - this->ui->te_TmText->setText(textMessage.getMessage()); + ui->le_TmFrom->setText(textMessage.getSenderCallsign().asString()); + ui->le_TmTo->setText(textMessage.getRecipientCallsign().asString()); + ui->le_TmReceived->setText(textMessage.getFormattedUtcTimestampHms()); + ui->te_TmText->setText(textMessage.getMessage()); this->display(timeOutMs); } @@ -159,22 +159,22 @@ namespace BlackGui void COverlayMessages::showOverlayImage(const QPixmap &image, int timeOutMs) { this->setModeToImage(); - QSize sizeAvailable = this->ui->fr_StatusMessagesComponentsInner->size(); + QSize sizeAvailable = ui->fr_StatusMessagesComponentsInner->size(); if (sizeAvailable.width() < 300) { // first time inner frame is not giving correct size, workaround sizeAvailable = this->size() * 0.9; } - this->ui->lbl_Image->setText(""); + ui->lbl_Image->setText(""); if (image.isNull()) { static const QPixmap e; - this->ui->lbl_Image->setPixmap(e); + ui->lbl_Image->setPixmap(e); } else { - this->ui->lbl_Image->setPixmap( + ui->lbl_Image->setPixmap( image.scaled(sizeAvailable, Qt::KeepAspectRatio, Qt::FastTransformation) ); } @@ -208,31 +208,31 @@ namespace BlackGui void COverlayMessages::setModeToMessages() { - this->ui->sw_StatusMessagesComponent->setCurrentWidget(this->ui->pg_StatusMessages); + ui->sw_StatusMessagesComponent->setCurrentWidget(ui->pg_StatusMessages); this->setHeader("Messages"); } void COverlayMessages::setModeToMessage() { - this->ui->sw_StatusMessagesComponent->setCurrentWidget(this->ui->pg_StatusMessage); + ui->sw_StatusMessagesComponent->setCurrentWidget(ui->pg_StatusMessage); this->setHeader("Message"); } void COverlayMessages::setModeToMessageSmall() { - this->ui->sw_StatusMessagesComponent->setCurrentWidget(this->ui->pg_StatusMessageSmall); + ui->sw_StatusMessagesComponent->setCurrentWidget(ui->pg_StatusMessageSmall); this->setHeader("Message"); } void COverlayMessages::setModeToTextMessage() { - this->ui->sw_StatusMessagesComponent->setCurrentWidget(this->ui->pg_TextMessage); + ui->sw_StatusMessagesComponent->setCurrentWidget(ui->pg_TextMessage); this->setHeader("Text message"); } void COverlayMessages::setModeToImage() { - this->ui->sw_StatusMessagesComponent->setCurrentWidget(this->ui->pg_Image); + ui->sw_StatusMessagesComponent->setCurrentWidget(ui->pg_Image); this->setHeader("Image"); } @@ -240,12 +240,12 @@ namespace BlackGui { if (message.isEmpty()) { - this->ui->fr_Confirmation->setVisible(false); + ui->fr_Confirmation->setVisible(false); } else { - this->ui->fr_Confirmation->setVisible(true); - this->ui->lbl_Confirmation->setText(message); + ui->fr_Confirmation->setVisible(true); + ui->lbl_Confirmation->setText(message); } } @@ -262,20 +262,20 @@ namespace BlackGui switch (button) { case QMessageBox::Ok: - this->ui->pb_Cancel->setDefault(false); - this->ui->pb_Cancel->setAutoDefault(false); - this->ui->pb_Ok->setDefault(true); - this->ui->pb_Ok->setAutoDefault(true); + ui->pb_Cancel->setDefault(false); + ui->pb_Cancel->setAutoDefault(false); + ui->pb_Ok->setDefault(true); + ui->pb_Ok->setAutoDefault(true); this->m_lastConfirmation = QMessageBox::Ok; - this->ui->pb_Ok->setFocus(); + ui->pb_Ok->setFocus(); break; case QMessageBox::Cancel: - this->ui->pb_Ok->setDefault(false); - this->ui->pb_Ok->setAutoDefault(false); - this->ui->pb_Cancel->setDefault(true); - this->ui->pb_Cancel->setAutoDefault(true); + ui->pb_Ok->setDefault(false); + ui->pb_Ok->setAutoDefault(false); + ui->pb_Cancel->setDefault(true); + ui->pb_Cancel->setAutoDefault(true); this->m_lastConfirmation = QMessageBox::Cancel; - this->ui->pb_Cancel->setFocus(); + ui->pb_Cancel->setFocus(); break; default: break; @@ -300,7 +300,7 @@ namespace BlackGui { this->hide(); this->setEnabled(false); - this->ui->fr_Confirmation->setVisible(false); + ui->fr_Confirmation->setVisible(false); this->m_lastConfirmation = QMessageBox::Cancel; this->m_okLambda = nullptr; } diff --git a/src/blackgui/showhidebar.cpp b/src/blackgui/showhidebar.cpp index 38276f095..13e4da5a1 100644 --- a/src/blackgui/showhidebar.cpp +++ b/src/blackgui/showhidebar.cpp @@ -20,7 +20,7 @@ namespace BlackGui ui(new Ui::CShowHideBar) { ui->setupUi(this); - connect(this->ui->pb_ShowHidePushButton, &QPushButton::clicked, this, &CShowHideBar::toggleShowHide); + connect(ui->pb_ShowHidePushButton, &QPushButton::clicked, this, &CShowHideBar::toggleShowHide); } CShowHideBar::~CShowHideBar() @@ -28,6 +28,6 @@ namespace BlackGui bool CShowHideBar::isShown() const { - return this->ui->pb_ShowHidePushButton->isChecked(); + return ui->pb_ShowHidePushButton->isChecked(); } } // namespacee diff --git a/src/plugins/simulator/fsxconfig/simconnectsettingscomponent.cpp b/src/plugins/simulator/fsxconfig/simconnectsettingscomponent.cpp index 4a6093f55..bb7d44fe1 100644 --- a/src/plugins/simulator/fsxconfig/simconnectsettingscomponent.cpp +++ b/src/plugins/simulator/fsxconfig/simconnectsettingscomponent.cpp @@ -83,8 +83,8 @@ namespace BlackSimPlugin void CSimConnectSettingsComponent::testSimConnectConnection() { - QString address = this->ui->le_SettingsFsxAddress->text().trimmed(); - QString port = this->ui->le_SettingsFsxPort->text().trimmed(); + QString address = ui->le_SettingsFsxAddress->text().trimmed(); + QString port = ui->le_SettingsFsxPort->text().trimmed(); if (address.isEmpty() || port.isEmpty()) { diff --git a/src/swiftcore/swiftcore.cpp b/src/swiftcore/swiftcore.cpp index 074ff4c31..0fc448730 100644 --- a/src/swiftcore/swiftcore.cpp +++ b/src/swiftcore/swiftcore.cpp @@ -46,7 +46,7 @@ CSwiftCore::CSwiftCore(QWidget *parent) : setSystemTrayMode(MinimizeToTray | QuitOnClose); setSystemTrayToolTip(name); - this->m_mwaLogComponent = this->ui->comp_InfoArea->getLogComponent(); + this->m_mwaLogComponent = ui->comp_InfoArea->getLogComponent(); this->m_mwaOverlayFrame = nullptr; this->m_mwaStatusBar = nullptr; @@ -75,16 +75,16 @@ void CSwiftCore::initDBusMode() const QString dBusAddress(sGui->getCmdDBusAddressValue()); if (dBusAddress.startsWith(CDBusServer::sessionBusAddress())) { - this->ui->rb_SessionBus->setChecked(true); + ui->rb_SessionBus->setChecked(true); } else if (dBusAddress.startsWith(CDBusServer::systemBusAddress())) { - this->ui->rb_SystemBus->setChecked(true); + ui->rb_SystemBus->setChecked(true); } else { - this->ui->rb_P2PBus->setChecked(true); - this->ui->le_P2PAddress->setText(dBusAddress); + ui->rb_P2PBus->setChecked(true); + ui->le_P2PAddress->setText(dBusAddress); } } diff --git a/src/swiftdata/swiftdata.cpp b/src/swiftdata/swiftdata.cpp index 770df4fd4..3efffd94f 100644 --- a/src/swiftdata/swiftdata.cpp +++ b/src/swiftdata/swiftdata.cpp @@ -88,9 +88,9 @@ void CSwiftData::init() sGui->initMainApplicationWindow(this); this->initLogDisplay(); - this->m_mwaLogComponent = this->ui->comp_MainInfoArea->getLogComponent(); + this->m_mwaLogComponent = ui->comp_MainInfoArea->getLogComponent(); this->m_mwaStatusBar = &this->m_statusBar; - this->m_mwaOverlayFrame = this->ui->comp_MainInfoArea->getMappingComponent(); + this->m_mwaOverlayFrame = ui->comp_MainInfoArea->getMappingComponent(); this->initStyleSheet(); connect(sGui, &CGuiApplication::styleSheetsChanged, this, &CSwiftData::ps_onStyleSheetsChanged); @@ -111,7 +111,7 @@ void CSwiftData::init() void CSwiftData::initLogDisplay() { - this->m_statusBar.initStatusBar(this->ui->sb_SwiftData); + this->m_statusBar.initStatusBar(ui->sb_SwiftData); CLogHandler::instance()->install(true); CLogHandler::instance()->enableConsoleOutput(false); // default disable @@ -126,16 +126,16 @@ void CSwiftData::initMenu() // menu this->initDynamicMenus(); - this->ui->menu_WindowMinimize->setIcon(this->style()->standardIcon(QStyle::SP_TitleBarMinButton)); + ui->menu_WindowMinimize->setIcon(this->style()->standardIcon(QStyle::SP_TitleBarMinButton)); - connect(this->ui->menu_WindowFont, &QAction::triggered, this, &CSwiftData::ps_onMenuClicked); - connect(this->ui->menu_MappingMaxData, &QAction::triggered, this, &CSwiftData::ps_onMenuClicked); - connect(this->ui->menu_MappingMaxMapping, &QAction::triggered, this, &CSwiftData::ps_onMenuClicked); + connect(ui->menu_WindowFont, &QAction::triggered, this, &CSwiftData::ps_onMenuClicked); + connect(ui->menu_MappingMaxData, &QAction::triggered, this, &CSwiftData::ps_onMenuClicked); + connect(ui->menu_MappingMaxMapping, &QAction::triggered, this, &CSwiftData::ps_onMenuClicked); - sGui->addMenuFile(*this->ui->menu_File); - sGui->addMenuInternals(*this->ui->menu_Internals); - sGui->addMenuWindow(*this->ui->menu_Window); - sGui->addMenuHelp(*this->ui->menu_Help); + sGui->addMenuFile(*ui->menu_File); + sGui->addMenuInternals(*ui->menu_Internals); + sGui->addMenuWindow(*ui->menu_Window); + sGui->addMenuHelp(*ui->menu_Help); } void CSwiftData::performGracefulShutdown() @@ -145,10 +145,10 @@ void CSwiftData::performGracefulShutdown() void CSwiftData::displayConsole() { - this->ui->comp_MainInfoArea->displayConsole(); + ui->comp_MainInfoArea->displayConsole(); } void CSwiftData::displayLog() { - this->ui->comp_MainInfoArea->displayLog(); + ui->comp_MainInfoArea->displayLog(); } diff --git a/src/swiftdata/swiftdatamenus.cpp b/src/swiftdata/swiftdatamenus.cpp index f497c18e4..8968a7d58 100644 --- a/src/swiftdata/swiftdatamenus.cpp +++ b/src/swiftdata/swiftdatamenus.cpp @@ -33,39 +33,39 @@ using namespace BlackMisc; void CSwiftData::ps_onMenuClicked() { QObject *sender = QObject::sender(); - if (sender == this->ui->menu_WindowFont) + if (sender == ui->menu_WindowFont) { // this->ps_setMainPageToInfoArea(); - // this->ui->comp_MainInfoArea->selectSettingsTab(BlackGui::Components::CSettingsComponent::SettingTabGui); + // ui->comp_MainInfoArea->selectSettingsTab(BlackGui::Components::CSettingsComponent::SettingTabGui); } - else if (sender == this->ui->menu_MappingMaxData) + else if (sender == ui->menu_MappingMaxData) { - CDbMappingComponent *mappingComponent = this->ui->comp_MainInfoArea->getMappingComponent(); + CDbMappingComponent *mappingComponent = ui->comp_MainInfoArea->getMappingComponent(); mappingComponent->resizeForSelect(); } - else if (sender == this->ui->menu_MappingMaxMapping) + else if (sender == ui->menu_MappingMaxMapping) { - CDbMappingComponent *mappingComponent = this->ui->comp_MainInfoArea->getMappingComponent(); + CDbMappingComponent *mappingComponent = ui->comp_MainInfoArea->getMappingComponent(); mappingComponent->resizeForMapping(); } } void CSwiftData::initDynamicMenus() { - Q_ASSERT_X(this->ui->menu_InfoAreas, Q_FUNC_INFO, "missing info areas"); - Q_ASSERT_X(this->ui->comp_MainInfoArea, Q_FUNC_INFO, "missing main area"); - this->ui->menu_InfoAreas->addActions(this->ui->comp_MainInfoArea->getInfoAreaSelectActions(this->ui->menu_InfoAreas)); + Q_ASSERT_X(ui->menu_InfoAreas, Q_FUNC_INFO, "missing info areas"); + Q_ASSERT_X(ui->comp_MainInfoArea, Q_FUNC_INFO, "missing main area"); + ui->menu_InfoAreas->addActions(ui->comp_MainInfoArea->getInfoAreaSelectActions(ui->menu_InfoAreas)); QString resourceDir(CBuildConfig::getSwiftResourceDir()); if (!resourceDir.isEmpty() && QDir(resourceDir).exists()) { - Q_ASSERT_X(this->ui->comp_MainInfoArea, Q_FUNC_INFO, "Missing main info area"); - Q_ASSERT_X(this->ui->comp_MainInfoArea->getDataInfoAreaComponent(), Q_FUNC_INFO, "Missing DB info area"); - this->ui->menu_Mapping->addAction(CIcons::database16(), "Load all DB data", this->ui->comp_MainInfoArea->getDataInfoAreaComponent(), SLOT(requestUpdateOfAllDbData())); - this->ui->menu_Mapping->addAction(CIcons::load16(), "Load DB test data from disk", this->ui->comp_MainInfoArea->getDataInfoAreaComponent(), SLOT(readDbDataFromResourceDir())); + Q_ASSERT_X(ui->comp_MainInfoArea, Q_FUNC_INFO, "Missing main info area"); + Q_ASSERT_X(ui->comp_MainInfoArea->getDataInfoAreaComponent(), Q_FUNC_INFO, "Missing DB info area"); + ui->menu_Mapping->addAction(CIcons::database16(), "Load all DB data", ui->comp_MainInfoArea->getDataInfoAreaComponent(), SLOT(requestUpdateOfAllDbData())); + ui->menu_Mapping->addAction(CIcons::load16(), "Load DB test data from disk", ui->comp_MainInfoArea->getDataInfoAreaComponent(), SLOT(readDbDataFromResourceDir())); if (sGui->isRunningInDeveloperEnvironment()) { - this->ui->menu_Mapping->addAction(CIcons::save16(), "Save DB test data to disk", this->ui->comp_MainInfoArea->getDataInfoAreaComponent(), SLOT(writeDbDataToResourceDir())); + ui->menu_Mapping->addAction(CIcons::save16(), "Save DB test data to disk", ui->comp_MainInfoArea->getDataInfoAreaComponent(), SLOT(writeDbDataToResourceDir())); } } } diff --git a/src/swiftguistandard/swiftguistd.cpp b/src/swiftguistandard/swiftguistd.cpp index 081c924a8..537c8ef74 100644 --- a/src/swiftguistandard/swiftguistd.cpp +++ b/src/swiftguistandard/swiftguistd.cpp @@ -113,7 +113,7 @@ void SwiftGuiStd::performGracefulShutdown() } // clean up GUI - this->ui->comp_MainInfoArea->dockAllWidgets(); + ui->comp_MainInfoArea->dockAllWidgets(); // allow some other parts to react if (!sGui) { return; } // overall shutdown @@ -186,27 +186,27 @@ QAction *SwiftGuiStd::getToggleStayOnTopAction(QObject *parent) void SwiftGuiStd::ps_setMainPage(SwiftGuiStd::MainPageIndex mainPage) { - this->ui->sw_MainMiddle->setCurrentIndex(mainPage); + ui->sw_MainMiddle->setCurrentIndex(mainPage); } void SwiftGuiStd::ps_setMainPageInfoArea(CMainInfoAreaComponent::InfoArea infoArea) { this->ps_setMainPageToInfoArea(); - this->ui->comp_MainInfoArea->selectArea(infoArea); + ui->comp_MainInfoArea->selectArea(infoArea); } bool SwiftGuiStd::isMainPageSelected(SwiftGuiStd::MainPageIndex mainPage) const { - return this->ui->sw_MainMiddle->currentIndex() == static_cast(mainPage); + return ui->sw_MainMiddle->currentIndex() == static_cast(mainPage); } void SwiftGuiStd::ps_loginRequested() { - if (this->ui->sw_MainMiddle->currentIndex() == static_cast(MainPageLogin)) + if (ui->sw_MainMiddle->currentIndex() == static_cast(MainPageLogin)) { // already main page, we fake a re-trigger here - emit this->currentMainInfoAreaChanged(this->ui->sw_MainMiddle->currentWidget()); + emit this->currentMainInfoAreaChanged(ui->sw_MainMiddle->currentWidget()); } else { @@ -237,15 +237,15 @@ void SwiftGuiStd::ps_displayStatusMessageInGui(const CStatusMessage &statusMessa this->m_statusBar.displayStatusMessage(statusMessage); // main info areas - this->ui->comp_MainInfoArea->displayStatusMessage(statusMessage); + ui->comp_MainInfoArea->displayStatusMessage(statusMessage); // list - this->ui->comp_MainInfoArea->getLogComponent()->appendStatusMessageToList(statusMessage); + ui->comp_MainInfoArea->getLogComponent()->appendStatusMessageToList(statusMessage); // display overlay for errors, but not for validation if (statusMessage.getSeverity() == CStatusMessage::SeverityError && ! statusMessage.getCategories().contains(CLogCategory::validation())) { - this->ui->fr_CentralFrameInside->showOverlayMessage(statusMessage); + ui->fr_CentralFrameInside->showOverlayMessage(statusMessage); } } @@ -323,12 +323,12 @@ void SwiftGuiStd::updateGuiStatusInformation() { bool dbus = !sGui->getIContextNetwork()->isUsingImplementingObject(); network = dbus ? now : "local"; - this->ui->comp_InfoBarStatus->setDBusStatus(dbus); + ui->comp_InfoBarStatus->setDBusStatus(dbus); } // update status fields QString s = QString("network: %1").arg(network); - this->ui->comp_InfoBarStatus->setDBusTooltip(s); + ui->comp_InfoBarStatus->setDBusTooltip(s); } void SwiftGuiStd::ps_onChangedWindowOpacity(int opacity) @@ -337,7 +337,7 @@ void SwiftGuiStd::ps_onChangedWindowOpacity(int opacity) o = o < 0.3 ? 0.3 : o; o = o > 1.0 ? 1.0 : o; QWidget::setWindowOpacity(o); - this->ui->comp_MainInfoArea->getSettingsComponent()->setGuiOpacity(o * 100.0); + ui->comp_MainInfoArea->getSettingsComponent()->setGuiOpacity(o * 100.0); } void SwiftGuiStd::ps_toogleWindowStayOnTop() @@ -364,7 +364,7 @@ void SwiftGuiStd::ps_onStyleSheetsChanged() void SwiftGuiStd::ps_onCurrentMainWidgetChanged(int currentIndex) { - emit currentMainInfoAreaChanged(this->ui->sw_MainMiddle->currentWidget()); + emit currentMainInfoAreaChanged(ui->sw_MainMiddle->currentWidget()); Q_UNUSED(currentIndex); } @@ -387,16 +387,16 @@ void SwiftGuiStd::ps_showNormal() void SwiftGuiStd::playNotifcationSound(CNotificationSounds::Notification notification) const { if (!this->m_contextAudioAvailable) { return; } - if (!this->ui->comp_MainInfoArea->getSettingsComponent()->playNotificationSounds()) { return; } + if (!ui->comp_MainInfoArea->getSettingsComponent()->playNotificationSounds()) { return; } sGui->getIContextAudio()->playNotification(notification, true); } void SwiftGuiStd::displayConsole() { - this->ui->comp_MainInfoArea->displayConsole(); + ui->comp_MainInfoArea->displayConsole(); } void SwiftGuiStd::displayLog() { - this->ui->comp_MainInfoArea->displayLog(); + ui->comp_MainInfoArea->displayLog(); } diff --git a/src/swiftguistandard/swiftguistdinit.cpp b/src/swiftguistandard/swiftguistdinit.cpp index e3f2ca85e..4cce75a81 100644 --- a/src/swiftguistandard/swiftguistdinit.cpp +++ b/src/swiftguistandard/swiftguistdinit.cpp @@ -63,8 +63,8 @@ void SwiftGuiStd::init() this->setVisible(false); // hide all, so no flashing windows during init this->m_mwaStatusBar = &this->m_statusBar; - this->m_mwaOverlayFrame = this->ui->fr_CentralFrameInside; - this->m_mwaLogComponent = this->ui->comp_MainInfoArea->getLogComponent(); + this->m_mwaOverlayFrame = ui->fr_CentralFrameInside; + this->m_mwaLogComponent = ui->comp_MainInfoArea->getLogComponent(); sGui->initMainApplicationWindow(this); @@ -79,19 +79,19 @@ void SwiftGuiStd::init() if (this->isFrameless()) { // wrap menu in layout, add button to menu bar and insert on top - QHBoxLayout *menuBarLayout = this->addFramelessCloseButton(this->ui->mb_MainMenuBar); - this->ui->vl_CentralWidgetOutside->insertLayout(0, menuBarLayout, 0); + QHBoxLayout *menuBarLayout = this->addFramelessCloseButton(ui->mb_MainMenuBar); + ui->vl_CentralWidgetOutside->insertLayout(0, menuBarLayout, 0); // now insert the dock widget info bar into the widget - this->ui->vl_CentralWidgetOutside->insertWidget(1, this->ui->dw_InfoBarStatus); + ui->vl_CentralWidgetOutside->insertWidget(1, ui->dw_InfoBarStatus); // move the status bar into the frame // (otherwise it is dangling outside the frame as it belongs to the window) - this->ui->sb_MainStatusBar->setParent(this->ui->wi_CentralWidgetOutside); - this->ui->vl_CentralWidgetOutside->addWidget(this->ui->sb_MainStatusBar, 0); + ui->sb_MainStatusBar->setParent(ui->wi_CentralWidgetOutside); + ui->vl_CentralWidgetOutside->addWidget(ui->sb_MainStatusBar, 0); // grip - this->addFramelessSizeGripToStatusBar(this->ui->sb_MainStatusBar); + this->addFramelessSizeGripToStatusBar(ui->sb_MainStatusBar); } // timers @@ -102,13 +102,13 @@ void SwiftGuiStd::init() } // info bar and status bar - this->m_statusBar.initStatusBar(this->ui->sb_MainStatusBar); - this->ui->dw_InfoBarStatus->allowStatusBar(false); - this->ui->dw_InfoBarStatus->setPreferredSizeWhenFloating(this->ui->dw_InfoBarStatus->size()); // set floating size + this->m_statusBar.initStatusBar(ui->sb_MainStatusBar); + ui->dw_InfoBarStatus->allowStatusBar(false); + ui->dw_InfoBarStatus->setPreferredSizeWhenFloating(ui->dw_InfoBarStatus->size()); // set floating size // navigator this->m_navigator->addAction(this->getToggleWindowVisibilityAction(this->m_navigator.data())); - this->m_navigator->addActions(this->ui->comp_MainInfoArea->getInfoAreaToggleFloatingActions(this->m_navigator.data())); + this->m_navigator->addActions(ui->comp_MainInfoArea->getInfoAreaToggleFloatingActions(this->m_navigator.data())); this->m_navigator->addAction(this->getWindowNormalAction(this->m_navigator.data())); this->m_navigator->addAction(this->getWindowMinimizeAction(this->m_navigator.data())); this->m_navigator->addAction(this->getToggleStayOnTopAction(this->m_navigator.data())); @@ -120,8 +120,8 @@ void SwiftGuiStd::init() // signal / slots contexts / timers connect(sGui->getIContextNetwork(), &IContextNetwork::connectionTerminated, this, &SwiftGuiStd::ps_onConnectionTerminated); connect(sGui->getIContextNetwork(), &IContextNetwork::connectionStatusChanged, this, &SwiftGuiStd::ps_onConnectionStatusChanged); - connect(sGui->getIContextNetwork(), &IContextNetwork::textMessagesReceived, this->ui->comp_MainInfoArea->getTextMessageComponent(), &CTextMessageComponent::onTextMessageReceived); - connect(sGui->getIContextNetwork(), &IContextNetwork::textMessageSent, this->ui->comp_MainInfoArea->getTextMessageComponent(), &CTextMessageComponent::onTextMessageSent); + connect(sGui->getIContextNetwork(), &IContextNetwork::textMessagesReceived, ui->comp_MainInfoArea->getTextMessageComponent(), &CTextMessageComponent::onTextMessageReceived); + connect(sGui->getIContextNetwork(), &IContextNetwork::textMessageSent, ui->comp_MainInfoArea->getTextMessageComponent(), &CTextMessageComponent::onTextMessageSent); connect(this->m_timerContextWatchdog, &QTimer::timeout, this, &SwiftGuiStd::ps_handleTimerBasedUpdates); // start timers, update timers will be started when network is connected @@ -138,8 +138,8 @@ void SwiftGuiStd::init() this->initMenus(); // info - this->ui->comp_MainInfoArea->getLogComponent()->appendPlainTextToConsole(sGui->swiftVersionString()); - this->ui->comp_MainInfoArea->getLogComponent()->appendPlainTextToConsole(CBuildConfig::compiledWithInfo()); + ui->comp_MainInfoArea->getLogComponent()->appendPlainTextToConsole(sGui->swiftVersionString()); + ui->comp_MainInfoArea->getLogComponent()->appendPlainTextToConsole(CBuildConfig::compiledWithInfo()); // update timers this->startUpdateTimersWhenConnected(); @@ -175,59 +175,59 @@ void SwiftGuiStd::initGuiSignals() // This is why we still have some "old" SIGNAL/SLOT connections here // main window - connect(this->ui->sw_MainMiddle, &QStackedWidget::currentChanged, this, &SwiftGuiStd::ps_onCurrentMainWidgetChanged); + connect(ui->sw_MainMiddle, &QStackedWidget::currentChanged, this, &SwiftGuiStd::ps_onCurrentMainWidgetChanged); // main keypad - connect(this->ui->comp_MainKeypadArea, &CMainKeypadAreaComponent::selectedMainInfoAreaDockWidget, this, &SwiftGuiStd::ps_setMainPageInfoArea); - connect(this->ui->comp_MainKeypadArea, &CMainKeypadAreaComponent::connectPressed, this, &SwiftGuiStd::ps_loginRequested); - connect(this->ui->comp_MainKeypadArea, &CMainKeypadAreaComponent::changedOpacity, this , &SwiftGuiStd::ps_onChangedWindowOpacity); - connect(this->ui->comp_MainKeypadArea, &CMainKeypadAreaComponent::identPressed, this->ui->comp_MainInfoArea->getCockpitComponent(), &CCockpitComponent::setSelectedTransponderModeStateIdent); - connect(this->ui->comp_MainKeypadArea, &CMainKeypadAreaComponent::commandEntered, this->ui->comp_MainInfoArea->getTextMessageComponent(), &CTextMessageComponent::handleGlobalCommandLine); - connect(this->ui->comp_MainInfoArea, &CMainInfoAreaComponent::changedInfoAreaStatus, ui->comp_MainKeypadArea, &CMainKeypadAreaComponent::onMainInfoAreaChanged); + connect(ui->comp_MainKeypadArea, &CMainKeypadAreaComponent::selectedMainInfoAreaDockWidget, this, &SwiftGuiStd::ps_setMainPageInfoArea); + connect(ui->comp_MainKeypadArea, &CMainKeypadAreaComponent::connectPressed, this, &SwiftGuiStd::ps_loginRequested); + connect(ui->comp_MainKeypadArea, &CMainKeypadAreaComponent::changedOpacity, this , &SwiftGuiStd::ps_onChangedWindowOpacity); + connect(ui->comp_MainKeypadArea, &CMainKeypadAreaComponent::identPressed, ui->comp_MainInfoArea->getCockpitComponent(), &CCockpitComponent::setSelectedTransponderModeStateIdent); + connect(ui->comp_MainKeypadArea, &CMainKeypadAreaComponent::commandEntered, ui->comp_MainInfoArea->getTextMessageComponent(), &CTextMessageComponent::handleGlobalCommandLine); + connect(ui->comp_MainInfoArea, &CMainInfoAreaComponent::changedInfoAreaStatus, ui->comp_MainKeypadArea, &CMainKeypadAreaComponent::onMainInfoAreaChanged); // menu - connect(this->ui->menu_TestLocationsEDDF, &QAction::triggered, this, &SwiftGuiStd::ps_onMenuClicked); - connect(this->ui->menu_TestLocationsEDDM, &QAction::triggered, this, &SwiftGuiStd::ps_onMenuClicked); - connect(this->ui->menu_TestLocationsEDNX, &QAction::triggered, this, &SwiftGuiStd::ps_onMenuClicked); - connect(this->ui->menu_TestLocationsEDRY, &QAction::triggered, this, &SwiftGuiStd::ps_onMenuClicked); - connect(this->ui->menu_TestLocationsLOWW, &QAction::triggered, this, &SwiftGuiStd::ps_onMenuClicked); + connect(ui->menu_TestLocationsEDDF, &QAction::triggered, this, &SwiftGuiStd::ps_onMenuClicked); + connect(ui->menu_TestLocationsEDDM, &QAction::triggered, this, &SwiftGuiStd::ps_onMenuClicked); + connect(ui->menu_TestLocationsEDNX, &QAction::triggered, this, &SwiftGuiStd::ps_onMenuClicked); + connect(ui->menu_TestLocationsEDRY, &QAction::triggered, this, &SwiftGuiStd::ps_onMenuClicked); + connect(ui->menu_TestLocationsLOWW, &QAction::triggered, this, &SwiftGuiStd::ps_onMenuClicked); - connect(this->ui->menu_WindowFont, &QAction::triggered, this, &SwiftGuiStd::ps_onMenuClicked); - connect(this->ui->menu_WindowMinimize, &QAction::triggered, this, &SwiftGuiStd::ps_onMenuClicked); - connect(this->ui->menu_WindowToggleOnTop, &QAction::triggered, this, &SwiftGuiStd::ps_onMenuClicked); - connect(this->ui->menu_WindowToggleNavigator, &QAction::triggered, this->m_navigator.data(), &CNavigatorDialog::toggleNavigator); - connect(this->ui->menu_InternalsPage, &QAction::triggered, this, &SwiftGuiStd::ps_onMenuClicked); + connect(ui->menu_WindowFont, &QAction::triggered, this, &SwiftGuiStd::ps_onMenuClicked); + connect(ui->menu_WindowMinimize, &QAction::triggered, this, &SwiftGuiStd::ps_onMenuClicked); + connect(ui->menu_WindowToggleOnTop, &QAction::triggered, this, &SwiftGuiStd::ps_onMenuClicked); + connect(ui->menu_WindowToggleNavigator, &QAction::triggered, this->m_navigator.data(), &CNavigatorDialog::toggleNavigator); + connect(ui->menu_InternalsPage, &QAction::triggered, this, &SwiftGuiStd::ps_onMenuClicked); // command line / text messages - connect(this->ui->comp_MainInfoArea->getTextMessageComponent(), &CTextMessageComponent::displayInInfoWindow, this->ui->fr_CentralFrameInside, &COverlayMessagesFrame::showOverlayVariant); + connect(ui->comp_MainInfoArea->getTextMessageComponent(), &CTextMessageComponent::displayInInfoWindow, ui->fr_CentralFrameInside, &COverlayMessagesFrame::showOverlayVariant); // settings (GUI component), styles - connect(this->ui->comp_MainInfoArea->getSettingsComponent(), &CSettingsComponent::changedWindowsOpacity, this, &SwiftGuiStd::ps_onChangedWindowOpacity); + connect(ui->comp_MainInfoArea->getSettingsComponent(), &CSettingsComponent::changedWindowsOpacity, this, &SwiftGuiStd::ps_onChangedWindowOpacity); connect(sGui, &CGuiApplication::styleSheetsChanged, this, &SwiftGuiStd::ps_onStyleSheetsChanged); // sliders - connect(this->ui->comp_MainInfoArea->getSettingsComponent(), &CSettingsComponent::changedUsersUpdateInterval, this->ui->comp_MainInfoArea->getUserComponent(), &CUserComponent::setUpdateIntervalSeconds); - connect(this->ui->comp_MainInfoArea->getSettingsComponent(), &CSettingsComponent::changedAircraftUpdateInterval, this->ui->comp_MainInfoArea->getAircraftComponent(), &CAircraftComponent::setUpdateIntervalSeconds); - connect(this->ui->comp_MainInfoArea->getSettingsComponent(), &CSettingsComponent::changedAtcStationsUpdateInterval, this->ui->comp_MainInfoArea->getAtcStationComponent(), &::CAtcStationComponent::setUpdateIntervalSeconds); + connect(ui->comp_MainInfoArea->getSettingsComponent(), &CSettingsComponent::changedUsersUpdateInterval, ui->comp_MainInfoArea->getUserComponent(), &CUserComponent::setUpdateIntervalSeconds); + connect(ui->comp_MainInfoArea->getSettingsComponent(), &CSettingsComponent::changedAircraftUpdateInterval, ui->comp_MainInfoArea->getAircraftComponent(), &CAircraftComponent::setUpdateIntervalSeconds); + connect(ui->comp_MainInfoArea->getSettingsComponent(), &CSettingsComponent::changedAtcStationsUpdateInterval, ui->comp_MainInfoArea->getAtcStationComponent(), &::CAtcStationComponent::setUpdateIntervalSeconds); // login - connect(this->ui->comp_Login, &CLoginComponent::loginOrLogoffCancelled, this, &SwiftGuiStd::ps_setMainPageToInfoArea); - connect(this->ui->comp_Login, &CLoginComponent::loginOrLogoffSuccessful, this, &SwiftGuiStd::ps_setMainPageToInfoArea); - connect(this->ui->comp_Login, &CLoginComponent::loginOrLogoffSuccessful, this->ui->comp_MainInfoArea->getFlightPlanComponent(), &CFlightPlanComponent::loginDataSet); - connect(this, &SwiftGuiStd::currentMainInfoAreaChanged, this->ui->comp_Login, &CLoginComponent::mainInfoAreaChanged); - connect(this->ui->comp_Login, &CLoginComponent::requestNetworkSettings, this->ui->comp_MainInfoArea->getFlightPlanComponent(), [ = ]() + connect(ui->comp_Login, &CLoginComponent::loginOrLogoffCancelled, this, &SwiftGuiStd::ps_setMainPageToInfoArea); + connect(ui->comp_Login, &CLoginComponent::loginOrLogoffSuccessful, this, &SwiftGuiStd::ps_setMainPageToInfoArea); + connect(ui->comp_Login, &CLoginComponent::loginOrLogoffSuccessful, ui->comp_MainInfoArea->getFlightPlanComponent(), &CFlightPlanComponent::loginDataSet); + connect(this, &SwiftGuiStd::currentMainInfoAreaChanged, ui->comp_Login, &CLoginComponent::mainInfoAreaChanged); + connect(ui->comp_Login, &CLoginComponent::requestNetworkSettings, ui->comp_MainInfoArea->getFlightPlanComponent(), [ = ]() { this->ps_setMainPageInfoArea(CMainInfoAreaComponent::InfoAreaSettings); - this->ui->comp_MainInfoArea->getSettingsComponent()->setSettingsTab(CSettingsComponent::SettingTabNetworkServers); + ui->comp_MainInfoArea->getSettingsComponent()->setSettingsTab(CSettingsComponent::SettingTabNetworkServers); }); // text messages - connect(this->ui->comp_MainInfoArea->getAtcStationComponent(), &CAtcStationComponent::requestTextMessageWidget, this->ui->comp_MainInfoArea->getTextMessageComponent(), &CTextMessageComponent::showCorrespondingTab); - connect(this->ui->comp_MainInfoArea->getMappingComponet(), &CMappingComponent::requestTextMessageWidget, this->ui->comp_MainInfoArea->getTextMessageComponent(), &CTextMessageComponent::showCorrespondingTab); - connect(this->ui->comp_MainInfoArea->getAircraftComponent(), &CAircraftComponent::requestTextMessageWidget, this->ui->comp_MainInfoArea->getTextMessageComponent(), &CTextMessageComponent::showCorrespondingTab); + connect(ui->comp_MainInfoArea->getAtcStationComponent(), &CAtcStationComponent::requestTextMessageWidget, ui->comp_MainInfoArea->getTextMessageComponent(), &CTextMessageComponent::showCorrespondingTab); + connect(ui->comp_MainInfoArea->getMappingComponet(), &CMappingComponent::requestTextMessageWidget, ui->comp_MainInfoArea->getTextMessageComponent(), &CTextMessageComponent::showCorrespondingTab); + connect(ui->comp_MainInfoArea->getAircraftComponent(), &CAircraftComponent::requestTextMessageWidget, ui->comp_MainInfoArea->getTextMessageComponent(), &CTextMessageComponent::showCorrespondingTab); // main info area - connect(this->ui->comp_MainInfoArea, &CMainInfoAreaComponent::changedWholeInfoAreaFloating, this, &SwiftGuiStd::ps_onChangedMainInfoAreaFloating); + connect(ui->comp_MainInfoArea, &CMainInfoAreaComponent::changedWholeInfoAreaFloating, this, &SwiftGuiStd::ps_onChangedMainInfoAreaFloating); } void SwiftGuiStd::initialDataReads() @@ -245,16 +245,16 @@ void SwiftGuiStd::initialDataReads() void SwiftGuiStd::startUpdateTimersWhenConnected() { - this->ui->comp_MainInfoArea->getAtcStationComponent()->setUpdateIntervalSeconds(this->ui->comp_MainInfoArea->getSettingsComponent()->getAtcUpdateIntervalSeconds()); - this->ui->comp_MainInfoArea->getAircraftComponent()->setUpdateIntervalSeconds(this->ui->comp_MainInfoArea->getSettingsComponent()->getAircraftUpdateIntervalSeconds()); - this->ui->comp_MainInfoArea->getUserComponent()->setUpdateIntervalSeconds(this->ui->comp_MainInfoArea->getSettingsComponent()->getUsersUpdateIntervalSeconds()); + ui->comp_MainInfoArea->getAtcStationComponent()->setUpdateIntervalSeconds(ui->comp_MainInfoArea->getSettingsComponent()->getAtcUpdateIntervalSeconds()); + ui->comp_MainInfoArea->getAircraftComponent()->setUpdateIntervalSeconds(ui->comp_MainInfoArea->getSettingsComponent()->getAircraftUpdateIntervalSeconds()); + ui->comp_MainInfoArea->getUserComponent()->setUpdateIntervalSeconds(ui->comp_MainInfoArea->getSettingsComponent()->getUsersUpdateIntervalSeconds()); } void SwiftGuiStd::stopUpdateTimersWhenDisconnected() { - this->ui->comp_MainInfoArea->getAtcStationComponent()->stopTimer(); - this->ui->comp_MainInfoArea->getAircraftComponent()->stopTimer(); - this->ui->comp_MainInfoArea->getUserComponent()->stopTimer(); + ui->comp_MainInfoArea->getAtcStationComponent()->stopTimer(); + ui->comp_MainInfoArea->getAircraftComponent()->stopTimer(); + ui->comp_MainInfoArea->getUserComponent()->stopTimer(); } void SwiftGuiStd::stopAllTimers(bool disconnectSignalSlots) diff --git a/src/swiftguistandard/swiftguistdmenus.cpp b/src/swiftguistandard/swiftguistdmenus.cpp index b1a61b1f3..f354c5f62 100644 --- a/src/swiftguistandard/swiftguistdmenus.cpp +++ b/src/swiftguistandard/swiftguistdmenus.cpp @@ -34,44 +34,44 @@ using namespace BlackMisc::Aviation; void SwiftGuiStd::ps_onMenuClicked() { QObject *sender = QObject::sender(); - if (sender == this->ui->menu_TestLocationsEDRY) + if (sender == ui->menu_TestLocationsEDRY) { this->setTestPosition("N 049° 18' 17", "E 008° 27' 05", CAltitude(312, CAltitude::MeanSeaLevel, CLengthUnit::ft())); } - else if (sender == this->ui->menu_TestLocationsEDNX) + else if (sender == ui->menu_TestLocationsEDNX) { this->setTestPosition("N 048° 14′ 22", "E 011° 33′ 41", CAltitude(486, CAltitude::MeanSeaLevel, CLengthUnit::m())); } - else if (sender == this->ui->menu_TestLocationsEDDM) + else if (sender == ui->menu_TestLocationsEDDM) { this->setTestPosition("N 048° 21′ 14", "E 011° 47′ 10", CAltitude(448, CAltitude::MeanSeaLevel, CLengthUnit::m())); } - else if (sender == this->ui->menu_TestLocationsEDDF) + else if (sender == ui->menu_TestLocationsEDDF) { this->setTestPosition("N 50° 2′ 0", "E 8° 34′ 14", CAltitude(100, CAltitude::MeanSeaLevel, CLengthUnit::m())); } - else if (sender == this->ui->menu_TestLocationsLOWW) + else if (sender == ui->menu_TestLocationsLOWW) { this->setTestPosition("N 48° 7′ 6.3588", "E 16° 33′ 39.924", CAltitude(100, CAltitude::MeanSeaLevel, CLengthUnit::m())); } - else if (sender == this->ui->menu_WindowFont) + else if (sender == ui->menu_WindowFont) { this->ps_setMainPageToInfoArea(); - this->ui->comp_MainInfoArea->selectSettingsTab(BlackGui::Components::CSettingsComponent::SettingTabGui); + ui->comp_MainInfoArea->selectSettingsTab(BlackGui::Components::CSettingsComponent::SettingTabGui); } - else if (sender == this->ui->menu_InternalsPage) + else if (sender == ui->menu_InternalsPage) { - this->ui->sw_MainMiddle->setCurrentIndex(MainPageInternals); + ui->sw_MainMiddle->setCurrentIndex(MainPageInternals); } } void SwiftGuiStd::initMenus() { - Q_ASSERT(this->ui->menu_InfoAreas); - Q_ASSERT(this->ui->comp_MainInfoArea); - sGui->addMenuFile(*this->ui->menu_File); - sGui->addMenuInternals(*this->ui->menu_Internals); - sGui->addMenuWindow(*this->ui->menu_Window); - sGui->addMenuHelp(*this->ui->menu_Help); - this->ui->menu_InfoAreas->addActions(this->ui->comp_MainInfoArea->getInfoAreaSelectActions(this->ui->menu_InfoAreas)); + Q_ASSERT(ui->menu_InfoAreas); + Q_ASSERT(ui->comp_MainInfoArea); + sGui->addMenuFile(*ui->menu_File); + sGui->addMenuInternals(*ui->menu_Internals); + sGui->addMenuWindow(*ui->menu_Window); + sGui->addMenuHelp(*ui->menu_Help); + ui->menu_InfoAreas->addActions(ui->comp_MainInfoArea->getInfoAreaSelectActions(ui->menu_InfoAreas)); } diff --git a/src/swiftlauncher/swiftlauncher.cpp b/src/swiftlauncher/swiftlauncher.cpp index d62361a19..3aad6a590 100644 --- a/src/swiftlauncher/swiftlauncher.cpp +++ b/src/swiftlauncher/swiftlauncher.cpp @@ -53,7 +53,7 @@ CSwiftLauncher::CSwiftLauncher(QWidget *parent) : connect(sGui, &CApplication::updateInfoAvailable, this, &CSwiftLauncher::ps_loadedUpdateInfo); new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_L), this, SLOT(ps_showLogPage())); - this->ui->le_DBusServerPort->setValidator(new QIntValidator(0, 65535, this)); + ui->le_DBusServerPort->setValidator(new QIntValidator(0, 65535, this)); // default from settings const QString dbus(this->m_dbusServerAddress.getThreadLocal()); @@ -86,11 +86,11 @@ CoreModes::CoreMode CSwiftLauncher::getCoreMode() const QString CSwiftLauncher::getDBusAddress() const { - if (this->ui->rb_DBusSession->isChecked()) { return CDBusServer::sessionBusAddress(); } - if (this->ui->rb_DBusSystem->isChecked()) { return CDBusServer::systemBusAddress(); } + if (ui->rb_DBusSession->isChecked()) { return CDBusServer::sessionBusAddress(); } + if (ui->rb_DBusSystem->isChecked()) { return CDBusServer::systemBusAddress(); } return CDBusServer::p2pAddress( - this->ui->cb_DBusServerAddress->currentText() + ":" + - this->ui->le_DBusServerPort->text() + ui->cb_DBusServerAddress->currentText() + ":" + + ui->le_DBusServerPort->text() ); } @@ -105,7 +105,7 @@ void CSwiftLauncher::ps_displayLatestNews(QNetworkReply *reply) if (nwReply->error() == QNetworkReply::NoError) { const QString html = nwReply->readAll().trimmed(); - this->ui->te_LatestNews->setHtml(html); + ui->te_LatestNews->setHtml(html); } } @@ -118,16 +118,16 @@ void CSwiftLauncher::init() { sGui->initMainApplicationWindow(this); - this->m_mwaOverlayFrame = this->ui->fr_SwiftLauncherMain; + this->m_mwaOverlayFrame = ui->fr_SwiftLauncherMain; this->m_mwaStatusBar = nullptr; - this->m_mwaLogComponent = this->ui->fr_SwiftLauncherLog; + this->m_mwaLogComponent = ui->fr_SwiftLauncherLog; - this->ui->lbl_NewVersionUrl->setTextFormat(Qt::RichText); - this->ui->lbl_NewVersionUrl->setTextInteractionFlags(Qt::TextBrowserInteraction); - this->ui->lbl_NewVersionUrl->setOpenExternalLinks(true); + ui->lbl_NewVersionUrl->setTextFormat(Qt::RichText); + ui->lbl_NewVersionUrl->setTextInteractionFlags(Qt::TextBrowserInteraction); + ui->lbl_NewVersionUrl->setOpenExternalLinks(true); - this->ui->wi_NewVersionAvailable->setVisible(false); - this->ui->wi_NoNewVersion->setVisible(true); + ui->wi_NewVersionAvailable->setVisible(false); + ui->wi_NoNewVersion->setVisible(true); this->initStyleSheet(); this->initLogDisplay(); @@ -157,9 +157,9 @@ void CSwiftLauncher::loadLatestNews() void CSwiftLauncher::initDBusGui() { - this->ui->cb_DBusServerAddress->addItem("127.0.0.1"); - this->ui->cb_DBusServerAddress->addItems(CNetworkUtils::getKnownIpAddresses()); - this->ui->cb_DBusServerAddress->setCurrentIndex(0); + ui->cb_DBusServerAddress->addItem("127.0.0.1"); + ui->cb_DBusServerAddress->addItems(CNetworkUtils::getKnownIpAddresses()); + ui->cb_DBusServerAddress->setCurrentIndex(0); connect(ui->cb_DBusServerAddress, &QComboBox::currentTextChanged, this, &CSwiftLauncher::ps_dbusServerAddressSelectionChanged); connect(ui->rb_DBusP2P, &QRadioButton::clicked, this, &CSwiftLauncher::ps_dbusServerModeSelected); @@ -169,7 +169,7 @@ void CSwiftLauncher::initDBusGui() void CSwiftLauncher::initVersion() { - this->ui->le_CurrentVersion->setText(sGui->versionStringDevBetaInfo()); + ui->le_CurrentVersion->setText(sGui->versionStringDevBetaInfo()); } void CSwiftLauncher::initLogDisplay() @@ -192,7 +192,7 @@ void CSwiftLauncher::startSwiftCore() "--dbus", dBus }); - if (this->ui->rb_SwiftCoreAudio->isChecked()) + if (ui->rb_SwiftCoreAudio->isChecked()) { args.append("--coreaudio"); } @@ -260,7 +260,7 @@ bool CSwiftLauncher::canConnectDBusServer(QString &msg) const bool CSwiftLauncher::isStandaloneGuiSelected() const { - return this->ui->rb_SwiftStandalone->isChecked(); + return ui->rb_SwiftStandalone->isChecked(); } void CSwiftLauncher::setDefault(const QString &value) @@ -268,15 +268,15 @@ void CSwiftLauncher::setDefault(const QString &value) QString v(value.toLower().trimmed()); if (v.isEmpty() || v.startsWith("session")) { - this->ui->rb_DBusSession->setChecked(true); + ui->rb_DBusSession->setChecked(true); } else if (v.startsWith("sys")) { - this->ui->rb_DBusSystem->setChecked(true); + ui->rb_DBusSystem->setChecked(true); } else { - this->ui->rb_DBusP2P->setChecked(true); + ui->rb_DBusP2P->setChecked(true); } } @@ -293,9 +293,9 @@ QString CSwiftLauncher::toCmdLine(const QString &exe, const QStringList &exeArgs void CSwiftLauncher::ps_loadSetup() { - if (!this->ui->le_LatestVersion->text().isEmpty()) + if (!ui->le_LatestVersion->text().isEmpty()) { - this->ui->le_LatestVersion->setText(""); + ui->le_LatestVersion->setText(""); const CStatusMessageList msgs(sApp->requestReloadOfSetupAndVersion()); this->ps_appendLogMessages(msgs); } @@ -313,17 +313,17 @@ void CSwiftLauncher::ps_loadedUpdateInfo(bool success) const QString latestVersion(updateInfo.getLatestVersion()) ; // need to get this from somewhere CFailoverUrlList downloadUrls(updateInfo.getDownloadUrls()); bool newVersionAvailable = CVersion::isNewerVersion(latestVersion) && !downloadUrls.isEmpty(); - this->ui->wi_NewVersionAvailable->setVisible(newVersionAvailable); - this->ui->wi_NoNewVersion->setVisible(!newVersionAvailable); - this->ui->le_LatestVersion->setText(latestVersion); - this->ui->le_Channel->setText(updateInfo.getChannel()); + ui->wi_NewVersionAvailable->setVisible(newVersionAvailable); + ui->wi_NoNewVersion->setVisible(!newVersionAvailable); + ui->le_LatestVersion->setText(latestVersion); + ui->le_Channel->setText(updateInfo.getChannel()); if (!downloadUrls.isEmpty()) { const CUrl downloadUrl(downloadUrls.obtainNextUrl()); const QString urlStr(downloadUrl.toQString()); QString hl("%2 %3"); - this->ui->lbl_NewVersionUrl->setText(hl.arg(urlStr).arg(urlStr).arg(latestVersion)); + ui->lbl_NewVersionUrl->setText(hl.arg(urlStr).arg(urlStr).arg(latestVersion)); } this->loadLatestNews(); @@ -337,24 +337,24 @@ void CSwiftLauncher::ps_changedUpdateInfoCache() void CSwiftLauncher::ps_startButtonPressed() { QObject *sender = QObject::sender(); - if (sender == this->ui->tb_SwiftGui) + if (sender == ui->tb_SwiftGui) { if (this->setSwiftGuiExecutable()) { this->accept(); } } - else if (sender == this->ui->tb_SwiftData) + else if (sender == ui->tb_SwiftData) { this->setSwiftDataExecutable(); this->accept(); } - else if (sender == this->ui->tb_SwiftCore) + else if (sender == ui->tb_SwiftCore) { - if (this->isStandaloneGuiSelected()) { this->ui->rb_SwiftCoreGuiAudio->setChecked(true); } + if (this->isStandaloneGuiSelected()) { ui->rb_SwiftCoreGuiAudio->setChecked(true); } this->startSwiftCore(); } - else if (sender == this->ui->tb_Database) + else if (sender == ui->tb_Database) { const CUrl homePage(sApp->getGlobalSetup().getDbHomePageUrl()); QDesktopServices::openUrl(homePage); @@ -366,21 +366,21 @@ void CSwiftLauncher::ps_dbusServerAddressSelectionChanged(const QString ¤t Q_UNUSED(currentText); if (this->isStandaloneGuiSelected()) { - this->ui->rb_SwiftCoreGuiAudio->setChecked(true); + ui->rb_SwiftCoreGuiAudio->setChecked(true); } - this->ui->rb_DBusP2P->setChecked(true); + ui->rb_DBusP2P->setChecked(true); } void CSwiftLauncher::ps_dbusServerModeSelected(bool selected) { if (!selected) { return; } if (!this->isStandaloneGuiSelected()) { return; } - this->ui->rb_SwiftCoreGuiAudio->setChecked(true); + ui->rb_SwiftCoreGuiAudio->setChecked(true); } void CSwiftLauncher::ps_showStatusMessage(const CStatusMessage &msg) { - this->ui->fr_SwiftLauncherMain->showOverlayMessage(msg, 5000); + ui->fr_SwiftLauncherMain->showOverlayMessage(msg, 5000); } void CSwiftLauncher::ps_appendLogMessage(const CStatusMessage &message) @@ -403,7 +403,7 @@ void CSwiftLauncher::ps_appendLogMessages(const CStatusMessageList &messages) void CSwiftLauncher::ps_showMainPage() { - this->ui->sw_SwiftLauncher->setCurrentWidget(this->ui->pg_SwiftLauncherMain); + ui->sw_SwiftLauncher->setCurrentWidget(ui->pg_SwiftLauncherMain); } void CSwiftLauncher::ps_tabChanged(int current) @@ -416,5 +416,5 @@ void CSwiftLauncher::ps_tabChanged(int current) void CSwiftLauncher::ps_showLogPage() { - this->ui->sw_SwiftLauncher->setCurrentWidget(this->ui->pg_SwiftLauncherLog); + ui->sw_SwiftLauncher->setCurrentWidget(ui->pg_SwiftLauncherLog); }