|
|
|
@ -1497,12 +1497,22 @@ static inline void BindWidgetToFolderSetting(SettingsInterface* sif, QLineEdit*
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
template<typename WidgetType>
|
|
|
|
template<typename WidgetType>
|
|
|
|
static inline void SetAvailability(WidgetType* widget, bool available)
|
|
|
|
static inline void DisconnectWidget(WidgetType* widget)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
using Accessor = SettingAccessor<WidgetType>;
|
|
|
|
|
|
|
|
Accessor::disconnect(widget);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
template<typename WidgetType>
|
|
|
|
|
|
|
|
static inline void SetAvailability(WidgetType* widget, bool available, QLabel* widget_label = nullptr)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (available)
|
|
|
|
if (available)
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
widget->disconnect();
|
|
|
|
if (widget_label)
|
|
|
|
|
|
|
|
widget_label->setEnabled(false);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DisconnectWidget(widget);
|
|
|
|
|
|
|
|
|
|
|
|
if constexpr (std::is_same_v<WidgetType, QComboBox>)
|
|
|
|
if constexpr (std::is_same_v<WidgetType, QComboBox>)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -1530,11 +1540,4 @@ static inline void SetAvailability(WidgetType* widget, bool available)
|
|
|
|
widget->setEnabled(false);
|
|
|
|
widget->setEnabled(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
template<typename WidgetType>
|
|
|
|
|
|
|
|
static inline void DisconnectWidget(WidgetType* widget)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
using Accessor = SettingAccessor<WidgetType>;
|
|
|
|
|
|
|
|
Accessor::disconnect(widget);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace SettingWidgetBinder
|
|
|
|
} // namespace SettingWidgetBinder
|
|
|
|
|