mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 09:15:34 +08:00
Formatting, renaming
This commit is contained in:
committed by
Roland Winklmeier
parent
cf6a555824
commit
dd587207fe
@@ -280,10 +280,10 @@ namespace BlackGui
|
||||
Q_UNUSED(connected);
|
||||
}
|
||||
|
||||
const QString CCockpitComComponent::cockpitOriginator()
|
||||
const QString &CCockpitComComponent::cockpitOriginator()
|
||||
{
|
||||
// string is generated once, the timestamp allows to use multiple
|
||||
// components (as long as they are not generated in the same ms)
|
||||
// components (as long as they are not generated at the same ms)
|
||||
static const QString o = QString("COCKPITCOMCOMPONENT:").append(QString::number(QDateTime::currentMSecsSinceEpoch()));
|
||||
return o;
|
||||
}
|
||||
|
||||
@@ -61,12 +61,18 @@ namespace BlackGui
|
||||
//! Cockpit values have been changed in GUI
|
||||
void ps_guiChangedCockpitValues();
|
||||
|
||||
//! SELCAL changed in GUI
|
||||
void ps_guiChangedSelcal();
|
||||
|
||||
//! Update cockpit from context
|
||||
void ps_updateCockpitFromContext(const BlackMisc::Aviation::CAircraft &ownAircraft, const QString &originator);
|
||||
|
||||
//! Cockpit values have been changed in GUI
|
||||
void ps_testSelcal();
|
||||
|
||||
//! SELCAL was changed
|
||||
void ps_onChangedSelcal(const BlackMisc::Aviation::CSelcal &selcal, const QString &originator);
|
||||
|
||||
//! Update voice room related information
|
||||
void ps_onChangedVoiceRoomStatus(const BlackMisc::Audio::CVoiceRoomList &selectedVoiceRooms, bool connected);
|
||||
|
||||
@@ -90,8 +96,7 @@ namespace BlackGui
|
||||
void updateFrequencyDisplaysFromComSystems(const BlackMisc::Aviation::CComSystem &com1, const BlackMisc::Aviation::CComSystem &com2);
|
||||
|
||||
//! Identifies sender of cockpit updates
|
||||
// TODO: Check if to be migrated to COriginator
|
||||
static const QString cockpitOriginator();
|
||||
static const QString &cockpitOriginator();
|
||||
|
||||
QScopedPointer<Ui::CCockpitMainComponent> ui;
|
||||
};
|
||||
|
||||
@@ -225,7 +225,7 @@ namespace BlackGui
|
||||
return messages;
|
||||
}
|
||||
|
||||
void CFlightPlanComponent::sendFlightPlan()
|
||||
void CFlightPlanComponent::ps_sendFlightPlan()
|
||||
{
|
||||
CFlightPlan flightPlan;
|
||||
CStatusMessageList messages = this->validateAndInitializeFlightPlan(flightPlan);
|
||||
@@ -249,13 +249,13 @@ namespace BlackGui
|
||||
}
|
||||
}
|
||||
|
||||
void CFlightPlanComponent::validateFlightPlan()
|
||||
void CFlightPlanComponent::ps_validateFlightPlan()
|
||||
{
|
||||
CFlightPlan flightPlan;
|
||||
CStatusMessageList messages = this->validateAndInitializeFlightPlan(flightPlan);
|
||||
}
|
||||
|
||||
void CFlightPlanComponent::resetFlightPlan()
|
||||
void CFlightPlanComponent::ps_resetFlightPlan()
|
||||
{
|
||||
if (this->getIContextNetwork())
|
||||
{
|
||||
@@ -275,7 +275,9 @@ namespace BlackGui
|
||||
this->ui->le_TakeOffTimePlanned->setText(QDateTime::currentDateTimeUtc().addSecs(30 * 60).toString("hh:mm"));
|
||||
}
|
||||
|
||||
void CFlightPlanComponent::loadFlightPlanFromNetwork()
|
||||
void CFlightPlanComponent::ps_setSelcalInOwnAircraft()
|
||||
{
|
||||
void CFlightPlanComponent::ps_loadFlightPlanFromNetwork()
|
||||
{
|
||||
if (!this->getIContextNetwork())
|
||||
{
|
||||
@@ -301,7 +303,7 @@ namespace BlackGui
|
||||
}
|
||||
}
|
||||
|
||||
void CFlightPlanComponent::buildRemarkString()
|
||||
void CFlightPlanComponent::ps_buildRemarksString()
|
||||
{
|
||||
QString rem;
|
||||
QString v = this->ui->cb_VoiceCapabilities->currentText().toUpper();
|
||||
@@ -374,13 +376,13 @@ namespace BlackGui
|
||||
this->ui->pte_RemarksGenerated->setPlainText(rem);
|
||||
}
|
||||
|
||||
void CFlightPlanComponent::copyRemarks()
|
||||
void CFlightPlanComponent::ps_copyRemarks()
|
||||
{
|
||||
this->ui->pte_Remarks->setPlainText(this->ui->pte_RemarksGenerated->toPlainText());
|
||||
CLogMessage(this).info("Copied remarks");
|
||||
}
|
||||
|
||||
void CFlightPlanComponent::currentTabGenerator()
|
||||
void CFlightPlanComponent::ps_currentTabGenerator()
|
||||
{
|
||||
this->setCurrentWidget(this->ui->tb_RemarksGenerator);
|
||||
}
|
||||
|
||||
@@ -65,25 +65,28 @@ namespace BlackGui
|
||||
|
||||
private slots:
|
||||
//! Send flightplan
|
||||
void sendFlightPlan();
|
||||
void ps_sendFlightPlan();
|
||||
|
||||
//! Reset Flightplan
|
||||
void resetFlightPlan();
|
||||
void ps_resetFlightPlan();
|
||||
|
||||
//! Set SELCAL in own aircrafr
|
||||
void ps_setSelcalInOwnAircraft();
|
||||
|
||||
//! Load Flightplan
|
||||
void loadFlightPlanFromNetwork();
|
||||
void ps_loadFlightPlanFromNetwork();
|
||||
|
||||
//! Validate Flightplan
|
||||
void validateFlightPlan();
|
||||
void ps_validateFlightPlan();
|
||||
|
||||
//! Remark
|
||||
void buildRemarkString();
|
||||
void ps_buildRemarksString();
|
||||
|
||||
//! Copy over
|
||||
void copyRemarks();
|
||||
void ps_copyRemarks();
|
||||
|
||||
//! Show generator tab page
|
||||
void currentTabGenerator();
|
||||
void ps_currentTabGenerator();
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace BlackGui
|
||||
* Constructor
|
||||
*/
|
||||
CInfoWindowComponent::CInfoWindowComponent(QWidget *parent) :
|
||||
QWizardPage(parent), ui(new Ui::InfoWindow), m_hideTimer(nullptr)
|
||||
QWizardPage(parent), ui(new Ui::InfoWindow)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->hide();
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace BlackGui
|
||||
|
||||
private:
|
||||
QScopedPointer<Ui::InfoWindow> ui; //!< user interface
|
||||
QTimer *m_hideTimer;
|
||||
QTimer *m_hideTimer = nullptr;
|
||||
|
||||
//! Init the window
|
||||
void initWindow();
|
||||
|
||||
@@ -22,6 +22,7 @@ namespace BlackGui
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
//! Constructor
|
||||
explicit CTransponderCodeSpinBox(QWidget *parent = nullptr);
|
||||
|
||||
//! \copydoc QDoubleSpinBox::textFromValue
|
||||
|
||||
@@ -100,7 +100,7 @@ namespace BlackGui
|
||||
//! Helper method with template free signature
|
||||
//! \param variant contains the container
|
||||
//! \param sort
|
||||
//! \param resize
|
||||
//! \param performResizing
|
||||
virtual int performUpdateContainer(const QVariant &variant, bool sort, bool performResizing) = 0;
|
||||
|
||||
//! Skip resizing because of size?
|
||||
@@ -116,7 +116,7 @@ namespace BlackGui
|
||||
int m_resizeCount = 0; //!< flag / counter, how many resize activities
|
||||
int m_skipResizeThreshold = 40; //!< when to skip resize (rows count)
|
||||
int m_resizeAutoNthTime = 1; //!< with ResizeAuto, resize every n-th time
|
||||
bool m_forceStretchLastColumnWhenResized = false; //! a small table might (few columns) might to fail stretching, force again
|
||||
bool m_forceStretchLastColumnWhenResized = false; //!< a small table might (few columns) might to fail stretching, force again
|
||||
|
||||
protected slots:
|
||||
//! Helper method with template free signature serving as callback from threaded worker
|
||||
|
||||
Reference in New Issue
Block a user