OpenSCADAWiki: Home Page En/Doc/VC Aconcept/part4/part12 ...

Home | Index | Changes | Comments | Users | Registration | Login  Password:  
 
This is an old revision of HomePageEn/Doc/VCAconcept/part4/part12 from 2010-04-23 15:38:03..

4.11. The primitives of the widget

Any newly created widget is based on one of several primitives (finite element of the visualization) by installing of the related link as directly to the primitive, as well as through the several intermediate user widgets. Each of the primitives contains a mechanism (logic) of data model. A copy of the widget keeps the values of the properties of configuration of the the primitive specially for itself.


The purposes of the visualization interface includes support and work with the data model of the primitives of widgets. Primitives of the widget must be carefully developed and unitized in order to cover as many opportunities in the as possible to a smaller number of weakly connected with each other by their purpose primitives.


Table 4.11.a shows the list of primitives of widgets (basic elements of visualization).


Table 4.11.a. The library of the primitives of widgets (basic elements of visualization)

IdNameFunction
ElFigureElementary graphic figures

Primitive is the basis for drawing basic graphic shapes with their possible combinations in a single object. The support of the following basic figures is provided:

  • Line.
  • Arc.
  • Bézier curve.
  • Fill of the enclosed space.

For all the figures contained in the widget it is set the common properties of thickness, color, etc., but this does not exclude the possibility of indicating the above attributes for each figure separately.

FormElElements of the form.

Includes support for standard form components:

  • Line edit.
  • Text edit.
  • Check box.
  • Button.
  • Combo box.
  • List.
  • Slider.
  • Scroll bar.
TextTextText element (labels). Characterized by the type of font, color, orientation and alignment.
MediaMediaElement of visualization of raster and vector images of various formats, playback of animated images, playback of audio segments and playback of video fragments. Perhaps it should be included the OpenGL support!
DiagramDiagramElement of the diagram with the support of the visualization of the flow of several trends, the spectrum ... .
ProtocolProtocolElement of the protocol, visualizer of the system messages, with support for multiple operating modes.
DocumentDocumentThe element of generating the reports, journals and other documentation on the basis of available in the system data.
BoxContainerContains the mechanism fro other widgets placement with the purpose of creation of new, more complex widgets and pages of final visualization.
FunctionFunction of API of the object model of OpenSCADANot visual, on the side of execution, widget which allows to include a computing function of the object model of OpenSCADA in the VCA.

Each primitive, and the widget at all, contains the common set of properties/attributes in the composition which is shown in Table 4.11.b:


Table 4.11.b. The common set of properties/attributes in the widget

IdNameNumberValue
id Id - Id of the element. The attribute is read-only, designed to provide information on the ID of the element.
path Path - The path to the widget. The attribute is read-only and disigned to provide information about the location of the element.
parent Parent - Ancestor or parent of the widget. The attribute is read-only and designed to provide information about the location of ancestor from which the widget is inherited from.
root Root 1 Id of the widget-primitive (basic element) which underlies the image of visualization of the widget.
name Name - Name of the element. Modifiable element name.
dscr Description - Description of the element. Text field, serves for attachment to the widget of the brief description.
en Enabled 5 The state of the element - "Enabled". Disabled element is not shown in the execution mode.
active Active 6 The state of the element - "Active". Active element may receive focus in the execution mode, and thus receive keyboard and other events with their subsequent processing.
geomX Geometry:x 7 Geometry, coordinate 'x' of the element position.
geomY Geometry:y 8 Geometry, coordinate 'y' of the element position.
geomW Geometry:width 9 Geometry, the width of the element.
geomH Geometry:height 10 Geometry, the height of the element.
geomXsc Geometry:x scale 13 The horizontally scale of the element.
geomYsc Geometry:y scale 14 The vertical scale of the element.
geomZ Geometry:z 11 Geometry, coordinate 'z' (level) of element on the page. It also defines how to transfer the focus through active elements.
geomMargin Geometry:margin 12 Geometry, the fields of the element.
tipTool Tip:tool 15 The text of a brief help or tip on this element. Usually is realized as a tool tip, while keeping your mouse cursor over the element.
tipStatus Tip:status 16 Text information on the status of the element or guide to action over the element. Usually is realized in the form of a message in the status bar while keeping your mouse cursor over the element.
contextMenu Context menu 17

