ADTF  v2.14.3
Sub Properties

For each property it is possible to set several Sub Properties.

The Sub Properties modify the behaviour of a view like the property view for the property.

Remarks
This will only modify the behaviour of a view and not the implementation of a IConfiguration.

The following Sub Properties are currently defined:

  • NSSUBPROP_DESCRIPTION
    Set this Sub Property to define a description text for the property. The property view will show the description text as an ballon popup.
    Example:
    SetPropertyStr("MyProperty" NSSUBPROP_DESCRIPTION, "My description");
    subproperty_description.png


  • NSSUBPROP_DIRECTORY
    Set this Sub Property to True to mark the property as a directory property. The property view will provide a folder-selection-dialog button for this property.
    Example:
    SetPropertyBool("MyProperty" NSSUBPROP_DIRECTORY, tTrue);


  • NSSUBPROP_DISPLAYNAME
    This Sub Property can be set to define which name is displayed for a property. The property name will be shown as an ballon popup in the property view.
    Example:
    SetPropertyStr("MyPropertyName", "My Property");
    SetPropertyStr("MyPropertyName" NSSUBPROP_DISPLAYNAME, "Display Property");

    subproperty_displayname.png


  • NSSUBPROP_DONTEXPORT
    Set this Sub Property to True to prevent this property to be stored in the configuration file. internal use


Example:

SetPropertyBool("MyProperty" NSSUBPROP_DONTEXPORT, tTrue);



  • NSSUBPROP_COLOR
    With this Sub Property, a property can be declared as a color, if it is set to True.
    Example:
    SetPropertyStr("background", "#000000");
    SetPropertyBool("background" NSSUBPROP_COLOR, tTrue);


  • NSSUBPROP_FILENAME
    Set this Sub Property to True to mark the property as a filename property. The property view will provide a file-selection-dialog button for this property.
    Example:
    SetPropertyBool("MyProperty" NSSUBPROP_FILENAME, tTrue);


  • NSSUBPROP_FILENAME_LIST
    Set this Sub Property to True to mark the property as a filename list property. The property view will provide a file-selection-dialog button for this property. One or more files can be selected.
    Example:
    SetPropertyBool("MyProperty" NSSUBPROP_FILENAME_LIST, tTrue);


  • NSSUBSUBPROP_FILENAME_LIST_SEPARATOR
    This Sub-Sub Property is used to separate the selected filenames. It can only be used in association with NSSUBPROP_FILENAME_LIST.
    Example:
    SetPropertyStr("MyPropertyFilenames", "C:\example.dat;C:\example2.dat");
    SetPropertyBool("MyPropertyFilenames" NSSUBPROP_FILENAME_LIST, tTrue);
    SetPropertyStr("MyPropertyFilenames" NSSUBPROP_FILENAME_LIST NSSUBSUBPROP_FILENAME_LIST_SEPARATOR, ";");


  • NSSUBSUBPROP_EXTENSIONFILTER
    This sub-Sub Property can be used to set the extension filter for the file-selection-dialog of the associated filename property. Currently this string is passed directly to Qt. So see the QFileDialog documentation for further details.
    It can only be used in association with NSSUBPROP_FILENAME or NSSUBPROP_FILENAME_LIST.
    Example:
    SetPropertyStr("MyProperty" NSSUBPROP_FILENAME NSSUBSUBPROP_EXTENSIONFILTER, "Dat Files (*.dat)");
    subproperty_extension.png


  • NSSUBPROP_HIDDEN
    Set this Sub Property to True to hide the property in the property view.
    Example:
    SetPropertyBool("MyProperty" NSSUBPROP_HIDDEN, tTrue);


  • NSSUBPROP_ISCHANGEABLE
    Set this Sub Property to define if this property can be changed at runtime. Changes to this property is either not possible or will have no effect if changed during runtime if this property is set to False. By overwriting the adtf::cConfiguration::PropertyChanged method you can react to changeds made to a property during runtime.
    Example:
    SetPropertyInt("MyPropertyChange", 999);
    SetPropertyBool("MyPropertyChange" NSSUBPROP_ISCHANGEABLE, tTrue);


  • NSSUBPROP_MAX
    Set this Sub Property to define the maximum value for the property. The user will not be able to set the property above the maximum value. Otherwise a error message will be shown "The value is outside the specified range!". The specified range is shown as an balloon popup in the property view.
    Example:
    SetPropertyInt("MyProperty" NSSUBPROP_MAX, 42);
    subproperty_minmax.png


  • NSSUBPROP_MIN
    Set this Sub Property to define the minimum value for the property. The user will not be able to set the property below the minimum value. Otherwise a error message will be shown "The value is outside the specified range!". The specified range is shown as an balloon popup in the property view.
    Example:
    SetPropertyInt("MyProperty" NSSUBPROP_MIN, -42);
    subproperty_minmax.png


  • NSSUBPROP_REQUIRED
    If this Sub Property is set to True the property is marked as mandatory.
    ADTF will make this Property available to the user in the Dialog that is used to determine the Pins and Properties based on the Configuration. Example:
    SetPropertyBool("MyProperty" NSSUBPROP_REQUIRED, tTrue);


  • NSSUBPROP_READONLY
    If this Sub Property is set to True, the property value cannot be changed within the property view.
    Example:
    SetPropertyInt("MyPropertyRedOnly", 999);
    SetPropertyBool("MyPropertyRedOnly" NSSUBPROP_READONLY, tTrue);


  • NSSUBPROP_VALUELIST
    With this Sub Property a value list can be defined for the property. The list items are separated by the character '|'. Each item consists of the value and its description separated by the character '@'. In the GUI a editable combo box will be shown.
    Notize: NSSUBPROP_VALUELIST is only supported by String Properties. For all other types this Sub Property will be converted into NSSUBPROP_VALUELISTNOEDIT. Example:
    SetPropertyInt("MyPropertyValueList", 1);
    SetPropertyStr("MyPropertyValueList" NSSUBPROP_VALUELIST, "1@One|2@Two|3@Three");

    subproperty_valuelist.png


  • NSSUBPROP_VALUELISTNOEDIT
    This Sub Property is the same as the Sub Property NSSUBPROP_VALUELIST. The only difference is that the combo box is not editable. This means, you cannot type other values, only select the predefined ones.
    Example:
    SetPropertyInt("MyPropertyValueList", 1);
    SetPropertyStr("MyPropertyValueList" NSSUBPROP_VALUELISTNOEDIT, 1@One|2@Two|3@Three");


  • NSSUBPROP_MULTI_LINE_TEXT_EDIT
    Set this Sub Property to True to mark the property as a multi line text edit property. The property view will provide a multi-line-text-edit-dialog button for this property. This is useful for longer descriptions or comments.
    Example:
    SetPropertyBool("MyProperty" NSSUBPROP_MULTI_LINE_TEXT_EDIT, tTrue);



Copyright © Audi Electronics Venture GmbH. All rights reserved. (Generated on Fri Mar 22 2019 by doxygen 1.8.10)