6 #ifndef SWIFT_GUI_SETTINGS_GUI_H
7 #define SWIFT_GUI_SETTINGS_GUI_H
9 #include <QAbstractItemView>
18 namespace swift::gui::settings
27 IndexWidgetStyle = swift::misc::CPropertyIndexRef::GlobalIndexCGeneralGuiSettings,
28 IndexPreferredSelection
38 void setWidgetStyle(
const QString &widgetStyle);
41 bool isDifferentValidWidgetStyle(
const QString &style)
const;
44 QAbstractItemView::SelectionMode getPreferredSelection()
const;
47 void setPreferredSelection(QAbstractItemView::SelectionMode selection);
50 QString convertToQString(
bool i18n =
false)
const;
59 QString m_widgetStyle {
"Fusion" };
60 int m_preferredSelection =
static_cast<int>(QAbstractItemView::ExtendedSelection);
72 static const char *
key() {
return "guigeneral"; }
77 static const QString name(
"General GUI");
86 static const char *
key() {
return "backgroundconsolidation"; }
91 static const QString name(
"Background consolidation");
96 static bool isValid(
const int &valueInSeconds, QString &)
98 return valueInSeconds == -1 || (valueInSeconds >=
minSecs() && valueInSeconds <=
maxSecs());
104 static const int i = 60;
ColumnIndex
Properties by index.
const QString & getWidgetStyle() const
Widget style.
Generic ordered container with value semantics.
Non-owning reference to a CPropertyIndex with a subset of its features.
Mix of the most commonly used mixin classes.
Settings for last manual entries of own aircraft mode.
static int maxSecs()
Maximum.
static bool isValid(const int &valueInSeconds, QString &)
Validator function. Return true if the argument is valid, false otherwise. Default implementation jus...
static const char * key()
Key string of the value. Reimplemented in derived class.
static int minSecs()
Minimum.
static const QString & humanReadable()
Optional human readable name.
static const int & defaultValue()
Return the value to use in case the supplied value does not satisfy the validator....
static const char * key()
Key string of the value. Reimplemented in derived class.
static const QString & humanReadable()
Optional human readable name.
Base class for traits to be used as template argument to swift::misc::CSetting.
#define SWIFT_GUI_EXPORT
Export a class or function from the library.
#define SWIFT_DECLARE_VALUEOBJECT_MIXINS(Namespace, Class)
Explicit template declaration of mixins for a CValueObject subclass to be placed near the top of the ...