mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 01:05:34 +08:00
Formatting, minor UI tweaks
* minor renamings in simulator selector * simplified namespaces Ref T246
This commit is contained in:
@@ -31,6 +31,8 @@ namespace BlackGui
|
||||
QFrame(parent),
|
||||
ui(new Ui::CDbAirlineIcaoComponent)
|
||||
{
|
||||
Q_ASSERT_X(sGui, Q_FUNC_INFO, "Missing sGui");
|
||||
|
||||
ui->setupUi(this);
|
||||
this->setViewWithIndicator(ui->tvp_AirlineIcao);
|
||||
ui->tvp_AirlineIcao->setResizeMode(CAirlineIcaoCodeView::ResizingOff);
|
||||
|
||||
@@ -106,7 +106,7 @@ namespace BlackGui
|
||||
this->setValue(simulator);
|
||||
}
|
||||
|
||||
void CSimulatorSelector::setAll()
|
||||
void CSimulatorSelector::checkAll()
|
||||
{
|
||||
// checkboxes
|
||||
ui->cb_FSX->setChecked(true);
|
||||
@@ -118,6 +118,15 @@ namespace BlackGui
|
||||
ui->rb_FSX->setChecked(true);
|
||||
}
|
||||
|
||||
void CSimulatorSelector::uncheckAll()
|
||||
{
|
||||
// checkboxes
|
||||
ui->cb_FSX->setChecked(false);
|
||||
ui->cb_FS9->setChecked(false);
|
||||
ui->cb_XPlane->setChecked(false);
|
||||
ui->cb_P3D->setChecked(false);
|
||||
}
|
||||
|
||||
bool CSimulatorSelector::isUnselected() const
|
||||
{
|
||||
bool c = false;
|
||||
@@ -165,6 +174,14 @@ namespace BlackGui
|
||||
ui->hl_CheckBoxes->setContentsMargins(m);
|
||||
}
|
||||
|
||||
void CSimulatorSelector::clear()
|
||||
{
|
||||
if (m_mode == CheckBoxes)
|
||||
{
|
||||
this->uncheckAll();
|
||||
}
|
||||
}
|
||||
|
||||
void CSimulatorSelector::radioButtonChanged(bool checked)
|
||||
{
|
||||
if (m_mode != RadioButtons) { return; }
|
||||
|
||||
@@ -64,7 +64,10 @@ namespace BlackGui
|
||||
void setToLastSelection();
|
||||
|
||||
//! Set all, only making sense with checkboxes
|
||||
void setAll();
|
||||
void checkAll();
|
||||
|
||||
//! Unset all, only making sense with checkboxes
|
||||
void uncheckAll();
|
||||
|
||||
//! Not selected at all
|
||||
bool isUnselected() const;
|
||||
@@ -78,6 +81,9 @@ namespace BlackGui
|
||||
//! Remember selection
|
||||
void setRememberSelection(bool remember) { m_rememberSelection = remember; }
|
||||
|
||||
//! Clear values
|
||||
void clear();
|
||||
|
||||
signals:
|
||||
//! Value has been changed
|
||||
void changed(const BlackMisc::Simulation::CSimulatorInfo &simulator);
|
||||
|
||||
Reference in New Issue
Block a user