void ColorPalette::setInverseDefaultColors(bool inverse) { bool emit_changed = inverse != m_inverse_default; if (emit_changed) { m_inverse_default = inverse; emit changed(); emit defaultBackgroundColorChanged(); } }
void Preferences::saveSettings() { bool checked = false; int index = -1; QColor color; double value = 0.0; checked = this->defaultConfigurationCheckBox->checkState() == Qt::Checked; if (this->m_Data[DefaultConfigurationUse].toBool() != checked) { this->m_Data[DefaultConfigurationUse] = checked; emit useDefaultConfigurationStateChanged(checked); } QString path = this->defaultConfigurationLineEdit->text(); if (path.compare(this->m_Data[DefaultConfigurationPath].toString()) != 0) { this->m_Data[DefaultConfigurationPath] = path; emit defaultConfigurationPathChanged(path); } checked = this->openEventEditorCheckBox->checkState() == Qt::Checked; if (this->m_Data[EventEditorWhenInserting].toBool() != checked) { this->m_Data[EventEditorWhenInserting] = checked; emit useEventEditorWhenInsertingStateChanged(checked); } index = this->defaultPlaneOrientationComboBox->currentIndex(); if (this->m_Data[DefaultGroundOrientation].toInt() != index) { this->m_Data[DefaultGroundOrientation] = index; emit defaultGroundOrientationChanged(index); } index = this->defaultTimeBarEventDisplayComboBox->currentIndex(); if (this->m_Data[DefaultTimeBarEventDisplay].toInt() != index) { this->m_Data[DefaultTimeBarEventDisplay] = index; emit defaultTimeBarEventDisplayChanged(index); } color = this->defaultBackgroundColorButton->property("backgroundColor").value<QColor>(); if (this->m_Data[DefaultBackgroundColor].value<QColor>() != color) { this->m_Data[DefaultBackgroundColor] = color; emit defaultBackgroundColorChanged(color); } color = this->defaultGridFrontColorButton->property("backgroundColor").value<QColor>(); if (this->m_Data[DefaultGridFrontColor].value<QColor>() != color) { this->m_Data[DefaultGridFrontColor] = color; emit defaultGridFrontColorChanged(color); } color = this->defaultGridBackColorButton->property("backgroundColor").value<QColor>(); if (this->m_Data[DefaultGridBackColor].value<QColor>() != color) { this->m_Data[DefaultGridBackColor] = color; emit defaultGridBackColorChanged(color); } color = this->defaultSegmentColorButton->property("backgroundColor").value<QColor>(); if (this->m_Data[DefaultSegmentColor].value<QColor>() != color) { this->m_Data[DefaultSegmentColor] = color; emit defaultSegmentColorChanged(color); } color = this->defaultMarkerColorButton->property("backgroundColor").value<QColor>(); if (this->m_Data[DefaultMarkerColor].value<QColor>() != color) { this->m_Data[DefaultMarkerColor] = color; emit defaultMarkerColorChanged(color); } value = this->defaultMarkerRadiusSpinBox->value(); if (this->m_Data[DefaultMarkerRadius].toDouble() != value) { this->m_Data[DefaultMarkerRadius] = value; emit defaultMarkerRadiusChanged(value); } index = this->defaultMarkerTrajectoryLengthComboBox->currentIndex(); if (this->m_Data[DefaultTrajectoryLength].toInt() != index) { this->m_Data[DefaultTrajectoryLength] = index; emit defaultMarkerTrajectoryLengthChanged(index); } index = this->showForcePlatformAxesComboBox->currentIndex(); if (this->m_Data[ForcePlatformAxesDisplay].toInt() != index) { this->m_Data[ForcePlatformAxesDisplay] = index; emit showForcePlatformAxesChanged(index); } index = this->showForcePlatformIndexComboBox->currentIndex(); if (this->m_Data[ForcePlatformIndexDisplay].toInt() != index) { this->m_Data[ForcePlatformIndexDisplay] = index; emit showForcePlatformIndexChanged(index); } color = this->defaultForcePlateColorButton->property("backgroundColor").value<QColor>(); if (this->m_Data[DefaultForcePlateColor].value<QColor>() != color) { this->m_Data[DefaultForcePlateColor] = color; emit defaultForcePlateColorChanged(color); } color = this->defaultForceVectorColorButton->property("backgroundColor").value<QColor>(); if (this->m_Data[DefaultForceVectorColor].value<QColor>() != color) { this->m_Data[DefaultForceVectorColor] = color; emit defaultForceVectorColorChanged(color); } index = this->defaultGRFButterflyActivationComboBox->currentIndex(); if (this->m_Data[DefaultGRFButterflyActivation].toInt() != index) { this->m_Data[DefaultGRFButterflyActivation] = index; emit defaultGRFButterflyActivationChanged(index); } index = this->showForcePathComboBox->currentIndex(); if (this->m_Data[ForcePathDisplay].toInt() != index) { this->m_Data[ForcePathDisplay] = index; emit showForcePathChanged(index); } value = this->defaultPlotLineWidthSpinBox->value(); if (this->m_Data[DefaultPlotLineWidth].toDouble() != value) { this->m_Data[DefaultPlotLineWidth] = value; emit defaultPlotLineWidthChanged(value); } index = this->defaultChartEventDisplayComboBox->currentIndex(); if (this->m_Data[ChartEventDisplay].toInt() != index) { this->m_Data[ChartEventDisplay] = index; emit showChartEventChanged(index); } index = this->defaultChartUnitAxisXComboBox->currentIndex(); if (this->m_Data[chartUnitAxisX].toInt() != index) { this->m_Data[chartUnitAxisX] = index; emit chartHorizontalAxisUnitChanged(index); } this->mp_ChartCycleSettingsManager->setSettings(this->m_TemporaryCycleSettings); this->mp_ChartCycleSettingsManager->setCurrentSetting(this->m_TemporaryCurrentCycleSetting); this->resetTemporaryCycleSettingsData(); QList<QVariant> vList = this->m_Data[UserLayouts].toList(); if (vList != *(this->layoutTable->userLayouts())) { emit userLayoutsChanged(vList, this->m_Data[UserLayoutIndex].toInt()); } checked = this->automaticCheckUpdateCheckBox->checkState() == Qt::Checked; if (this->m_Data[AutomaticCheckUpdateUse].toBool() != checked) { this->m_Data[AutomaticCheckUpdateUse] = checked; emit automaticCheckUpdateStateChanged(checked); } checked = this->subscribeDevelopmentChannelCheckBox->checkState() == Qt::Checked; if (this->m_Data[DevelopmentChannelSubscriptionUsed].toBool() != checked) { this->m_Data[DevelopmentChannelSubscriptionUsed] = checked; emit subscribeDevelopmentChannelStateChanged(checked); } };