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";
24 static const std::string kCaption =
"caption";
25 static const std::string kSections =
"sections";
26 static const std::string kName =
"name";
27 static const std::string kRange =
"range";
28 static const std::string kItems =
"items";
29 static const std::string kIsActive =
"isActive";
30 static const std::string kActiveSettingsSectionCaption =
"Active settings section";
31 static const std::string kActiveSettingsGroupBoxCaption =
"Active settings";
33 static const std::string kActiveComboBoxId =
"activeComboBox";
34 static const std::string kAdditionalComboBoxId =
"additionalComboBox";
35 static const std::string kShowAdditionalComboBoxValue =
"Show additional ComboBox";
36 static const std::string kAdditionalComboBoxValue =
"Value 1";
38 static const std::string kActiveCheckBoxId =
"activeCheckBox";
39 static const std::string kAdditionalCheckBoxId =
"additionalCheckBox";
40 static const std::string kShowAdditionalCheckBoxValue =
"true";
41 static const std::string kAdditionalCheckBoxValue =
"false";
43 static const std::string kActiveRadioButtonGroupId =
"activeRadioButtonGroup";
44 static const std::string kShowAdditionalRadioButtonValue =
"Show something";
45 static const std::string kHideAdditionalRadioButtonValue =
"Hide me";
46 static const std::string kDefaultActiveRadioButtonGroupValue =
"Some value";
48 static const std::string kShowMessageButtonId =
"showMessageButton";
49 static const std::string kShowUrlButtonId =
"showUrlButton";
50 static const std::string kParametersModel = 1 + (
const char*) R
"json( 59 "defaultValue": "https://example.com/" 67 static const std::string kAlternativeSettingsModel =
68 1 + (
const char*) R
"json(" 75 "name": ")json" + kSettingsModelSettings + R"json(", 76 "caption": "Settings model", 77 "defaultValue": ")json" + kRegularSettingsModelOption + R"json(", 80 ")json" + kRegularSettingsModelOption + R"json(", 81 ")json" + kAlternativeSettingsModelOption + R"json(" 86 "caption": "Alternative GroupBox", 91 "name": "alternativeCheckBox", 92 "caption": "Alternative CheckBox", 97 "name": "alternativeTextField", 98 "caption": "Alternative TextField", 99 "defaultValue": "alternative text" 107 static const std::string kRegularSettingsModelPart1 = 1 + R
"json( 114 "name": ")json" + kSettingsModelSettings + R"json(", 115 "caption": "Settings model", 116 "defaultValue": ")json" + kRegularSettingsModelOption + R"json(", 119 ")json" + kRegularSettingsModelOption + R"json(", 120 ")json" + kAlternativeSettingsModelOption + R"json(" 125 "caption": "Example Stub DeviceAgent settings", 130 "name": "testTextField", 131 "caption": "Device Agent Text Field", 132 "description": "A text field", 133 "defaultValue": "a text" 137 "name": ")json" + kCitySelector + R"json(", 139 "defaultValue": "English", 141 ")json" + kEnglishOption + R"json(", 142 ")json" + kGermanOption + R"json(" 147 static const std::string kEnglishCitiesSettingsModelPart = 1 + R
"json( 149 "type": "RadioButtonGroup", 150 "name": "testEnglishRadioButtonGroup", 151 "caption": "Choose one", 152 "description": "Choose one option", 153 "defaultValue": "London", 162 static const std::string kGermanCitiesSettingsModelPart = 1 + R
"json( 164 "type": "RadioButtonGroup", 165 "name": "testGermanRadioButtonGroup", 166 "caption": "Choose one", 167 "description": "Choose one option", 168 "defaultValue": "Berlin", 178 static const std::string kRegularSettingsModelPart2 = 1 + R
"json(" 180 "type": "RadioButtonGroup", 181 "name": "testRadioButtonGroup", 182 "caption": "RadioButton Group", 183 "description": "Choose one option", 184 "defaultValue": "Cs_enodatum", 199 "K_gowerianus": "Kepplerites gowerianus", 200 "K_galilaeii": "Kepplerites galilaeii", 201 "S_calloviense": "Sigaloceras calloviense", 202 "S_micans": "Sigaloceras micans", 203 "Cs_enodatum": "Catasigaloceras enodatum", 204 "K_medea": "Kosmoceras medea", 205 "K_jason": "Kosmoceras jason", 206 "K_obductum": "Kosmoceras obductum", 207 "K_posterior": "Kosmoceras posterior" 211 "type": "CheckBoxGroup", 212 "name": "testCheckBoxGroup", 213 "caption": "CheckBox Group", 214 "description": "Choose one or several options", 215 "defaultValue": ["Coleoidea", "Nautiloidea"], 225 "Coleoidea": "Coleoidea (Bather, 1888)", 226 "Ammonoidea": "Ammonoidea (Zittel, 1884)", 227 "Nautiloidea": "Nautiloidea (Agassiz, 1847)", 228 "Orthoceratoidea": "Orthoceratoidea (M'Coy 1844)" 233 "caption": "Device Agent SpinBox (plugin side)", 234 "name": "pluginSideTestSpinBox", 240 "type": "DoubleSpinBox", 241 "caption": "Device Agent DoubleSpinBox", 242 "name": "testDoubleSpinBox", 243 "defaultValue": 3.1415, 249 "name": "testComboBox", 250 "caption": "Device Agent ComboBox", 251 "defaultValue": "value2", 252 "range": ["value1", "value2", "value3"], 255 "value1": "Device Agent Value #1", 256 "value2": "Device Agent Value #2", 257 "value3": "Device Agent Value #3" 265 "caption": "Device Agent CheckBox", 266 "name": "testCheckBox", 271 "caption": "Disabled Device Agent CheckBox", 272 "name": "disabledTestCheckBox", 273 "defaultValue": false, 278 "caption": "Hidden Device Agent CheckBox", 279 "name": "hiddenTestCheckBox", 280 "defaultValue": false, 285 "caption": "Customer Support", 286 "url": "https://example.com/" 294 "type": "Placeholder", 296 "description": "Description", 306 "caption": "Example section", 311 "caption": "Example Stub DeviceAgent settings section", 316 "name": "testTextFieldWithValidation", 317 "caption": "Hexadecimal number text field", 318 "defaultValue": "12ab34cd", 319 "validationRegex": "^[a-f0-9]+$", 320 "validationRegexFlags": "i", 321 "validationErrorMessage": 322 "Text must contain only digits and characters a-f, e.g. 12ab34cd." 325 "type": "PasswordField", 326 "name": "passwordField1", 327 "caption": "Password Field", 328 "description": "A password field", 329 "defaultValue": "1234", 330 "validationErrorMessage": "Password must contain only digits", 331 "validationRegex": "^[0-9]+$", 332 "validationRegexFlags": "i" 336 "caption": "Device Agent SpinBox (plugin side)", 337 "name": "pluginSideTestSpinBox2", 343 "type": "DoubleSpinBox", 344 "caption": "Device Agent DoubleSpinBox", 345 "name": "testDoubleSpinBox2", 346 "defaultValue": 3.1415, 352 "name": "testComboBox2", 353 "caption": "Device Agent ComboBox", 354 "defaultValue": "value2", 355 "range": ["value1", "value2", "value3"] 359 "caption": "Device Agent CheckBox", 360 "name": "testCheckBox2", 370 "caption": "Nested section", 375 "caption": "Example Stub DeviceAgent settings nested section", 379 "type": "SwitchButton", 380 "caption": "Switch Button", 381 "name": "testSwitch", 382 "description": "Tooltip for the switch button", 383 "defaultValue": false 387 "caption": "SpinBox Parameter", 388 "name": "testSpinBox3", 394 "type": "DoubleSpinBox", 395 "caption": "DoubleSpinBox Parameter", 396 "name": "testDoubleSpinBox3", 397 "defaultValue": 3.1415, 403 "name": "testComboBox3", 404 "caption": "ComboBox Parameter", 405 "defaultValue": "value2", 406 "range": ["value1", "value2", "value3"] 410 "caption": "CheckBox Parameter", 411 "name": "testCheckBox3", 422 "caption": ")json" + kActiveSettingsSectionCaption + R"json(", 427 "name": ")json" + kActiveComboBoxId + R"json(", 428 "caption": "Active ComboBox", 429 "defaultValue": "Some value", 434 ")json" + kShowAdditionalComboBoxValue + R"json(" 439 "name": ")json" + kActiveCheckBoxId + R"json(", 440 "caption": "Active CheckBox", 441 "defaultValue": false, 450 "name": "testTextField", 451 "caption": "Text Field Parameter", 452 "description": "A text field", 453 "defaultValue": "a text" 457 "caption": "Parameter Group", 462 "caption": "SpinBox Parameter", 463 "name": "testSpinBox", 469 "type": "DoubleSpinBox", 470 "caption": "DoubleSpinBox Parameter", 471 "name": "testDoubleSpinBox", 472 "defaultValue": 3.1415, 478 "caption": "ComboBox Parameter", 479 "name": "testComboBox", 480 "defaultValue": "value2", 481 "range": ["value1", "value2", "value3"] 485 "caption": "CheckBox Parameter", 486 "name": "testCheckBox", 491 "caption": "TextArea Parameter", 492 "name": "testTextArea" 500 "type": "RadioButtonGroup", 501 "name": ")json" + kActiveRadioButtonGroupId + R"json(", 502 "caption": "Active RadioButton Group", 503 "defaultValue": "Some value", 508 ")json" + kShowAdditionalRadioButtonValue + R"json(" 513 "name": ")json" + kShowMessageButtonId + R"json(", 514 "caption": "Show a message", 519 "name": ")json" + kShowUrlButtonId + R"json(", 520 "caption": "Show a web-page", 522 "parametersModel": )json" + kParametersModel + R"json( Definition: apple_utils.h:6