diff --git a/src/blackcore/context_audio.cpp b/src/blackcore/context_audio.cpp index 6711d56d9..09127ccea 100644 --- a/src/blackcore/context_audio.cpp +++ b/src/blackcore/context_audio.cpp @@ -1,7 +1,11 @@ -/* Copyright (C) 2013 VATSIM Community / contributors - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +/* Copyright (C) 2013 + * swift Project Community / Contributors + * + * This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level + * directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project, + * including this file, may be copied, modified, propagated, or distributed except according to the terms + * contained in the LICENSE file. + */ #include "context_audio.h" #include "context_audio_impl.h" diff --git a/src/blackcore/context_audio_proxy.cpp b/src/blackcore/context_audio_proxy.cpp index 4cb3880f9..d707b20eb 100644 --- a/src/blackcore/context_audio_proxy.cpp +++ b/src/blackcore/context_audio_proxy.cpp @@ -1,7 +1,11 @@ -/* Copyright (C) 2013 VATSIM Community / authors - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +/* Copyright (C) 2013 + * swift Project Community / Contributors + * + * This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level + * directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project, + * including this file, may be copied, modified, propagated, or distributed except according to the terms + * contained in the LICENSE file. + */ #include "context_audio_proxy.h" #include @@ -227,6 +231,9 @@ namespace BlackCore return this->m_dBusInterface->callDBusRet(QLatin1Literal("isMuted")); } + /* + * Loopback + */ void CContextAudioProxy::enableAudioLoopback(bool enable) { return this->m_dBusInterface->callDBus(QLatin1Literal("enableAudioLoopback"), enable); diff --git a/src/blackcore/context_ownaircraft_impl.cpp b/src/blackcore/context_ownaircraft_impl.cpp index 8c90bd65a..a03839a4e 100644 --- a/src/blackcore/context_ownaircraft_impl.cpp +++ b/src/blackcore/context_ownaircraft_impl.cpp @@ -1,7 +1,11 @@ -/* Copyright (C) 2013 VATSIM Community / authors - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +/* Copyright (C) 2014 + * swift project community / contributors + * + * This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level + * directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project, + * including this file, may be copied, modified, propagated, or distributed except according to the terms + * contained in the LICENSE file. + */ #include "context_ownaircraft_impl.h" #include "context_network.h" diff --git a/src/blackcore/voice_channel.h b/src/blackcore/voice_channel.h index 20e9d4992..cea769abe 100644 --- a/src/blackcore/voice_channel.h +++ b/src/blackcore/voice_channel.h @@ -7,6 +7,8 @@ * contained in the LICENSE file. */ +//! \file + #ifndef BLACKCORE_VOICE_CHANNEL_H #define BLACKCORE_VOICE_CHANNEL_H diff --git a/src/blackgui/components/aircraftcomponent.cpp b/src/blackgui/components/aircraftcomponent.cpp index 72dfbfddb..e6e541b18 100644 --- a/src/blackgui/components/aircraftcomponent.cpp +++ b/src/blackgui/components/aircraftcomponent.cpp @@ -85,7 +85,7 @@ namespace BlackGui void CAircraftComponent::runtimeHasBeenSet() { - connect(this->getParentInfoArea(), &CInfoArea::tabBarCurrentChanged, this, &CAircraftComponent::ps_infoAreaTabBarChanged); + connect(this->getParentInfoArea(), &CInfoArea::changedInfoAreaTabBarIndex, this, &CAircraftComponent::ps_infoAreaTabBarChanged); } void CAircraftComponent::ps_infoAreaTabBarChanged(int index) diff --git a/src/blackgui/components/atcstationcomponent.cpp b/src/blackgui/components/atcstationcomponent.cpp index c0a3bca5f..9445e0140 100644 --- a/src/blackgui/components/atcstationcomponent.cpp +++ b/src/blackgui/components/atcstationcomponent.cpp @@ -90,7 +90,7 @@ namespace BlackGui this->connect(this->getIContextNetwork(), &IContextNetwork::changedAtcStationOnlineConnectionStatus, this, &CAtcStationComponent::changedAtcStationOnlineConnectionStatus); this->connect(this->getIContextNetwork(), &IContextNetwork::connectionStatusChanged, this, &CAtcStationComponent::ps_connectionStatusChanged); } - connect(this->getParentInfoArea(), &CInfoArea::tabBarCurrentChanged, this, &CAtcStationComponent::ps_infoAreaTabBarChanged); + connect(this->getParentInfoArea(), &CInfoArea::changedInfoAreaTabBarIndex, this, &CAtcStationComponent::ps_infoAreaTabBarChanged); } void CAtcStationComponent::update() diff --git a/src/blackgui/components/flightplancomponent.cpp b/src/blackgui/components/flightplancomponent.cpp index 9018c1af2..5d2d8e357 100644 --- a/src/blackgui/components/flightplancomponent.cpp +++ b/src/blackgui/components/flightplancomponent.cpp @@ -108,9 +108,13 @@ namespace BlackGui CFlightPlan::FlightRules rule = CFlightPlan::IFR; if (this->ui->rb_TypeIfr->isChecked()) + { rule = CFlightPlan::IFR; + } else if (this->ui->rb_TypeVfr->isChecked()) + { rule = CFlightPlan::VFR; + } flightPlan.setFlightRule(rule); v = ui->le_Callsign->text().trimmed(); @@ -129,7 +133,9 @@ namespace BlackGui messages.push_back(CLogMessage().validationWarning("Flight plan route length exceeded (%1 chars max.)") << CFlightPlan::MaxRouteLength); } else + { flightPlan.setRoute(v); + } v = ui->pte_Remarks->toPlainText().trimmed(); if (v.isEmpty()) @@ -141,7 +147,9 @@ namespace BlackGui messages.push_back(CLogMessage().validationWarning("Flight plan remarks length exceeded (%1 chars max.)") << CFlightPlan::MaxRemarksLength); } else + { flightPlan.setRemarks(v); + } v = ui->le_EstimatedTimeEnroute->text(); if (v.isEmpty() || v == defaultTime()) @@ -149,7 +157,9 @@ namespace BlackGui messages.push_back(CLogMessage().validationWarning("Missing %1") << this->ui->lbl_EstimatedTimeEnroute->text()); } else + { flightPlan.setEnrouteTime(v); + } v = ui->le_FuelOnBoard->text(); if (v.isEmpty() || v == defaultTime()) @@ -157,7 +167,9 @@ namespace BlackGui messages.push_back(CLogMessage().validationWarning("Missing %1") << this->ui->lbl_FuelOnBorad->text()); } else + { flightPlan.setFuelTime(v); + } v = ui->le_TakeOffTimePlanned->text(); if (v.isEmpty() || v == defaultTime()) @@ -165,7 +177,9 @@ namespace BlackGui messages.push_back(CLogMessage().validationWarning("Missing %1") << this->ui->lbl_TakeOffTimePlanned->text()); } else + { flightPlan.setTakeoffTimePlanned(v); + } static const QRegExp withUnit("\\D+"); v = ui->le_CrusingAltitude->text().trimmed(); @@ -181,7 +195,9 @@ namespace BlackGui messages.push_back(CLogMessage().validationWarning("Wrong %1") << this->ui->lbl_CrusingAltitude->text()); } else + { flightPlan.setCruiseAltitude(cruisingAltitude); + } v = this->ui->le_AlternateAirport->text(); if (v.isEmpty() || v.endsWith(defaultIcao(), Qt::CaseInsensitive)) @@ -190,7 +206,9 @@ namespace BlackGui flightPlan.setAlternateAirportIcao(defaultIcao()); } else + { flightPlan.setAlternateAirportIcao(v); + } v = this->ui->le_DestinationAirport->text(); if (v.isEmpty() || v.endsWith(defaultIcao(), Qt::CaseInsensitive)) @@ -199,7 +217,9 @@ namespace BlackGui flightPlan.setDestinationAirportIcao(defaultIcao()); } else + { flightPlan.setDestinationAirportIcao(v); + } v = this->ui->le_CruiseTrueAirspeed->text(); BlackMisc::PhysicalQuantities::CSpeed cruiseTAS; @@ -210,7 +230,9 @@ namespace BlackGui flightPlan.setDestinationAirportIcao(defaultIcao()); } else + { flightPlan.setCruiseTrueAirspeed(cruiseTAS); + } v = this->ui->le_OriginAirport->text(); if (v.isEmpty() || v.endsWith(defaultIcao(), Qt::CaseInsensitive)) @@ -219,7 +241,9 @@ namespace BlackGui flightPlan.setOriginAirportIcao(defaultIcao()); } else + { flightPlan.setOriginAirportIcao(v); + } return messages; } diff --git a/src/blackgui/components/infobarstatuscomponent.h b/src/blackgui/components/infobarstatuscomponent.h index c01d63ab8..f814a9747 100644 --- a/src/blackgui/components/infobarstatuscomponent.h +++ b/src/blackgui/components/infobarstatuscomponent.h @@ -33,7 +33,7 @@ namespace BlackGui //! Constructor explicit CInfoBarStatusComponent(QWidget *parent = nullptr); - //!Constructor + //!Destructor ~CInfoBarStatusComponent(); //! Init the LEDs diff --git a/src/blackgui/dockwidget.cpp b/src/blackgui/dockwidget.cpp index f4387b52d..56e5bc8aa 100644 --- a/src/blackgui/dockwidget.cpp +++ b/src/blackgui/dockwidget.cpp @@ -118,8 +118,9 @@ namespace BlackGui } } - void CDockWidget::initalFloating() + void CDockWidget::initialFloating() { + // for the first time resize if (!this->m_preferredSizeWhenFloating.isNull()) { diff --git a/src/blackgui/dockwidget.h b/src/blackgui/dockwidget.h index 33a3e2c38..80390c379 100644 --- a/src/blackgui/dockwidget.h +++ b/src/blackgui/dockwidget.h @@ -113,7 +113,7 @@ namespace BlackGui //! Widget is initialized by being a floating window for a shot period. //! \details Place where - when overidden - post initializations can take place. //! The GUI is already initialized, so all widget data are available. - virtual void initalFloating(); + virtual void initialFloating(); protected slots: //! Style sheet has changed diff --git a/src/blackgui/dockwidgetinfoarea.cpp b/src/blackgui/dockwidgetinfoarea.cpp index 510da36b8..ee3730d7b 100644 --- a/src/blackgui/dockwidgetinfoarea.cpp +++ b/src/blackgui/dockwidgetinfoarea.cpp @@ -90,9 +90,9 @@ namespace BlackGui } } - void CDockWidgetInfoArea::initalFloating() + void CDockWidgetInfoArea::initialFloating() { - CDockWidget::initalFloating(); // initial floating to init position & size + CDockWidget::initialFloating(); // initial floating to init position & size QList infoAreaDockWidgets = this->findEmbeddedDockWidgetInfoAreaComponents(); foreach(CEnableForDockWidgetInfoArea * dwia, infoAreaDockWidgets) { diff --git a/src/blackgui/dockwidgetinfoarea.h b/src/blackgui/dockwidgetinfoarea.h index 12e3f664b..7fb0d62f4 100644 --- a/src/blackgui/dockwidgetinfoarea.h +++ b/src/blackgui/dockwidgetinfoarea.h @@ -48,7 +48,7 @@ namespace BlackGui virtual void addToContextMenu(QMenu *contextMenu) const override; //! \copydoc CDockWidget::initalFloating - virtual void initalFloating() override; + virtual void initialFloating() override; private: //! Find all embedded dock widget components. These are components marked as CDockWidgetInfoAreaComponent diff --git a/src/blackmisc/blackmiscfreefunctions.cpp b/src/blackmisc/blackmiscfreefunctions.cpp index 0e0fc550d..84b106c8f 100644 --- a/src/blackmisc/blackmiscfreefunctions.cpp +++ b/src/blackmisc/blackmiscfreefunctions.cpp @@ -483,13 +483,13 @@ const QString &BlackMisc::localHostName() */ const QString &BlackMisc::localHostNameEnvVariable() { - static const QString hostName = - QProcessEnvironment::systemEnvironment().value("COMPUTERNAME", - QProcessEnvironment::systemEnvironment().value("HOSTNAME")); + static const QString hostName = QProcessEnvironment::systemEnvironment().value("COMPUTERNAME", QProcessEnvironment::systemEnvironment().value("HOSTNAME")); return hostName; } - +/* + * Window mixer + */ bool BlackMisc::Audio::startWindowsMixer() { QStringList parameterlist; diff --git a/src/blackmisc/icon.h b/src/blackmisc/icon.h index 42708680f..74170128d 100644 --- a/src/blackmisc/icon.h +++ b/src/blackmisc/icon.h @@ -27,7 +27,7 @@ namespace BlackMisc CIcon() = default; //! Constructor. - CIcon( CIcons::IconIndex index, const QString &descriptiveText) : + CIcon(CIcons::IconIndex index, const QString &descriptiveText) : m_index(static_cast(index)), m_descriptiveText(descriptiveText) {} //! Get descriptive text @@ -40,7 +40,7 @@ namespace BlackMisc QPixmap toPixmap() const; //! Icon set? - bool isSet() const { return this->m_index != static_cast(CIcons::NotSet);} + bool isSet() const { return (this->m_index != static_cast(CIcons::NotSet));} //! Rotate by n degrees void setRotation(int degrees) { this->m_rotateDegrees = degrees; } @@ -52,7 +52,7 @@ namespace BlackMisc void setDescriptiveText(const QString &text) { this->m_descriptiveText = text; } //! Implicit conversion - operator QPixmap () const { return this->toPixmap(); } + operator QPixmap() const { return this->toPixmap(); } protected: //! \copydoc CValueObject::convertToQString