Formatting

This commit is contained in:
Klaus Basan
2014-11-05 16:36:43 +01:00
committed by Roland Winklmeier
parent 016537f257
commit 9a920367b2
14 changed files with 69 additions and 27 deletions

View File

@@ -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"

View File

@@ -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 <QDBusConnection>
@@ -227,6 +231,9 @@ namespace BlackCore
return this->m_dBusInterface->callDBusRet<bool>(QLatin1Literal("isMuted"));
}
/*
* Loopback
*/
void CContextAudioProxy::enableAudioLoopback(bool enable)
{
return this->m_dBusInterface->callDBus(QLatin1Literal("enableAudioLoopback"), enable);

View File

@@ -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"

View File

@@ -7,6 +7,8 @@
* contained in the LICENSE file.
*/
//! \file
#ifndef BLACKCORE_VOICE_CHANNEL_H
#define BLACKCORE_VOICE_CHANNEL_H

View File

@@ -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)

View File

@@ -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()

View File

@@ -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;
}

View File

@@ -33,7 +33,7 @@ namespace BlackGui
//! Constructor
explicit CInfoBarStatusComponent(QWidget *parent = nullptr);
//!Constructor
//!Destructor
~CInfoBarStatusComponent();
//! Init the LEDs

View File

@@ -118,8 +118,9 @@ namespace BlackGui
}
}
void CDockWidget::initalFloating()
void CDockWidget::initialFloating()
{
// for the first time resize
if (!this->m_preferredSizeWhenFloating.isNull())
{

View File

@@ -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

View File

@@ -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<CEnableForDockWidgetInfoArea *> infoAreaDockWidgets = this->findEmbeddedDockWidgetInfoAreaComponents();
foreach(CEnableForDockWidgetInfoArea * dwia, infoAreaDockWidgets)
{

View File

@@ -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

View File

@@ -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;

View File

@@ -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<int>(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<int>(CIcons::NotSet);}
bool isSet() const { return (this->m_index != static_cast<int>(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