PyANGKernel.GKViewMode

class GKViewMode

A collection of GKViewModeStyle .

Details

Each style modifies an attribute for one object. A GKViewMode can hold GKViewModeStyle for different attributes and objects.

The internal name of the centroid configuration folder is “GKModel::viewModes” The external name is “View Modes”

Inheritance diagram of PyANGKernel.GKViewMode

Synopsis

Methods

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:

astyleGKViewModeStyle

Adds a new style

allowColumnSelector()
Return type:

bool

If true and used a Time Series, allow the view to change the veh type and/or the originator

getActivation()
Return type:

Activation

UnknownCommand Activation

getContext()
Return type:

GKContext

If this mode uses time series, the context of these series. If several TS contains different context, the first one.

getDrawSpotsBeforeObjects()
Return type:

bool

True if spots must be draw before the objects (false by default)

getInternalName()
Return type:

str

Returns the internal name

getInterval()
Return type:

GKTimeDuration

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:
Return type:

GKViewModeStyleRange

getRange(zoom, styleType, obj, context, modelConn[, position=GKViewMode.eCenter[, dpiFactor=1.0]])
Parameters:
Return type:

GKViewModeStyleRange

returns the range for the geo object

getShowStyleInLegend(style)
Parameters:

styleGKViewModeStyle

Return type:

bool

getSortStyle()
Return type:

GKViewModeStyle

Sorting style

getStyle(name)
Parameters:

name – str

Return type:

GKViewModeStyle

Returns the style with internal name “name”

getStyle(styleType, col)
Parameters:
Return type:

GKViewModeStyle

Returns the style having the style type and the column, otherwise returns NULL

getStyle(zoom, styleType, obj, context, modelConn[, dpiFactor=1.0])
Parameters:
Return type:

GKViewModeStyle

returns the style for the geo object

getStylePosition(style)
Parameters:

styleGKViewModeStyle

Return type:

DrawingPosition

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.

isAutomatic()
Return type:

bool

Created automatically by a plug-in or by a user

isStyleInThisMode(aStyle)
Parameters:

aStyleGKViewModeStyle

Return type:

bool

Returns whether the view mode style is in the view mode

removeAllStyles()

Removes all styles

removeStyle(astyle)
Parameters:

astyleGKViewModeStyle

Removes the style

setActivation(value)
Parameters:

valueActivation

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

setAutomatic(value)
Parameters:

value – bool

Created automatically by a plug-in or by a user

See also

isAutomatic()

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:
setSort(ascending, astyle)
Parameters:

Sort by style the drawers when using this mode. Pass a NULL style to turn sorting off.

setSortStyle(astyle)
Parameters:

astyleGKViewModeStyle

Sort by style the drawers when using this mode. Pass a NULL style to turn sorting off.

setStylePosition(style, position)
Parameters:
sortAscending()
Return type:

bool

Sorting order

usedType(type)
Parameters:

typeGKType

Return type:

bool

Returns true is this mode contains any style for objects of type “type”