6 #include <QStyleFactory>
12 namespace swift::gui::settings
14 CGeneralGuiSettings::CGeneralGuiSettings() {}
16 void CGeneralGuiSettings::setWidgetStyle(
const QString &widgetStyle)
18 if (this->m_widgetStyle == widgetStyle) {
return; }
20 if (availableStyles.contains(widgetStyle)) { m_widgetStyle = widgetStyle; }
23 bool CGeneralGuiSettings::isDifferentValidWidgetStyle(
const QString &style)
const
26 return style != this->m_widgetStyle;
36 this->m_preferredSelection =
static_cast<int>(selection);
39 QString CGeneralGuiSettings::convertToQString(
bool i18n)
const
42 return QStringLiteral(
"Widget style: %1").arg(this->m_widgetStyle);
67 case IndexWidgetStyle: this->setWidgetStyle(variant.
toString());
break;
68 case IndexPreferredSelection: this->m_preferredSelection = variant.
toInt();
break;
ColumnIndex
Properties by index.
Non-owning reference to a CPropertyIndex with a subset of its features.
CastType frontCasted() const
First element casted to given type, usually the PropertIndex enum.
bool isMyself() const
Myself index, used with nesting.
void setPropertyByIndex(CPropertyIndexRef index, const QVariant &variant)
Set property by index.
QVariant propertyByIndex(CPropertyIndexRef index) const
Property by index.
Free functions in swift::misc.
QVariant fromValue(T &&value)
int toInt(bool *ok) const const
QString toString() const const
#define SWIFT_DEFINE_VALUEOBJECT_MIXINS(Namespace, Class)
Explicit template definition of mixins for a CValueObject subclass.