Formatting this->ui to ui

This commit is contained in:
Klaus Basan
2016-09-02 19:39:08 +02:00
committed by Roland Winklmeier
parent 7330ccba1b
commit aafff6cd82
67 changed files with 1113 additions and 1115 deletions

View File

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