Configuration of the own context menu of the element. The configuration is stored as the lines of entries of context menu in the format:<Name of the entry>:<EventId>. Where:

  • <Name of the entry> - Name of the entry of menu.
  • <EventId> - Event Id which is generated to the widget (usr_<EventId>) while the selection the menu entry.
evProc Events process - Attribute for storing of the script of the processing of event of direct control of user interface. Script is the list of commands to the visualization interface generated at the event receipt (attribute event).
Additional attributes for items placed into the project in the role of a page.
pgOpen Page:open state - Sign "The page is open".
pgNoOpenProc Page:no open process - Sign "Execute the page, even if it is closed".
pgOpenSrc Page:open source 3 Full address of the page which has opened this one.
pgGrp Page:group 4 The group of the page.
Additional attributes of the execution mode.
event Event - Special attributes for the collection of events of the widget in the list, which is divided by the new line. This attribute is only available in the session. Access to the attribute is protected by the resource in order to avoid loss of events. An attribute is always available in the script of widget.
load Load -1 A virtual command of the group data download.
focus Focus -2 Special attribute of the indicating the fact of receiving the focus by an active widget. This attribute is only available in the session. Attribute of the widget and of the the embedded widgets is available in the script of widget.
perm Permition -3 Virtual attribute of the rights verification of active user on the viewing and control over the widget.

4.11.1. Elementary graphic figures (ElFigure)

Primitive is the basis for drawing basic graphic shapes with their possible combinations in a single object. Taking into account the wide range of various shapes, which must be maintained by the primitive, and at the same time the primitive must be simple enough for using and, if possible, for implementation, it was decided to limit the list of the basic figures used for the construction of the resulting graphics to these figures: line, arc, Bézier curve and fill of the enclosed spaces. Based at these basic figures, it is possible to construct derived figures by combining the basic. in the context of the primitive, there is possibility to set the transparency of the color in the range [0 .. 255], where '0'- complete transparency.


A list of additional properties/attributes of the primitive is given in Table 4.11.1.


Table 4.11.1. A list of additional properties/attributes of the primitive ElFigure

