| 57 | } |
| 58 | |
| 59 | void WidgetSettingString::Refresh(RefreshAreas refresh_areas) { |
| 60 | const SettingDependenceMode enabled = ::CheckDependence(this->meta, data_set); |
| 61 | |
| 62 | this->item->setHidden(enabled == SETTING_DEPENDENCE_HIDE); |
| 63 | this->item->setDisabled(enabled != SETTING_DEPENDENCE_ENABLE); |
| 64 | this->field->setEnabled(enabled == SETTING_DEPENDENCE_ENABLE); |
| 65 | this->setEnabled(enabled == SETTING_DEPENDENCE_ENABLE); |
| 66 | |
| 67 | if (refresh_areas == REFRESH_ENABLE_AND_STATE) { |
| 68 | if (::CheckSettingOverridden(this->meta)) { |
| 69 | this->DisplayOverride(this->field, this->meta); |
| 70 | } |
| 71 | |
| 72 | this->field->setText(this->data().GetValue()); |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | void WidgetSettingString::Resize() { |
| 77 | const QFontMetrics fm = this->field->fontMetrics(); |
no test coverage detected