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 kMinValue =
"minValue";
31 static const std::string kMaxValue =
"maxValue";
32 static const std::string kActiveSettingsSectionCaption =
"Active settings section";
33 static const std::string kActiveSettingsGroupBoxCaption =
"Active settings";
35 static const std::string kActiveComboBoxId =
"activeComboBox";
36 static const std::string kAdditionalComboBoxId =
"additionalComboBox";
37 static const std::string kShowAdditionalComboBoxValue =
"Show additional ComboBox";
38 static const std::string kAdditionalComboBoxValue =
"Value 1";
40 static const std::string kActiveCheckBoxId =
"activeCheckBox";
41 static const std::string kAdditionalCheckBoxId =
"additionalCheckBox";
42 static const std::string kShowAdditionalCheckBoxValue =
"true";
43 static const std::string kAdditionalCheckBoxValue =
"false";
45 static const std::string kActiveRadioButtonGroupId =
"activeRadioButtonGroup";
46 static const std::string kShowAdditionalRadioButtonValue =
"Show something";
47 static const std::string kHideAdditionalRadioButtonValue =
"Hide me";
48 static const std::string kDefaultActiveRadioButtonGroupValue =
"Some value";
50 static const std::string kActiveMinValueId =
"activeMinValue";
51 static const std::string kActiveMaxValueId =
"activeMaxValue";
53 static const std::string kShowMessageButtonId =
"showMessageButton";
54 static const std::string kShowUrlButtonId =
"showUrlButton";
55 static const std::string kParametersModel = 1 + R
"json( 63 "caption": "Parameter" 70 static const std::string kEnginePluginSideSetting =
"testPluginSideSpinBox";
71 static const std::string kEnginePluginSideSettingValue =
"42";
72 static const std::string kEngineSettingsModel = 1 + R
"json(" 79 "caption": "Example Stub Engine settings", 85 "caption": "Text Field", 86 "description": "A text field", 87 "defaultValue": "a text" 90 "type": "PasswordField", 91 "name": "passwordField1", 92 "caption": "Password Field", 93 "description": "A password field", 94 "defaultValue": "1234", 95 "validationErrorMessage": "Password must contain only digits", 96 "validationRegex": "^[0-9]+$", 97 "validationRegexFlags": "i" 101 "name": "testSpinBox", 102 "caption": "Spin Box", 109 "name": ")json" + kEnginePluginSideSetting + R"json(", 110 "caption": "Spin Box (plugin side)", 116 "type": "DoubleSpinBox", 117 "name": "testDoubleSpinBox", 118 "caption": "Double Spin Box", 119 "defaultValue": 3.1415, 125 "name": "testComboBox", 126 "caption": "Combo Box", 127 "defaultValue": "value2", 128 "range": ["value1", "value2", "value3"] 132 "name": "testCheckBox", 133 "caption": "Check Box", 138 "caption": "Customer Support", 139 "url": "https://example.com/" 147 "type": "Placeholder", 149 "description": "Description", 156 "caption": ")json" + kActiveSettingsGroupBoxCaption + R"json(", 161 "name": ")json" + kActiveComboBoxId + R"json(", 162 "caption": "Active ComboBox", 163 "defaultValue": "Some value", 168 ")json" + kShowAdditionalComboBoxValue + R"json(" 173 "name": ")json" + kActiveCheckBoxId + R"json(", 174 "caption": "Active CheckBox", 175 "defaultValue": false, 179 "type": "RadioButtonGroup", 180 "name": ")json" + kActiveRadioButtonGroupId + R"json(", 181 "caption": "Active RadioButton Group", 182 "defaultValue": "Some value", 187 ")json" + kShowAdditionalRadioButtonValue + R"json(" 192 "name": ")json" + kActiveMinValueId + R"json(", 193 "caption": "Active Minimum", 201 "name": ")json" + kActiveMaxValueId + R"json(", 202 "caption": "Active Maximum", 210 "name": ")json" + kShowMessageButtonId + R"json(", 211 "caption": "Show Message...", 213 "parametersModel": )json" + kParametersModel + R"json( 217 "name": ")json" + kShowUrlButtonId + R"json(", 218 "caption": "Show Webpage...", 227 static const std::string kAlternativeSettingsModel =
228 1 + (
const char*) R
"json(" 235 "name": ")json" + kSettingsModelSettings + R"json(", 236 "caption": "Settings model", 237 "defaultValue": ")json" + kRegularSettingsModelOption + R"json(", 240 ")json" + kRegularSettingsModelOption + R"json(", 241 ")json" + kAlternativeSettingsModelOption + R"json(" 246 "caption": "Alternative GroupBox", 251 "name": "alternativeCheckBox", 252 "caption": "Alternative CheckBox", 257 "name": "alternativeTextField", 258 "caption": "Alternative TextField", 259 "defaultValue": "alternative text" 267 static const std::string kRegularSettingsModelPart1 = 1 + R
"json( 274 "name": ")json" + kSettingsModelSettings + R"json(", 275 "caption": "Settings model", 276 "defaultValue": ")json" + kRegularSettingsModelOption + R"json(", 279 ")json" + kRegularSettingsModelOption + R"json(", 280 ")json" + kAlternativeSettingsModelOption + R"json(" 285 "caption": "Example Stub DeviceAgent settings", 290 "name": "testTextField", 291 "caption": "Device Agent Text Field", 292 "description": "A text field", 293 "defaultValue": "a text" 297 "name": ")json" + kCitySelector + R"json(", 299 "defaultValue": "English", 301 ")json" + kEnglishOption + R"json(", 302 ")json" + kGermanOption + R"json(" 307 static const std::string kEnglishCitiesSettingsModelPart = 1 + R
"json( 309 "type": "RadioButtonGroup", 310 "name": "testEnglishRadioButtonGroup", 311 "caption": "Choose one", 312 "description": "Choose one option", 313 "defaultValue": "London", 322 static const std::string kGermanCitiesSettingsModelPart = 1 + R
"json( 324 "type": "RadioButtonGroup", 325 "name": "testGermanRadioButtonGroup", 326 "caption": "Choose one", 327 "description": "Choose one option", 328 "defaultValue": "Berlin", 338 static const std::string kRegularSettingsModelPart2 = 1 + R
"json(" 340 "type": "RadioButtonGroup", 341 "name": "testRadioButtonGroup", 342 "caption": "RadioButton Group", 343 "description": "Choose one option", 344 "defaultValue": "Cs_enodatum", 359 "K_gowerianus": "Kepplerites gowerianus", 360 "K_galilaeii": "Kepplerites galilaeii", 361 "S_calloviense": "Sigaloceras calloviense", 362 "S_micans": "Sigaloceras micans", 363 "Cs_enodatum": "Catasigaloceras enodatum", 364 "K_medea": "Kosmoceras medea", 365 "K_jason": "Kosmoceras jason", 366 "K_obductum": "Kosmoceras obductum", 367 "K_posterior": "Kosmoceras posterior" 371 "type": "CheckBoxGroup", 372 "name": "testCheckBoxGroup", 373 "caption": "CheckBox Group", 374 "description": "Choose one or several options", 375 "defaultValue": ["Coleoidea", "Nautiloidea"], 385 "Coleoidea": "Coleoidea (Bather, 1888)", 386 "Ammonoidea": "Ammonoidea (Zittel, 1884)", 387 "Nautiloidea": "Nautiloidea (Agassiz, 1847)", 388 "Orthoceratoidea": "Orthoceratoidea (M'Coy 1844)" 393 "caption": "Device Agent SpinBox (plugin side)", 394 "name": "pluginSideTestSpinBox", 400 "type": "DoubleSpinBox", 401 "caption": "Device Agent DoubleSpinBox", 402 "name": "testDoubleSpinBox", 403 "defaultValue": 3.1415, 409 "name": "testComboBox", 410 "caption": "Device Agent ComboBox", 411 "defaultValue": "value2", 412 "range": ["value1", "value2", "value3"], 415 "value1": "Device Agent Value #1", 416 "value2": "Device Agent Value #2", 417 "value3": "Device Agent Value #3" 425 "caption": "Device Agent CheckBox", 426 "name": "testCheckBox", 431 "caption": "Disabled Device Agent CheckBox", 432 "name": "disabledTestCheckBox", 433 "defaultValue": false, 438 "caption": "Hidden Device Agent CheckBox", 439 "name": "hiddenTestCheckBox", 440 "defaultValue": false, 445 "caption": "Customer Support", 446 "url": "https://example.com/" 454 "type": "Placeholder", 456 "description": "Description", 466 "caption": "Example section", 471 "caption": "Example Stub DeviceAgent settings section", 476 "name": "testTextFieldWithValidation", 477 "caption": "Hexadecimal number text field", 478 "defaultValue": "12ab34cd", 479 "validationRegex": "^[a-f0-9]+$", 480 "validationRegexFlags": "i", 481 "validationErrorMessage": 482 "Text must contain only digits and characters a-f, e.g. 12ab34cd." 485 "type": "PasswordField", 486 "name": "passwordField1", 487 "caption": "Password Field", 488 "description": "A password field", 489 "defaultValue": "1234", 490 "validationErrorMessage": "Password must contain only digits", 491 "validationRegex": "^[0-9]+$", 492 "validationRegexFlags": "i" 496 "caption": "Device Agent SpinBox (plugin side)", 497 "name": "pluginSideTestSpinBox2", 503 "type": "DoubleSpinBox", 504 "caption": "Device Agent DoubleSpinBox", 505 "name": "testDoubleSpinBox2", 506 "defaultValue": 3.1415, 512 "name": "testComboBox2", 513 "caption": "Device Agent ComboBox", 514 "defaultValue": "value2", 515 "range": ["value1", "value2", "value3"] 519 "caption": "Device Agent CheckBox", 520 "name": "testCheckBox2", 530 "caption": "Nested section", 535 "caption": "Example Stub DeviceAgent settings nested section", 539 "type": "SwitchButton", 540 "caption": "Switch Button", 541 "name": "testSwitch", 542 "description": "Tooltip for the switch button", 543 "defaultValue": false 547 "caption": "SpinBox Parameter", 548 "name": "testSpinBox3", 554 "type": "DoubleSpinBox", 555 "caption": "DoubleSpinBox Parameter", 556 "name": "testDoubleSpinBox3", 557 "defaultValue": 3.1415, 563 "name": "testComboBox3", 564 "caption": "ComboBox Parameter", 565 "defaultValue": "value2", 566 "range": ["value1", "value2", "value3"] 570 "caption": "CheckBox Parameter", 571 "name": "testCheckBox3", 582 "caption": ")json" + kActiveSettingsSectionCaption + R"json(", 587 "name": ")json" + kActiveComboBoxId + R"json(", 588 "caption": "Active ComboBox", 589 "defaultValue": "Some value", 594 ")json" + kShowAdditionalComboBoxValue + R"json(" 599 "name": ")json" + kActiveCheckBoxId + R"json(", 600 "caption": "Active CheckBox", 601 "defaultValue": false, 610 "name": "testTextField", 611 "caption": "Text Field Parameter", 612 "description": "A text field", 613 "defaultValue": "a text" 617 "caption": "Parameter Group", 622 "caption": "SpinBox Parameter", 623 "name": "testSpinBox", 629 "type": "DoubleSpinBox", 630 "caption": "DoubleSpinBox Parameter", 631 "name": "testDoubleSpinBox", 632 "defaultValue": 3.1415, 638 "caption": "ComboBox Parameter", 639 "name": "testComboBox", 640 "defaultValue": "value2", 641 "range": ["value1", "value2", "value3"] 645 "caption": "CheckBox Parameter", 646 "name": "testCheckBox", 651 "caption": "TextArea Parameter", 652 "name": "testTextArea" 660 "type": "RadioButtonGroup", 661 "name": ")json" + kActiveRadioButtonGroupId + R"json(", 662 "caption": "Active RadioButton Group", 663 "defaultValue": "Some value", 668 ")json" + kShowAdditionalRadioButtonValue + R"json(" 673 "name": ")json" + kActiveMinValueId + R"json(", 674 "caption": "Active Minimum", 682 "name": ")json" + kActiveMaxValueId + R"json(", 683 "caption": "Active Maximum", 691 "name": ")json" + kShowMessageButtonId + R"json(", 692 "caption": "Show Message...", 694 "parametersModel": )json" + kParametersModel + R"json( 698 "name": ")json" + kShowUrlButtonId + R"json(", 699 "caption": "Show Webpage...", Definition: apple_utils.h:6