PyANGKernel.GKViewMode¶
- class GKViewMode¶
A collection of
GKViewModeStyle.Details
Each style modifies an attribute for one object. A
GKViewModecan holdGKViewModeStylefor different attributes and objects.The internal name of the centroid configuration folder is “GKModel::viewModes” The external name is “View Modes”
Synopsis¶
Methods¶
def
__init__()def
addStyle()def
getActivation()def
getContext()def
getInterval()def
getRange()def
getSortStyle()def
getStyle()def
getStyles()def
initMode()def
isAutomatic()def
removeStyle()def
setActivation()def
setAutomatic()def
setSort()def
setSortStyle()def
sortAscending()def
usedType()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
- class DrawingPosition¶
- class Activation¶
Set this view mode automatically after the execution of a model?
- __init__()¶
- addStyle(astyle)¶
- Parameters:
astyle –
GKViewModeStyle
Adds a new style
If true and used a Time Series, allow the view to change the veh type and/or the originator
See also
- getActivation()¶
- Return type:
UnknownCommand
ActivationIf this mode uses time series, the context of these series. If several TS contains different context, the first one.
True if spots must be draw before the objects (false by default)
Returns the internal name
- getInterval()¶
- Return type:
If this mode uses time series, the interval of these series. If several TS contains different intervals, the first one.
- getRange(zoom, styleType, obj, modelConn, context[, dpiFactor=1.0])¶
- Parameters:
zoom – float
styleType –
GKViewModeStyleTypeobj –
GKObjectmodelConn –
GKModelConnectioncontext –
GKContextdpiFactor – float
- Return type:
- getRange(zoom, styleType, obj, context, modelConn[, position=GKViewMode.eCenter[, dpiFactor=1.0]])
- Parameters:
zoom – float
styleType –
GKViewModeStyleTypeobj –
GKObjectcontext –
GKContextmodelConn –
GKModelConnectionposition –
DrawingPositiondpiFactor – float
- Return type:
returns the range for the geo object
- getShowStyleInLegend(style)¶
- Parameters:
style –
GKViewModeStyle- Return type:
- getSortStyle()¶
- Return type:
Sorting style
- getStyle(name)¶
- Parameters:
name – str
- Return type:
Returns the style with internal name “name”
- getStyle(styleType, col)
- Parameters:
styleType –
GKViewModeStyleTypecol –
GKColumn
- Return type:
Returns the style having the style type and the column, otherwise returns NULL
- getStyle(zoom, styleType, obj, context, modelConn[, dpiFactor=1.0])
- Parameters:
zoom – float
styleType –
GKViewModeStyleTypeobj –
GKObjectcontext –
GKContextmodelConn –
GKModelConnectiondpiFactor – float
- Return type:
returns the style for the geo object
- getStylePosition(style)¶
- Parameters:
style –
GKViewModeStyle- Return type:
- getStyles()¶
- Return type:
.list of GKViewModeStyle
Return the current styles in this mode (as a list)
- initMode()¶
Initializes this mode before using it in a draw context (
G2DDrawContext). Adds the default mark style as this style is always present in any mode.Created automatically by a plug-in or by a user
- isStyleInThisMode(aStyle)¶
- Parameters:
aStyle –
GKViewModeStyle- Return type:
Returns whether the view mode style is in the view mode
- removeAllStyles()¶
Removes all styles
- removeStyle(astyle)¶
- Parameters:
astyle –
GKViewModeStyle
Removes the style
- setActivation(value)¶
- Parameters:
value –
Activation
UnknownCommand
Activation- setAllowColumnSelector(value)¶
- Parameters:
value – bool
If true and used a Time Series, allow the view to change the veh type and/or the originator
See also
- setAutomatic(value)¶
- Parameters:
value – bool
Created automatically by a plug-in or by a user
See also
- setDrawSpotsBeforeObjects(value)¶
- Parameters:
value – bool
True if spots must be draw before the objects (false by default)
- setInternalName(iname)¶
- Parameters:
iname – str
internal name of this mode… some functions requires some modes they use this attribute to find the mode (since the name is user editable and the ID depends of the moment of creation). Its a good idea to set a unique value for this field (among all the other modes).
- setShowStyleInLegend(style, showInLegend)¶
- Parameters:
style –
GKViewModeStyleshowInLegend – bool
- setSort(ascending, astyle)¶
- Parameters:
ascending – bool
astyle –
GKViewModeStyle
Sort by style the drawers when using this mode. Pass a NULL style to turn sorting off.
- setSortStyle(astyle)¶
- Parameters:
astyle –
GKViewModeStyle
Sort by style the drawers when using this mode. Pass a NULL style to turn sorting off.
- setStylePosition(style, position)¶
- Parameters:
style –
GKViewModeStyleposition –
DrawingPosition
Sorting order
Returns true is this mode contains any style for objects of type “type”