Aimsun Next Scripting: GView Class Reference
Aimsun Next Scripting  22
Public Types | Public Member Functions | Public Attributes | List of all members
GView Class Referenceabstract
Inheritance diagram for GView:
G2DView

Public Types

enum  GKHitModifier { eAll , eSelected , eUnselected }
 
enum  GKFloatingStringRelativePos {
  eAuto , eCenter , eLeft , eRight ,
  eTop , eBottom
}
 

Public Member Functions

 if (base)
 
Py_END_ALLOW_THREADS End GView (QWidget *parent=0, Qt::WindowFlags fl=Qt::WindowFlags())
 
virtual GDrawerfindDrawer (const GKGeoObject *key) const
 
virtual GDrawerremoveDrawer (const GKGeoObject *key)=0
 
virtual void invalidate ()
 
virtual const QHash< GKGeoObject *, GDrawer * > & getDrawers () const =0
 
virtual GDrawerHitfindClicked (const QPointF &, GKHitModifier=eAll, bool=false)
 
virtual QVector< GDrawerHit * > multiFindClicked (const QPointF &, GKHitModifier, bool=false)
 
virtual GDrawerHitfindClickedByType (const QPointF &p, GKType *type, GKHitModifier=eAll, bool=false)
 
virtual void selectAll ()
 
virtual void inverseSelection ()
 
virtual void populate ()=0
 
GKContextgetTimeContext ()
 
void setTimeContext (const GKContext &)
 
GKViewModegetMode () const
 
virtual void setMode (GKViewMode *)
 
virtual void panToObject (const GKGeoObject *)
 
virtual void setFloatingString (const QString &, const GKPoint &, GKFloatingStringRelativePos=eRight)
 
GGuigetGui ()
 
GKGeoModelgetGeoModel ()
 
GKProblemNetgetFilter () const
 
virtual void setFilter (GKProblemNet *)
 
virtual GKPoint screen2World (const QPointF &) const =0
 
virtual bool saveSnapshot (const QString &, const char *, GKBBox, int=-1, int=-1, bool=true)
 

Public Attributes

ConvertToSubClassCode Py_BEGIN_ALLOW_THREADS GViewbase = (GView*)( sipCpp )
 
 sipType = 0
 

Member Enumeration Documentation

◆ GKFloatingStringRelativePos

Enumerator
eAuto 
eCenter 
eLeft 
eRight 
eTop 
eBottom 

◆ GKHitModifier

Enumerator
eAll 
eSelected 
eUnselected 

Constructor & Destructor Documentation

◆ GView()

Py_END_ALLOW_THREADS End GView::GView ( QWidget *  parent = 0,
Qt::WindowFlags  fl = Qt::WindowFlags() 
)

Member Function Documentation

◆ findClicked()

virtual GDrawerHit * GView::findClicked ( const QPointF &  ,
GKHitModifier  = eAll,
bool  = false 
)
virtual

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
  • unselected objects
  • all the objects, selected or unselected

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).

Reimplemented in G2DView.

◆ findClickedByType()

virtual GDrawerHit * GView::findClickedByType ( const QPointF &  p,
GKType type,
GKHitModifier  = eAll,
bool  = false 
)
virtual

Find an object (and only object) of type "type" in where the point dp its interior to it. The modifier can be used to look only on:

  • select objects
  • unselected objects
  • all the objects, selected or unselected

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).

◆ findDrawer()

virtual GDrawer * GView::findDrawer ( const GKGeoObject key) const
virtual

Find a drawer in this view. Can return None

◆ getDrawers()

virtual const QHash< GKGeoObject *, GDrawer * > & GView::getDrawers ( ) const
pure virtual

Returns the list of all the drawers in this view

◆ getFilter()

GKProblemNet * GView::getFilter ( ) const

◆ getGeoModel()

GKGeoModel & GView::getGeoModel ( )

◆ getGui()

GGui & GView::getGui ( )

◆ getMode()

GKViewMode * GView::getMode ( ) const

◆ getTimeContext()

GKContext & GView::getTimeContext ( )

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

◆ if()

GView::if ( base  )
inline

References base, GKSystem::getSystem(), and sipType.

◆ invalidate()

virtual void GView::invalidate ( )
virtual

Marks this view as invalid forcing a redraw.

Reimplemented in G2DView.

◆ inverseSelection()

virtual void GView::inverseSelection ( )
virtual

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

Reimplemented in G2DView.

◆ multiFindClicked()

virtual QVector< GDrawerHit * > GView::multiFindClicked ( const QPointF &  ,
GKHitModifier  ,
bool  = false 
)
virtual

Find all the objects in where the point dp its interior to it. The modifier can be used to look only on:

  • select objects
  • unselected objects
  • all the objects, selected or unselected

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

Reimplemented in G2DView.

◆ panToObject()

virtual void GView::panToObject ( const GKGeoObject )
virtual

Makes the object key visible and centered in the view.

Reimplemented in G2DView.

◆ populate()

virtual void GView::populate ( )
pure virtual

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

◆ removeDrawer()

virtual GDrawer * GView::removeDrawer ( const GKGeoObject key)
pure virtual

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

◆ saveSnapshot()

virtual bool GView::saveSnapshot ( const QString &  ,
const char *  ,
GKBBox  ,
int  = -1,
int  = -1,
bool  = true 
)
virtual

Saves a snapshot of this view

  • If area is undefined takes a snap of the whole network
  • If area with and heifg are 0 takes a snap of the current view area
  • If the area is valid it takes a snap fo the area.

Reimplemented in G2DView.

◆ screen2World()

virtual GKPoint GView::screen2World ( const QPointF &  ) const
pure virtual

Implemented in G2DView.

◆ selectAll()

virtual void GView::selectAll ( )
virtual

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.

Reimplemented in G2DView.

◆ setFilter()

virtual void GView::setFilter ( GKProblemNet )
virtual

Reimplemented in G2DView.

◆ setFloatingString()

virtual void GView::setFloatingString ( const QString &  ,
const GKPoint ,
GKFloatingStringRelativePos  = eRight 
)
virtual

Shows a text over the view objects.

◆ setMode()

virtual void GView::setMode ( GKViewMode )
virtual

◆ setTimeContext()

void GView::setTimeContext ( const GKContext )

Sets the time context for this view: it uses only Now to know what time dependad information must be displayed on this view.

Member Data Documentation

◆ base

ConvertToSubClassCode Py_BEGIN_ALLOW_THREADS GView* GView::base = (GView*)( sipCpp )

Referenced by if().

◆ sipType

GView::sipType = 0

Referenced by if().

© Aimsun SLU
Aimsun ®