8 namespace vms_server_plugins {
13 static const std::string kRegularSettingsModelOption =
"regular";
14 static const std::string kAlternativeSettingsModelOption =
"alternative";
16 static const std::string kSettingsModelSettings =
"settingsModelComboBox";
18 static const std::string kCitySelector =
"languageSelectorSettings";
19 static const std::string kEnglishOption =
"English";
20 static const std::string kGermanOption =
"German";
22 static const std::string kAlternativeSettingsModel =
23 1 + (
const char*) R
"json(" 30 "name": ")json" + kSettingsModelSettings + R"json(", 31 "caption": "Settings model", 32 "defaultValue": ")json" + kRegularSettingsModelOption + R"json(", 35 ")json" + kRegularSettingsModelOption + R"json(", 36 ")json" + kAlternativeSettingsModelOption + R"json(" 41 "caption": "Alternative GroupBox", 46 "name": "alternativeCheckBox", 47 "caption": "Alternative CheckBox", 52 "name": "alternativeTextField", 53 "caption": "Alternative TextField", 54 "defaultValue": "alternative text" 62 static const std::string kRegularSettingsModelPart1 = 1 + R
"json( 69 "name": ")json" + kSettingsModelSettings + R"json(", 70 "caption": "Settings model", 71 "defaultValue": ")json" + kRegularSettingsModelOption + R"json(", 74 ")json" + kRegularSettingsModelOption + R"json(", 75 ")json" + kAlternativeSettingsModelOption + R"json(" 80 "caption": "Example Stub DeviceAgent settings", 85 "name": "testTextField", 86 "caption": "Device Agent Text Field", 87 "description": "A text field", 88 "defaultValue": "a text" 92 "name": ")json" + kCitySelector + R"json(", 94 "defaultValue": "English", 96 ")json" + kEnglishOption + R"json(", 97 ")json" + kGermanOption + R"json(" 102 static const std::string kEnglishCitiesSettingsModelPart = 1 + R
"json( 104 "type": "RadioButtonGroup", 105 "name": "testEnglishRadioButtonGroup", 106 "caption": "Choose one", 107 "description": "Choose one option", 108 "defaultValue": "London", 117 static const std::string kGermanCitiesSettingsModelPart = 1 + R
"json( 119 "type": "RadioButtonGroup", 120 "name": "testGermanRadioButtonGroup", 121 "caption": "Choose one", 122 "description": "Choose one option", 123 "defaultValue": "Berlin", 133 static const std::string kRegularSettingsModelPart2 = 1 + R
"json(" 135 "type": "RadioButtonGroup", 136 "name": "testRadioButtonGroup", 137 "caption": "RadioButton Group", 138 "description": "Choose one option", 139 "defaultValue": "Cs_enodatum", 154 "K_gowerianus": "Kepplerites gowerianus", 155 "K_galilaeii": "Kepplerites galilaeii", 156 "S_calloviense": "Sigaloceras calloviense", 157 "S_micans": "Sigaloceras micans", 158 "Cs_enodatum": "Catasigaloceras enodatum", 159 "K_medea": "Kosmoceras medea", 160 "K_jason": "Kosmoceras jason", 161 "K_obductum": "Kosmoceras obductum", 162 "K_posterior": "Kosmoceras posterior" 166 "type": "CheckBoxGroup", 167 "name": "testCheckBoxGroup", 168 "caption": "CheckBox Group", 169 "description": "Choose one or several options", 170 "defaultValue": ["Coleoidea", "Nautiloidea"], 180 "Coleoidea": "Coleoidea (Bather, 1888)", 181 "Ammonoidea": "Ammonoidea (Zittel, 1884)", 182 "Nautiloidea": "Nautiloidea (Agassiz, 1847)", 183 "Orthoceratoidea": "Orthoceratoidea (M'Coy 1844)" 188 "caption": "Device Agent SpinBox (plugin side)", 189 "name": "pluginSideTestSpinBox", 195 "type": "DoubleSpinBox", 196 "caption": "Device Agent DoubleSpinBox", 197 "name": "testDoubleSpinBox", 198 "defaultValue": 3.1415, 204 "name": "testComboBox", 205 "caption": "Device Agent ComboBox", 206 "defaultValue": "value2", 207 "range": ["value1", "value2", "value3"], 210 "value1": "Device Agent Value #1", 211 "value2": "Device Agent Value #2", 212 "value3": "Device Agent Value #3" 220 "caption": "Device Agent CheckBox", 221 "name": "testCheckBox", 226 "caption": "Disabled Device Agent CheckBox", 227 "name": "disabledTestCheckBox", 228 "defaultValue": false, 233 "caption": "Hidden Device Agent CheckBox", 234 "name": "hiddenTestCheckBox", 235 "defaultValue": false, 245 "caption": "Example section", 250 "caption": "Example Stub DeviceAgent settings section", 255 "name": "testTextFieldWithValidation", 256 "caption": "Hexadecimal number text field", 257 "defaultValue": "12ab34cd", 258 "validationRegex": "^[a-f0-9]+$", 259 "validationRegexFlags": "i", 260 "validationErrorMessage": 261 "Text must contain only digits and characters a-f, e.g. 12ab34cd." 265 "caption": "Device Agent SpinBox (plugin side)", 266 "name": "pluginSideTestSpinBox2", 272 "type": "DoubleSpinBox", 273 "caption": "Device Agent DoubleSpinBox", 274 "name": "testDoubleSpinBox2", 275 "defaultValue": 3.1415, 281 "name": "testComboBox2", 282 "caption": "Device Agent ComboBox", 283 "defaultValue": "value2", 284 "range": ["value1", "value2", "value3"] 288 "caption": "Device Agent CheckBox", 289 "name": "testCheckBox2", 299 "caption": "Nested section", 304 "caption": "Example Stub DeviceAgent settings nested section", 308 "type": "SwitchButton", 309 "caption": "Switch Button", 310 "name": "testSwitch", 311 "description": "Tooltip for the switch button", 312 "defaultValue": false 316 "caption": "SpinBox Parameter", 317 "name": "testSpinBox3", 323 "type": "DoubleSpinBox", 324 "caption": "DoubleSpinBox Parameter", 325 "name": "testDoubleSpinBox3", 326 "defaultValue": 3.1415, 332 "name": "testComboBox3", 333 "caption": "ComboBox Parameter", 334 "defaultValue": "value2", 335 "range": ["value1", "value2", "value3"] 339 "caption": "CheckBox Parameter", 340 "name": "testCheckBox3", Definition: apple_utils.h:6