IdNameNumberValue
lineWdth Line:width 20 Line width.
lineClr Line:color 21 Line color.(Transparency of the color is defined as follows: red-127 | #ff0000-127, where "127" is the value of transparency.)
lineStyle Line:style 22 Line style (solid, dashed, dotted).
bordWdth Border:width 23 Line border width. The zero width indicates the lack of border.
bordClr Border:color 24 Border color.
fillColor Fill:color 25 Fill color.
fillImg Fill:image 26 Fill image.
orient Orientation angle 28 The rotation angle of the content of widget.
elLst Element's list 27

List of graphic primitives in the following format:

  • Line. Record form in the list: <line:p1 | (x | y):p2 | (x | y):[width | w{n}]:[color | c{n}]:[border_width | w{n}]:[border_color | c{n}]:[line_style | s{n}]>
  • Arc. Record form in the list: <arc:p1 | (x | y):p2 | (x | y):p3 | (x | y):p4 | (x | y):p5 | (x | y):[width | w{n}]:[color | c{n}]:[border_width | w{n}]:[border_color | c{n}]:[line_style | s{n}]>
Arc example with the points assignment (8 Kb)
  • Bézier curve. Record form in the list: <bezier:p1 | (x | y):p2 | (x | y):p3 | (x | y):p4 | (x | y):[width | w{n}]:[color | c{n}]:[border_width | w{n}]:[border_color | c{n}]:[line_style | s{n}]>
  • Fill. Record form in the list: <fill:p1 | (x | y),p2 | (x | y),...,pn | (x | y):[fillClr | c{n}]:[fillImg | i{n}]>
The attributes for each point from the list of graphic figures elLst
p{n}x Point {n}:x 30+n*6 Coordinates 'x' of the point {n}.
p{n}y Point {n}:y 30+n*6+1 Coordinates 'y' of the point {n}.
w{n} Width {n} 30+n*6+2 Width {n}.
ñ{n} Color {n} 30+n*6+3 Color {n}.
i{n} Image {n} 30+n*6+4 Image {n}.
s{n} Style {n} 30+n*6+5 Style {n}.

4.11.2. Element of the form (FormEl)

Primitive is intended to provide the standard form elements to the user. The general list of attributes depends on the type of element. A list of additional properties/attributes of the primitive is given in Table 4.11.2.


Table 4.11.2. A set of additional properties/attributes of primitive FormEl

IdNameNumberValue
elType Element type 20 Type of element (Line edit, Text edit, Check box, Button, Combo box, List, Slider, Scroll bar). On its value it is depended a list of additional attributes.
Line edit:
value Value 21 The contents of the line.
view View 22 Type of the editing line (Text; Combobox; Integer; Real Time, Date, Date and Time).
cfg Config 23

Configuration of the line. The format of the value of the field for different types of lines:

Text - the input template is indicated in the format of library QT.
Combobox - contains a list of the values of the editable combobox.
Integer - contains the configuration of input field of integer in the format: <Minimum>:<Maximum>:<Step of change>:<Prefix>:<Suffix>.
Real - contains the configuration of input field of real in the format: <Minimum>:<Maximum>:<Step of change>:<Prefix>:<Suffix>:<The number of digits after the decimal point>.
Time, Date, Date and time - to form the date following the the template with parameters:
d - number of the day (1-31);
dd - number of the day (01-31);
ddd - acronym of the day ("Mon" ... "Sun");
dddd - the 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 - the 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.
font Font 25 Text font in the full record {<Family> <Size> <Bold> <Italic> <Underline> <Strikeout>}.
Text edit:
value Value 21 The contents of the editor.
wordWrap Word wrap 22 Automatic division of text by the words.
font Font 25 Text font in the full record {<Family> <Size> <Bold> <Italic> <Underline> <Strikeout>}.
Check box:
name Name 26 Bame/label of the checkbox.
value Value 21 Value of the checkbox.
font Font 25 Text font in the full record {<Family> <Size> <Bold> <Italic> <Underline> <Strikeout>}.
Button:
name Name 26 Name, the inscription on the button.
value Value 21 The value for the settled button.
img Image 22 The image on the button.
color Color 23 Color of the button.
colorText Color:text 27 The color of the text.
checkable Checkable 24 Sign of functioning as a settled button.
font Font 25 Text font in the full record {<Family> <Size> <Bold> <Italic> <Underline> <Strikeout>}.
Combo box:
value Value 21 Current value of the list.
items Items 22 The entries of the list.
font Font 25 Text font in the full record {<Family> <Size> <Bold> <Italic> <Underline> <Strikeout>}.
List:
value Value 21 The selected list value.
items Items 22 The entries of the list.
font Font 25 Text font in the full record {<Family> <Size> <Bold> <Italic> <Underline> <Strikeout>}.
Slider and the scroll bar:
value Value 21 Slider position.
cfg Config 22

Configuratio of the slider in the format: <VertOrient>:<Min>:<Max>:<SinglStep>:<PageStep>. Where:

  • VertOrient - sign of a vertical orientation, the default is the horizontal orientation;
  • Min - minimum value
  • Max - maximum value;
  • SinglStep - the size of a single step;
  • PageStep -the size of the page step.

4.11.3. Text element (Text)

This primitive is designed to display the plain text used as labels, and different signatures. With the aim of creating a simple frequent decorations the primitive must support the surrounding of the text by frame. A list of additional properties/attributes of the primitive is given in Table 4.11.3.


Table 4.11.3. The list of additional properties/attributes of the primitive Text

IdNameNumberValue
backColor Background:color 20 Background color.
backImg Background:image 21 Background image.
bordWidth Border:width 22 Border width.
bordColor Border:color 23 Border color.
bordStyle Border:style 24 Border style (None;Dotted;Dashed;Solid;Double;Groove;Ridge;Inset;Outset).
font Font 25 Text font in the full record {<Family> <Size> <Bold> <Italic> <Underline> <Strikeout>}.
color Color 26 Text color.
orient Orientation angle 27 Orientation of text, rotation on angle.
wordWrap Word wrap 28 Automatic division of text by words.
alignment Alignment 29 Alignment of the text (Top left, top right, top center, top justify, the bottom left, bottom right, bottom justify; V center left, V center right, center ; V center justify).
text Text 30 The value of the text field.
numbArg Arguments number 40 Arguments number.
Attributes of the arguments
arg{x}val Argument {x}:value 50+10*x Argument value.
arg{x}tp Argument {x}:type 50+10*x+1 Argument type: "Integer", "Real", "String"
arg{x}cfg Argument {x}:config 50+10*x+2

Argument configuration:

  • string : [len] - string width;
  • real: [wdth];[form];[prec] - value width, the form of çíà÷åíèÿ ('g','f');
  • integer: [len] - value width.

4.11.4. Element of visualization of media materials (Media)

This primitive is designed to play different media materials, ranging from simple images to the full audio and video streams. Taking into the account the variety of ways and libraries for playing a full audio and video streams as well as a serious laboriousness of implementing of all of these mechanisms in this widget, it was decided at the initial stage, only to realize the work with images and with simple animated images and video formats. A list of additional features/attributes of the primitive is given in Table 4.11.4.


Table 4.11.4. A set of additional properties/attributes of primitive Media

IdNameNumberValue
backColor Background:color 20 Background color.
backImg Background:image 21 Background image.
bordWidth Border:width 22 Border width.
bordColor Border:color 23 Border color.
bordStyle Border:style 24 Border style (None;Dotted;Dashed;Solid;Double;Groove;Ridge;Inset;Outset).
src Source 25 Source of media data.
fit Fit to widget size 26 Sign "Ño-ordinate the contents with the size of the widget".
type Type 27 Type of media (Image;Movie).
areas Map areas 28 Number of active areas.
The attributes of the video (Movie)
speed Play speed 29 The speed of playback, as a percentage from the original speed. If the value is less than 1%, the playback stops.
Active areas
area{x}shp Area {x}:shape 40+3*x Type of the area (Rect;Poly;Circle).
area{x}coord Area {x}:coordinates 40+3*x+1 The coordinates of areas. Coordinates are separated by commas: "x1,y1,x2,y2,xN,yN"
area{x}title Area {x}:title 40+3*x+2 Title of the area.

4.11.5. Element of constructing diagrams/trends (Diagram)

This primitive is designed to construct various diagrams, including graphs/trends showing ongoing process and archive data. At this time, the following types of diagrams are realized:


The process of access to archive data is optimized, by means of an intermediate buffer for the display, as well as the package of traffic data in the query. A list of additional properties/attributes of the primitive is given in Table 4.11.5.


Table 4.11.5. A list of additional properties/attributes of the primitive Diagram

IdNameNumberValue
backColor Background:color 20 Background color.
backImg Background:image 21 Background image.
bordWidth Border:width 22 Border width.
bordColor Border:color 23 Border color.
bordStyle Border:style 24 Border style (None;Dotted;Dashed;Solid;Double;Groove;Ridge;Inset;Outset).
trcPer Tracing period (s) 25 Mode and frequency of tracing.
type Type 26 Diagram type: "Trend".
Attributes of the trend/graph (Trend)
tSek Time:sek 27 Current time, seconds.
tUSek Time:usek 28 Current time, microseconds.
tSize Size, sek 29 Size of the trend, seconds.
curSek Cursor:sek 30 Cursor position, seconds.
curUSek Cursor:usek 31 Cursor position, microseconds.
curColor Cursor:color 32 Cursor color.
sclColor Scale:color 33 Color of the scale/grid.
sclHor Scale:horizontal 34 Horizontal mode of the scale/grid: "No draw", "Grid;Markers" è "Grid and markers".
sclVer Scale:vertical 35 Vertical mode of the scale/grid: "No draw", "Grid", "Markers", "Grid and markers", "Grid (log)", "Marker (log)", "Grid and markers (log)".
sclVerScl Scale:vertical scale (%) 40 Graphic's vertical scale in percents.
sclVerSclOff Scale:vertical scale offset (%) 41 Offset of graphic's vertical scale in percents.
sclMarkColor Scale:Markers:color 36 Color of markers of the scale/grid.
sclMarkFont Scale:Markers:font 37 Font of markers of scale/grid in the form of {<Family> <Size> <Bold> <Italic> <Underline> <Strikeout>}.
valArch Value archivator 38 Archives of parameters archiver.
parNum Parameters number 39 The number of parameters that can be displayed on the one trend.
Individual attributes of the parameters of trend/graph
prm{X}addr Parametr {X} :address 50+10*{X} Full address to the parameter {X} or to the archive of values.
prm{X}bordL Parametr {X} :view border:lower 50+10*{X} +1 The lower limit of the parameter {X}.
prm{X}bordU Parametr {X} :view border:upper 50+10*{X} +2 The upper limit of the parameter {X}.
prm{X}color Parametr {X} :color 50+10*{X} +3 Color fro display of trend of the parameter {X}.
prm{X}val Parametr {X} :value 50+10*{X} +4 Value of the parameter {X} under the cursor.

4.11.6. The element of building the protocols based on the archives of messages (Protocol)

This primitive is designed to visualize the data of the archive of messages through the formation of protocols with different ways of visualization, starting from a static scanning view and finishing with dynamic tracing of protocol of message. A list of additional properties/attributes of the primitive is given in Table 4.11.6.


Table 4.11.6. A list of additional properties/attributes of the primitive Protocol

IdÈìÿÍîìåðÇíà÷åíèå
backColor Background:color 20 Background color.
backImg Background:image 21 Background image.
font Font 22 Text font in the full record {<Family> <Size> <Bold> <Italic> <Underline> <Strikeout>}.
headVis Header visible 23 Show header for table or not.
time Time, sek 24 Current time, seconds.
tSize Size, sek 25 Query size, seconds.
trcPer Tracing period (s) 26 Mode and frequency of tracing.
arch Archival 27 Archiver of the message archive.
tmpl Template 28 Template of the query in the archive.
lev Level 29 The level of messages.
viewOrd View order 30 View order ("By time", "By level", "By category", "By messages", "By time (reverse)", "By level (reverse)", "By category (reverse)", "By messages (reverse)").
col View columns 31 The displayed columns.
itProp Item's properties 32 Item's properties number.
Individual attributes of item's properties
it{X}lev Item {X}:level 40+5*{X} Criterion: element's level {X}. More or equal for pointed.
it{X}tmpl Item {X}:template 41+5*{X} Criterion: element's category template {X}. Include special symbols '*' and '?'.
it{X}fnt Item {X}:font 42+5*{X} Element {X} font.
it{X}ñolor Item {X}:color 43+5*{X} Element {X} color.

Action source page doesn't exist yet(/Home Page En / Doc / VC Aconcept / part 4 / part 12 / doc?)

4.11.8. Container (Box)

Primitive container is used to build composite widgets and/or the pages the user interface. A list of additional properties/attributes of the primitive is given in Table 4.11.8.


Table 4.11.8. A list of additional properties/attributes of the primitive Box

IdNameNumberValue
pgOpenSrc Page:open source 3 Full address of the page, which is included inside of the container.
pgGrp Page:group 4 The group of container of pages.
backColor Background:color 20 Background color.
backImg Background:image 21 Background image.
bordWidth Border:width 22 Border width.
bordColor Border:color 23 Border color.
bordStyle Border:style 24 Border style (None;Dotted;Dashed;Solid;Double;Groove;Ridge;Inset;Outset).

 
There are no files on this page.[Display files/form]
There is no comment on this page. [Display comments/form]