mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-15 01:05:35 +08:00
Style
This commit is contained in:
@@ -59,9 +59,6 @@ namespace BlackGui
|
||||
connect(ui->pb_ShowInSimulator, &QPushButton::released, this, &CInterpolationLogDisplay::showLogInSimulator);
|
||||
connect(ui->pb_GetLastInterpolation, &QPushButton::released, this, &CInterpolationLogDisplay::displayLastInterpolation);
|
||||
connect(sGui, &CGuiApplication::aboutToShutdown, this, &CInterpolationLogDisplay::onAboutToShutdown);
|
||||
|
||||
// ui->le_Foo->setVisible(false);
|
||||
// ui->lbl_Foo->setVisible(false);
|
||||
}
|
||||
|
||||
CInterpolationLogDisplay::~CInterpolationLogDisplay()
|
||||
|
||||
@@ -54,9 +54,10 @@ namespace BlackGui
|
||||
this->setCurrentIndex(0);
|
||||
ui->comp_StatusMessages->showFilterDialog();
|
||||
|
||||
// live data
|
||||
// live data and internals
|
||||
ui->tvp_LiveData->setIconMode(true);
|
||||
ui->tvp_LiveData->setAutoResizeFrequency(10); // only resize every n-th time
|
||||
ui->tvp_Internals->setIconMode(false);
|
||||
this->addOrUpdateLiveDataByName("info", "no data yet", CIcons::StandardIconWarning16);
|
||||
|
||||
// connects
|
||||
@@ -183,7 +184,7 @@ namespace BlackGui
|
||||
|
||||
void CSimulatorComponent::refreshInternals()
|
||||
{
|
||||
if (!sGui->getIContextSimulator()) { return; }
|
||||
if (!sGui || sGui->isShuttingDown() || !sGui->getIContextSimulator()) { return; }
|
||||
const CSimulatorInternals internals = sGui->getIContextSimulator()->getSimulatorInternals();
|
||||
const QStringList names(internals.getSortedNames());
|
||||
if (names.isEmpty())
|
||||
|
||||
@@ -27,27 +27,27 @@ namespace BlackGui
|
||||
|
||||
void CNameVariantPairView::setIconMode(bool withIcon)
|
||||
{
|
||||
Q_ASSERT(this->m_model);
|
||||
this->m_model->setIconMode(withIcon);
|
||||
Q_ASSERT(m_model);
|
||||
m_model->setIconMode(withIcon);
|
||||
}
|
||||
|
||||
bool CNameVariantPairView::addOrUpdateByName(const QString &name, const BlackMisc::CVariant &value, const CIcon &icon, bool resize, bool skipEqualValues)
|
||||
{
|
||||
Q_ASSERT(this->m_model);
|
||||
bool changed = this->m_model->addOrUpdateByName(name, value, icon, skipEqualValues);
|
||||
Q_ASSERT(m_model);
|
||||
bool changed = m_model->addOrUpdateByName(name, value, icon, skipEqualValues);
|
||||
if (resize && changed) { this->resizeToContents(); }
|
||||
return changed;
|
||||
}
|
||||
|
||||
void CNameVariantPairView::removeByName(const QString &name, bool resize)
|
||||
{
|
||||
this->m_model->removeByName(name);
|
||||
m_model->removeByName(name);
|
||||
if (resize) { this->resizeToContents(); }
|
||||
}
|
||||
|
||||
bool CNameVariantPairView::containsName(const QString &name)
|
||||
{
|
||||
return this->m_model->containsName(name);
|
||||
return m_model->containsName(name);
|
||||
}
|
||||
}
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user