PyANGGui.GView

class GView

Base class for G2DView and G3DView

Inheritance diagram of PyANGGui.GView

Inherited by: G2DView

Synopsis

Methods

Virtual 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 GKHitModifier
class GKFloatingStringRelativePos
__init__(agui, amodel[, parent=None[, fl=Qt.WindowFlags()]])
Parameters:
clear()
copy()
copyIds()
cut()
findClicked(arg__1[, arg__2=GView.GKHitModifier.eAll[, arg__3=false]])
Parameters:
Return type:

GDrawerHit

Find an object (and only object) in where the point dp its interior to it. The modifier can be used to look only on: - select objects - deselected objects - all the objects, selected or deselected

Also an additional parameter to extend the search to non_editable layers can be specified.

This method stops when it founds the first suitable object. On a 2D View the layer order is used (top layers are used first).

findClickedByType(p, type[, arg__3=GView.GKHitModifier.eAll[, arg__4=false]])
Parameters:
Return type:

GDrawerHit

Find an object (and only one object) of type “type”or any supertype in where the point p its interior to it. The modifier can be used to look only on: - select objects - deselected objects - all the objects, selected or deselected

Also an additional parameter to extend the search to non_editable layers can be specified.

On a 2D View the layer order is used (top layers are used first).

findClickedByType(p, type, includeSuperTypes[, modifier=GView.GKHitModifier.eAll[, include_non_editable=false]])
Parameters:
Return type:

GDrawerHit

Find an object (and only one object) of type “type” in where the point p its interior to it. The modifier can be used to look only on: - select objects - deselected objects - all the objects, selected or deselected

Also an additional parameter to extend the search to non_editable layers can be specified. Also an additional parameter to specify whether the object can be of a supertype type can be specified.

On a 2D View the layer order is used (top layers are used first).

findDrawer(key)
Parameters:

keyGKGeoObject

Return type:

GDrawer

Find a drawer in this view. Can return nullptr

getActiveExperiment()
Return type:

GKGenericExperiment

getActiveScenario()
Return type:

GKGenericScenario

abstractmethod getDrawers()
Return type:

Dictionary with keys of type .GKGeoObject and values of type GDrawer.

Returns the list of all the drawers in this view

getFilter()
Return type:

GKProblemNet

getGeoModel()
Return type:

GKGeoModel

getGui()
Return type:

GGui

getMode()
Return type:

GKViewMode

getModel()
Return type:

GKModel

The model that this view represents

getTick()
Return type:

int

Returns the current tick

getTimeContext()
Return type:

GKContext

Time context for this view: it uses only Now to know what time dependant information must be displayed on this view.

getWidget()
Return type:

QWidget

Returns the widget where this view is.

invalidate()

Marks this view as invalid forcing a redraw.

inverseSelection()

Inverses the current selection. Objects selected will be deselected and objects deselected will be selected. Note that a drawer can refuse a selection, so this command will not affected it.

multiFindClicked(arg__1, arg__2[, arg__3=false])
Parameters:
Return type:

.list of GDrawerHit

Find all the objects in where the point dp its interior to it. The modifier can be used to look only on: - select objects - deselected objects - all the objects, selected or deselected

Also an additional parameter to extend the search to non_editable layers can be specified.

panToObject(arg__1)
Parameters:

arg__1GKGeoObject

Makes the object visible and centered in the view

paste()
pasteAtLocation()
abstractmethod populate()

Create drawers for all the objects in the geo model and add them to the view.

preferencesChanged()

Called by the GGui after a preferences change. The implementation here just calls invalidate

abstractmethod removeDrawer(key)
Parameters:

keyGKGeoObject

Return type:

GDrawer

Removes a drawer from the list of drawers for a specific object and returns it. The drawer is not deleted.

abstractmethod screen2World(scrCoor)
Parameters:

scrCoorQPointF

Return type:

GKPoint

selectAll()

Select all the geo objects. This command uses the drawers in this view in order to know which objects can be selected. Note that a drawer can make non selectable an object and that this setting is per view and not per model.

setActiveExperiment(exp)
Parameters:

expGKGenericExperiment

In which scenario (if any) is the user working? * If exp is null, GKModel active experiment will be assigned

setFilter(afilter)
Parameters:

afilterGKProblemNet

setFloatingString(str, p[, rp=GView.GKFloatingStringRelativePos.eRight])
Parameters:

Shows a text over the view objects

setMode(amode)
Parameters:

amodeGKViewMode

setTick(t)
Parameters:

t – int

Set the tick