mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 12:55:33 +08:00
Fixed typo, style
This commit is contained in:
committed by
Mat Sutcliffe
parent
f95df7455b
commit
16e19ad6d3
@@ -569,6 +569,7 @@ namespace BlackCore
|
||||
if (CSimpleCommandParser::registered("BlackCore::ISimulator")) { return; }
|
||||
CSimpleCommandParser::registerCommand({".drv", "alias: .driver .plugin"});
|
||||
CSimpleCommandParser::registerCommand({".drv unload", "unload driver"});
|
||||
CSimpleCommandParser::registerCommand({".drv cg length modelstring", "override CG"});
|
||||
CSimpleCommandParser::registerCommand({".drv limit number/secs.", "limit updates to number per second (0..off)"});
|
||||
CSimpleCommandParser::registerCommand({".drv logint callsign", "log interpolator for callsign"});
|
||||
CSimpleCommandParser::registerCommand({".drv logint off", "no log information for interpolator"});
|
||||
|
||||
@@ -258,7 +258,7 @@ namespace BlackCore
|
||||
//! \addtogroup swiftdotcommands
|
||||
//! @{
|
||||
//! <pre>
|
||||
//! .drv cg modelstring set overridden CG for model string BlackCore::ISimulator
|
||||
//! .drv cg length modelstring set overridden CG for model string BlackCore::ISimulator
|
||||
//! .drv unload unload plugin BlackCore::ISimulator
|
||||
//! .drv limit number limit the number of updates BlackCore::ISimulator
|
||||
//! .drv logint callsign log interpolator for callsign BlackCore::ISimulator
|
||||
|
||||
@@ -32,8 +32,8 @@ namespace BlackGui
|
||||
connect(ui->le_CombinedType, &QLineEdit::returnPressed, this, &CAircraftCombinedTypeSelector::combinedTypeEntered);
|
||||
|
||||
connect(ui->cb_EngineCount, &QComboBox::currentTextChanged, this, &CAircraftCombinedTypeSelector::changedComboBox);
|
||||
connect(ui->cb_EngineType, &QComboBox::currentTextChanged, this, &CAircraftCombinedTypeSelector::changedComboBox);
|
||||
connect(ui->cb_Type, &QComboBox::currentTextChanged, this, &CAircraftCombinedTypeSelector::changedComboBox);
|
||||
connect(ui->cb_EngineType, &QComboBox::currentTextChanged, this, &CAircraftCombinedTypeSelector::changedComboBox);
|
||||
connect(ui->cb_Type, &QComboBox::currentTextChanged, this, &CAircraftCombinedTypeSelector::changedComboBox);
|
||||
|
||||
ui->le_CombinedType->setValidator(new CUpperCaseValidator(this));
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace BlackGui
|
||||
|
||||
void CAircraftModelSetValidationDialog::validatedModelSet(const CSimulatorInfo &simulator, const CAircraftModelList &valid, const CAircraftModelList &invalid, bool stopped, const CStatusMessageList &msgs)
|
||||
{
|
||||
if (!sGui) { return; }
|
||||
if (!sGui || sGui->isShuttingDown()) { return; }
|
||||
ui->comp_AircraftModelValidation->validatedModelSet(simulator, valid, invalid, stopped, msgs);
|
||||
this->setWindowTitle(QStringLiteral("Model validation for '%1'").arg(simulator.toQString(true)));
|
||||
CGuiApplication::modalWindowToFront();
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace BlackGui
|
||||
explicit CAutoPublishComponent(QWidget *parent = nullptr);
|
||||
|
||||
//! Destructor
|
||||
virtual ~CAutoPublishComponent();
|
||||
virtual ~CAutoPublishComponent() override;
|
||||
|
||||
//! Read the files
|
||||
int readFiles();
|
||||
@@ -61,4 +61,5 @@ namespace BlackGui
|
||||
};
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
#endif // guard
|
||||
|
||||
@@ -2,14 +2,6 @@
|
||||
<ui version="4.0">
|
||||
<class>CLoginComponent</class>
|
||||
<widget class="QFrame" name="CLoginComponent">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>329</width>
|
||||
<height>745</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Login component</string>
|
||||
</property>
|
||||
|
||||
@@ -101,7 +101,7 @@ namespace BlackGui
|
||||
BlackCore::CPluginManagerSimulator *m_plugins = nullptr;
|
||||
BlackMisc::CSetting<BlackCore::Application::TEnabledSimulators> m_enabledSimulators { this, &CSettingsSimulatorComponent::reloadPluginConfig };
|
||||
};
|
||||
}
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
#endif // guard
|
||||
|
||||
@@ -105,7 +105,7 @@ namespace BlackGui
|
||||
//! Toggle visibility
|
||||
void toggleVisibility();
|
||||
|
||||
//! Toggle frameless mode (EXPERIMENTAL)
|
||||
//! Toggle frameless mode
|
||||
void toggleFrameless();
|
||||
|
||||
//! Window always on top
|
||||
|
||||
@@ -60,9 +60,9 @@ namespace BlackGui
|
||||
|
||||
void CEnableForFramelessWindow::setFrameless(bool frameless)
|
||||
{
|
||||
WindowMode nonFrameLessMode = m_originalWindowMode;
|
||||
WindowMode nonFrameLessMode = m_originalWindowMode; // Tool/Normal Window
|
||||
if (nonFrameLessMode == WindowFrameless) { nonFrameLessMode = WindowNormal; }
|
||||
setMode(frameless ? WindowFrameless : nonFrameLessMode);
|
||||
this->setMode(frameless ? WindowFrameless : nonFrameLessMode);
|
||||
}
|
||||
|
||||
void CEnableForFramelessWindow::alwaysOnTop(bool onTop)
|
||||
@@ -121,7 +121,7 @@ namespace BlackGui
|
||||
Q_ASSERT_X(m_widget, "CEnableForFramelessWindow::setWindowAttributes", "Missing widget representing window");
|
||||
Q_ASSERT_X(!m_framelessPropertyName.isEmpty(), "CEnableForFramelessWindow::setWindowAttributes", "Missing property name");
|
||||
|
||||
bool frameless = (mode == WindowFrameless);
|
||||
const bool frameless = (mode == WindowFrameless);
|
||||
|
||||
// http://stackoverflow.com/questions/18316710/frameless-and-transparent-window-qt5
|
||||
// https://bugreports.qt.io/browse/QTBUG-52206
|
||||
@@ -130,7 +130,7 @@ namespace BlackGui
|
||||
{
|
||||
m_widget->setAttribute(Qt::WA_NativeWindow);
|
||||
|
||||
// causeing a BLACK background
|
||||
// causing a BLACK background
|
||||
m_widget->setAttribute(Qt::WA_NoSystemBackground, frameless);
|
||||
m_widget->setAttribute(Qt::WA_TranslucentBackground, frameless); // causing QTBUG-52206
|
||||
}
|
||||
|
||||
@@ -130,13 +130,13 @@ namespace BlackMisc
|
||||
CAltitude switchedUnit(const PhysicalQuantities::CLengthUnit &newUnit) const;
|
||||
|
||||
//! AGL Above ground level?
|
||||
bool isAboveGroundLevel() const { return AboveGround == this->m_datum; }
|
||||
bool isAboveGroundLevel() const { return AboveGround == m_datum; }
|
||||
|
||||
//! MSL Mean sea level?
|
||||
bool isMeanSeaLevel() const { return MeanSeaLevel == this->m_datum; }
|
||||
bool isMeanSeaLevel() const { return MeanSeaLevel == m_datum; }
|
||||
|
||||
//! Flight level?
|
||||
bool isFlightLevel() const { return FlightLevel == this->m_datum; }
|
||||
bool isFlightLevel() const { return FlightLevel == m_datum; }
|
||||
|
||||
//! Get reference datum (MSL or AGL)
|
||||
ReferenceDatum getReferenceDatum() const { return m_datum; }
|
||||
|
||||
@@ -134,7 +134,7 @@ namespace BlackMisc
|
||||
{
|
||||
static const CLogCategoryList cats(CLogCategoryList(this).withValidation());
|
||||
CStatusMessageList msgs;
|
||||
if (!hasValidDbKey()) { msgs.push_back(CStatusMessage(cats, CStatusMessage::SeverityError, u"Distributor: missing id")); }
|
||||
if (!hasValidDbKey()) { msgs.push_back(CStatusMessage(cats, CStatusMessage::SeverityError, u"Distributor: missing id")); }
|
||||
if (!hasDescription()) { msgs.push_back(CStatusMessage(cats, CStatusMessage::SeverityError, u"Distributor: missing description")); }
|
||||
return msgs;
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ QAction *SwiftGuiStd::getToggleStayOnTopAction(QObject *parent)
|
||||
{
|
||||
const QIcon i(CIcons::changeIconBackgroundColor(this->style()->standardIcon(QStyle::SP_TitleBarUnshadeButton), Qt::white, QSize(16, 16)));
|
||||
QAction *a = new QAction(i, "Toogle main window on top", parent);
|
||||
connect(a, &QAction::triggered, this, &SwiftGuiStd::toogleWindowStayOnTop);
|
||||
connect(a, &QAction::triggered, this, &SwiftGuiStd::toggleWindowStayOnTop);
|
||||
return a;
|
||||
}
|
||||
|
||||
@@ -361,7 +361,7 @@ void SwiftGuiStd::onChangedWindowOpacity(int opacity)
|
||||
ui->comp_MainInfoArea->getSettingsComponent()->setGuiOpacity(o * 100.0);
|
||||
}
|
||||
|
||||
void SwiftGuiStd::toogleWindowStayOnTop()
|
||||
void SwiftGuiStd::toggleWindowStayOnTop()
|
||||
{
|
||||
if (sGui) { sGui->toggleStayOnTop(); }
|
||||
}
|
||||
@@ -448,6 +448,7 @@ void SwiftGuiStd::verifyPrerequisites()
|
||||
|
||||
void SwiftGuiStd::onValidatedModelSet(const CSimulatorInfo &simulator, const CAircraftModelList &valid, const CAircraftModelList &invalid, bool stopped, const CStatusMessageList &msgs)
|
||||
{
|
||||
// will NOT be called if no errors and setting is "only on errors"
|
||||
if (!sGui || sGui->isShuttingDown()) { return; }
|
||||
this->displayValidationDialog();
|
||||
m_validationDialog->validatedModelSet(simulator, valid, invalid, stopped, msgs);
|
||||
|
||||
@@ -246,7 +246,7 @@ private:
|
||||
|
||||
//! Toggle if windows stays on top
|
||||
//! \remark mostly used with navigator
|
||||
void toogleWindowStayOnTop();
|
||||
void toggleWindowStayOnTop();
|
||||
|
||||
//! Toggle window visibility
|
||||
//! \remark mostly used with navigator
|
||||
|
||||
@@ -19,8 +19,6 @@
|
||||
|
||||
#include <QString>
|
||||
|
||||
namespace BlackMisc { namespace Aviation { class CAltitude; } }
|
||||
|
||||
using namespace BlackCore;
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackGui;
|
||||
@@ -45,6 +43,7 @@ bool SwiftGuiStd::reloadOwnAircraft()
|
||||
|
||||
void SwiftGuiStd::setTestPosition(const QString &wgsLatitude, const QString &wgsLongitude, const CAltitude &altitude, const CAltitude &pressureAltitude)
|
||||
{
|
||||
if (!sGui) { return; }
|
||||
CCoordinateGeodetic coordinate(
|
||||
CLatitude::fromWgs84(wgsLatitude),
|
||||
CLongitude::fromWgs84(wgsLongitude),
|
||||
|
||||
Reference in New Issue
Block a user