PyANGGui.GView¶
- class GView¶
Base class for
G2DViewand G3DViewInherited by:
G2DViewSynopsis¶
Methods¶
def
__init__()def
getFilter()def
getGeoModel()def
getGui()def
getMode()def
getModel()def
getTick()def
getTimeContext()
Virtual methods¶
def
clear()def
copy()def
copyIds()def
cut()def
findClicked()def
findDrawer()def
getDrawers()def
getWidget()def
invalidate()def
panToObject()def
paste()def
populate()def
removeDrawer()def
screen2World()def
selectAll()def
setFilter()def
setMode()def
setTick()
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:
agui –
GGuiamodel –
GKModelparent –
QWidgetfl – Combination of
WindowType
- clear()¶
- copy()¶
- copyIds()¶
- cut()¶
- findClicked(arg__1[, arg__2=GView.GKHitModifier.eAll[, arg__3=false]])¶
- Parameters:
arg__1 –
QPointFarg__2 –
GKHitModifierarg__3 – bool
- Return type:
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:
p –
QPointFtype –
GKTypearg__3 –
GKHitModifierarg__4 – bool
- Return type:
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:
p –
QPointFtype –
GKTypeincludeSuperTypes – bool
modifier –
GKHitModifierinclude_non_editable – bool
- Return type:
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:
key –
GKGeoObject- Return type:
Find a drawer in this view. Can return nullptr
- getActiveExperiment()¶
- Return type:
- getActiveScenario()¶
- Return type:
- 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
- getMode()¶
- Return type:
The model that this view represents
Returns the current tick
Time context for this view: it uses only Now to know what time dependant information must be displayed on this view.
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:
arg__1 –
QPointFarg__2 –
GKHitModifierarg__3 – bool
- 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__1 –
GKGeoObject
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
GGuiafter a preferences change. The implementation here just callsinvalidate- abstractmethod removeDrawer(key)¶
- Parameters:
key –
GKGeoObject- Return type:
Removes a drawer from the list of drawers for a specific object and returns it. The drawer is not deleted.
- 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:
exp –
GKGenericExperiment
In which scenario (if any) is the user working? * If exp is null,
GKModelactive experiment will be assigned- setFilter(afilter)¶
- Parameters:
afilter –
GKProblemNet
- setFloatingString(str, p[, rp=GView.GKFloatingStringRelativePos.eRight])¶
- Parameters:
str – str
p –
GKPoint
Shows a text over the view objects
- setMode(amode)¶
- Parameters:
amode –
GKViewMode
- setTick(t)¶
- Parameters:
t – int
Set the tick