MCPcopy Create free account
hub / github.com/LunarG/VulkanTools / Refresh

Method Refresh

vkconfig_gui/widget_setting_float.cpp:73–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73void WidgetSettingFloat::Refresh(RefreshAreas refresh_areas) {
74 const SettingDependenceMode enabled = ::CheckDependence(this->meta, data_set);
75
76 this->item->setHidden(enabled == SETTING_DEPENDENCE_HIDE);
77 this->item->setDisabled(enabled != SETTING_DEPENDENCE_ENABLE);
78 this->field->setEnabled(enabled == SETTING_DEPENDENCE_ENABLE);
79 this->setEnabled(enabled == SETTING_DEPENDENCE_ENABLE);
80
81 if (refresh_areas == REFRESH_ENABLE_AND_STATE) {
82 if (::CheckSettingOverridden(this->meta)) {
83 this->DisplayOverride(this->field, this->meta);
84 }
85
86 const std::string float_format = meta.GetFloatFormat();
87
88 this->field->blockSignals(true);
89 this->field->setText(format(float_format.c_str(), this->data().value).c_str());
90 this->field->blockSignals(false);
91 }
92}
93
94void WidgetSettingFloat::resizeEvent(QResizeEvent* event) {
95 this->resize = event->size();

Callers 1

WidgetSettingFloatMethod · 0.95

Calls 5

CheckDependenceFunction · 0.85
CheckSettingOverriddenFunction · 0.85
DisplayOverrideMethod · 0.80
GetFloatFormatMethod · 0.80
formatFunction · 0.50

Tested by

no test coverage detected