From OpenSCADAWiki
Jump to: navigation, search

Table. List of additional properties/attributes of the primitive "Element of the form (FormEl)"

Identifier Name Number Value
elType Element type 20 Type of the element, from which depends the list of additional attributes:
  • Line edit (0)
  • Text edit (1)
  • Check Box (2)
  • Button (3)
  • Combo box (4)
  • List (5)
  • Tree (8)
  • Table (9)
  • Slider (6)
  • Scroll bar (7)
Line edit:
value Value 21 Contents of the line.
view View 22 View of the editing line:
  • Text (0)
  • Combo Box (1)
  • Integer (2)
  • Real (3)
  • Time (4)
  • Date (5)
  • Date and Time (6)
  • Password (7)
cfg Configuration 23 Configuration of the line. Format of the value of the field for different views of the lines:
Text — configuration of the formatted input at the template with the parameters (supported only by Qt in UI.Vision):
A — ASCII alphabetic character required, [A-Za-z].
a — ASCII alphabetic character permitted but not required.
N — ASCII alphanumeric character required, [A-Za-z0-9].
n — ASCII alphanumeric character permitted but not required.
X — Any character required.
x — Any character permitted but not required.
9 — ASCII digit required, [0-9].
0 — ASCII digit permitted but not required.
D — ASCII digit required, [1-9].
d — ASCII digit permitted but not required.
# — ASCII digit or plus/minus sign permitted but not required.
H — Hexadecimal character required, [A-Fa-f0-9].
h — Hexadecimal character permitted but not required.
B — Binary character required, [0-1].
b — Binary character permitted but not required.
> — All following alphabetic characters are uppercased.
< — All following alphabetic characters are lowercased.
! — Switch off case conversion.
\\ — Use to shield the special characters listed above to use them as separators.
Combobox — list of values the editable combobox by lines.
Integer — integer value in the form: "{Min}:{Max}:{ChangeStep}:{Prefix}:{Suffix}".
Real — real value in the form: "{Min}:{Max}:{ChangeStep}:{Prefix}:{Suffix}:{SignsAfterDot}".
Time, Date, Date and time — to form the date following the template with the parameters:
d — number of the day (1-31);
dd — number of the day (01-31);
ddd — acronym of the day ("Mon" ... "Sun");
dddd — full name of the day ("Monday" ... "Sunday");
M — number of the month (1-12);
MM — number of the month (01-12);
MMM — acronym of the month ("Jan" ... "Dec");
MMMM — full name of the month ("January" ... "December");
yy — last two digits of the year;
yyyy — full year;
h — hour (0-23);
hh — hour (00-23);
m — minutes (0-59);
mm — minutes (00-59);
s — seconds (0-59);
ss — seconds (00-59);
AP,ap — to display AM/PM or am/pm.
confirm Confirm 24 Enable the confirming mode.
font Font 25 Font name in the form "{family} {size} {bold} {italic} {underline} {strike}", where:
  • "family" — font family, for spaces use symbol '_', like: "Arial", "Courier", "Times_New_Roman";
  • "size" — font size in pixels;
  • "bold" — font bold (0 or 1);
  • "italic" — font italic (0 or 1);
  • "underline" — font underlined (0 or 1);
  • "strike" — font struck (0 or 1).

Examples:

  • "Arial 10 1 0 0 0" — Arial font size 10 pixels and bold.
Text edit:
value Value 21 Content of the editor.
wordWrap Word wrap 22 Automatically wrap text by words.
confirm Confirm 24 Enable the confirming mode.
font Font 25 Font name in the form "{family} {size} {bold} {italic} {underline} {strike}" (details above).
Check box:
name Name 26 Name/label of the checkbox.
value Value 21 Value of the checkbox.
font Font 25 Font name in the form "{family} {size} {bold} {italic} {underline} {strike}" (details above).
Button:
name Name 26 Name-inscription on the button. Allowed symbols '\n' for multiple line names.
value Value 21 The value, different for modes:
  • "Standard" — repeating parameters of events on holding {delay}-{interval}, time in milliseconds;
  • "Checkable" — toggle value;
  • "Menu" — list of addresses of the menu elements like to /grp1/grp2/item1;
  • "Load" — description line {FilesTemplate}|{Header}|{FileByDefaultAndLoaded}|{FileMime} and loaded file content from next line. The files template like to "Images (*.png *.xpm *.jpg);;CSV-file (*.csv)".
  • "Save" — description line {FilesTemplate}|{Header}|{FileByDefault}|{FileMime} and saving file content from next line. The files template like to before one.
img Image 22 Image on the button. Image name in the view [{src}:]{name}, where:
  • "src" — source of the image:
    • file — directly from the local file by the path;
    • res — from the resources table of DB.
  • "name" — file path or identifier of the resource.

Examples:

  • "res:backLogo" — from the resources table of DB for the identifier "backLogo";
  • "backLogo" — like toe the previous;
  • "file:/var/tmp/backLogo.png" — from local file by the path "/var/tmp/backLogo.png".
