The Indicator panel module provides
access to the Scorpion Indicator panel.
The IndicatorpanelMatrix class
The IndicatorPanelMatrix class gives full access to the indicator
panels in Scorpion.
Use the function
- GetIndicatorPanelMatrix()
to retrieve an
instance of the class.
Attributes derived from the
TFrame class of the Indicator PanelMatrix class
Attribute |
Access |
Type |
Description |
name |
R |
string |
the internal name of the panel |
visible |
R/W |
0/1 |
the visibility of the IndicatorPanelMatrix |
caption |
R/W |
string |
the panel caption |
showCaption |
R/W |
0/1 |
visibility of the caption |
height |
R/W |
int |
height of panel |
rows |
R/W |
int |
no of rows in matrix |
columns |
R/W |
int |
no of columns in matrix |
manualUpdate |
R/W |
0/1 |
toggles default update on/off after inspection for
all panels |
Note: the manualUpdate attribute is set to 1 to manually update
indicatorpanels
Methods of the IndicatorPanelMatrix class
Method |
Returns |
Description |
getIndicatorPanel(row,col) |
Indicatorpanel |
returns a Indicatorpanel object given by zero
indexed row and column |
update() |
bool |
updates all panels |
changed() |
bool |
notifiesapplication application to save
configuration |
The StatePanel class
The StatePanel class is the base for the IndicatorPanel. This class derives
from Panel
and has some additional properties.
Attribute |
Access |
Type |
Description |
stateParam / parameter |
R/W |
string |
the parameter name in the tagdatabase used to
set the state of the panel after inspection. This property may
be left blank and the state property accessed directly in order to set
the indicator panel in wanted state |
captionParam |
R/W |
string |
the parameter name in the tagdatabase used to
set the caption of the panel after inspection. This property
may be left blank for static captions. |
undefColor |
R/W |
string |
the color when the panel is in an undefined
state |
okColor |
R/W |
string |
the color when the panel is in an ok/true state |
failColor |
R/W |
string |
the color when the panel is in an fail/false
state |
fontUndefColor |
R/W |
string |
the font color when the panel is in an undefined
state |
fontOkColor |
R/W |
string |
the font color when the panel is in an ok/true state |
fontFailColor |
R/W |
string |
the font color when the panel is in an fail/false
state |
state |
R/W |
int |
the current state, 0=undefined, 1=OK, 2=fail |
value |
R/W |
string |
additional text below the panel caption,
normally set by default by the valueParameter. If blank this
field is not shown |
The Indicatorpanel class
The IndicatorPanel class inherits from StatePanel is the individual panel in the IndicatorPanelMatrix. This class is derived from the panel
class and has some additional properties.
Attributes inherits from Panel of the Indicatorpanel class
Attribute |
Access |
Type |
Description |
valueParam |
R/W |
string |
the parameter name in the tagdatabase used to
set the value of the panel after inspection. This property may
be left blank and only the panel caption will be shown |
valueCaption |
R/W |
string |
caption of value field |
valueUnit |
R/W |
string |
unit of value field |
value |
R/W |
string |
the shown value |
manualUpdate |
R/W |
0/1 |
toggles default update on/off after inspection for
individual panel |
Example 1: Modify indicator panel
ipm=GetIndicatorPanelMatrix()
ipm.caption='DEMO FROM PYTHON'
ipm.showCaption=1
ipm.rows=2
ipm.columns=4
ipm.manualUpdate=1 # automatic update is turned off
for r in range(ipm.rows):
for c in range(ipm.columns):
p=ipm.getIndicatorPanel(r,c)
p.caption='IP['+str(r+1)+','+str(c+1)+']'
if p.state<2:
p.state=p.state+1
else:
p.state=0
f=p.font
f.name='New Courier'
f.color='blue'
f.size=12
f.bold=1
f.italic=1
Hint: To access CustomPanel1 and 2 together with resultpanel see
GetPanel.
|