color Color 23 Color of the button. Color name form "{color}[-{alpha}]", where:
  • "color" — standard color name or its numeric representation of three hexadecimal numbers of individual colors "#RRGGBB";
  • "alpha" — level of the alpha [0...255], where 0 — completely transparent.

Examples:

  • "red" — solid red color;
  • "#FF0000" — solid red color by the digital code;
  • "red-127" — half transparent red color.
colorText Color:text 27 Color of the text (details above).
mode Mode 24 Operation mode of the button:
  • "Standard" — normal button which allows repeating events on it hold, the parameters in "value";
  • "Checkable" — check button, values in "value";
  • "Menu" — opens menu on press, items list in "value";
  • "Load" — provides for loading of the user-space small files through the visual interface; on the mode the button press will open the selection file dialog for loading and the file content next saving to the attribute "value";
  • "Save" — provides for saving of the user-space small files through the visual interface; on the file content writing to the attribute "value" for user will: open the selecting/setting file dialog, save the attribute "value" content to the file, after the selecting, and set clean the attribute "value".
font Font 25 Font name in the form "{family} {size} {bold} {italic} {underline} {strike}" (details above).
List:
value Value 21 Current value of the list.
items Items 22 Entries of the list.
font Font 25 Font name in the form "{family} {size} {bold} {italic} {underline} {strike}" (details above).
mult Multiple selection 23 Allow for multiple entries selection of the list.
Combo box, Tree:
value Value 21 Current value of the list.
items Items 22 Entries of the list or hierarchical items list of the tree in path "/{DIR}/{DIR}/{ITEM}".
font Font 25 Font name in the form "{family} {size} {bold} {italic} {underline} {strike}" (details above).
Table:
set Setting value 23 Value of edition of a cell of the table which address in the event "ws_TableEdit_{colN}_{rowN}".
value Value 21 Address of the selected item. It changing follows by the event "ws_TableChangeSel". The address format depends from the table's selection mode:
  • "Cell" — cell address in the format "{row}:{col}".
  • "Row", "Column" — row-column number or cell content of the row-column key, which sets by the attribute "keyID".
items Elements 22

The table structure and content in the XML view:

<tbl>
<h><s>{Header1}</s><s>{Header2}</s></h>
<r><s>{Row1Column1String}</s><i>{Row1Column1Integer}</i></r>
<r><b>{Row2Column1Logical}</b><r>{Row2Column2Real}</r></r>
</tbl>

The tags:

"tbl" — Table, the properties at all:
  • "sel" — selection mode of the table items: "row" — by rows, "col" — by columns, "cell" — by cells (by default);
  • "keyID" — row-column number of the key, for the selection value get;
  • "colsWdthFit" — fits the columns size, in the unfixed size, to fill the full width of the table;
  • "hHdrVis", "vHdrVis" — visibility of the headers, for horizontal and vertical;
  • "sortEn" — enables sorting directly by the columns.
"h" — Row of the headers. Possible attributes of the header cell tag for the column as a whole:
  • "width" — column width, in pixels or percents (10%);
  • "edit" — allowing to the cells of the row edition (0 or 1), by default — no (0);
  • "color" — column color as a whole in the color name or code;
  • "colorText" — color of the column text as a whole in the color name or code;
  • "font" — font of the column text in the typical OpenSCADA string;
  • "prec" — value precision of the real type cells in the column;
  • "sort" — sorting by the column [0 - Ascending-default; 1 - Descending];
  • "align" — alignment the column for: "left", "right" and "center".
"r" — Row of the values. Possible attributes of the row cell tag for the row as a whole:
  • "color" — row color as a whole in the color name or code;
  • "colorText" — color of the row text as a whole in the color name or code;
  • "font" — font of the cell text in the typical OpenSCADA string;
  • "prec" — value precision of the real type cells in the row.
"s", "t", "i", "r", "b" — cells of the data types "String", "Text", "Integer", "Real" and "Logical". Possible attributes:
  • "color" — cell color;
  • "colorText" — color of the cell text in the color name or code;
  • "font" — font of the cell text in the typical OpenSCADA string;
  • "prec" — value precision of the real type cell;
  • "img" — image of the cell in the form "[{src}:]{name}", the details above;
  • "edit" — allowing the cell edition (0 or 1), by default - no (0);
  • "align" — alignment the cell for: "left", "right" and "center".
font Font 25 Font name in the form "{family} {size} {bold} {italic} {underline} {strike}" (the details above).
Slider and Scroll Bar:
value Value 21 Slider position.
cfg Configuration 22 Configuration of the slider in the format: "{VertOrient}:{Min}:{Max}:{SinglStep}:{PageStep}".

Where:

  • "VertOrient" — sign (0 or 1) of the vertical orientation, the default is the horizontal orientation;
  • "Min" — minimum value;
  • "Max" — maximum value;
  • "SinglStep" — size of a single step;
  • "PageStep" — size of a page step.