Aimsun Next Scripting: GKViewModeStyle Class Reference
Aimsun Next Scripting  22
Public Types | Public Member Functions | List of all members
GKViewModeStyle Class Reference
Inheritance diagram for GKViewModeStyle:
GKObject GKBaseObject

Public Types

enum  GKViewModeStyleType {
  eColor = 0 , ePenWidth = 1 , ePenStyle = 2 , eBrushStyle = 3 ,
  eSpot = 4 , eHide = 5 , eAlpha = 6 , eAttribute = 7 ,
  eDiagram = 8 , eStackedBands = 9
}
 
enum  GKViewModeStyleVariableType { eContinuous , eDiscrete }
 
enum  GKViewModeStyleColorType { eBoth , ePen , eBrush }
 
- Public Types inherited from GKObject
enum  IdentifierFormFlag {
  eIdentifierDefault , eIdentifierId , eIdentifierName , eIdentifierExternalId ,
  eIdentifierTypeExternalName , eIdentifierDescription , eIdentifierStandard , eIdentifierStandardWithType ,
  eIdentifierAll
}
 
enum  GKLockType { eNone , eModification , eDelete , eModificationDelete }
 
enum  GKObjectStatus { eNew , eSaved , eModified , eDeleted }
 
typedef QFlags< GKObject::IdentifierFormFlagIdentifierForm
 

Public Member Functions

 GKViewModeStyle ()
 
 ~GKViewModeStyle ()
 
void setStyleType (GKViewModeStyleType)
 
GKViewModeStyleType getStyleType () const
 
void setVariableType (GKViewModeStyleVariableType)
 
GKViewModeStyleVariableType getVariableType () const
 
void setColorType (GKViewModeStyleColorType aType)
 
GKViewModeStyleColorType getColorType () const
 
bool usesColumn (const GKColumn *) const
 
void setColumn (GKType *, GKColumn *)
 
GKColumngetColumn () const
 
GKTypegetTypeOwner () const
 
void setDividerColumn (GKColumn *acol)
 
GKColumngetDividerColumn () const
 
void setUseNormalizing (bool normalize)
 
bool useMaxNormalizing () const
 
void addRange (GKViewModeStyleRange *)
 
void removeRange (GKViewModeStyleRange *)
 
const QList< GKViewModeStyleRange * > & getRanges () const
 
void removeAllRanges ()
 
GKViewModeStyleRangeaddRange (double, double, bool=false)
 
GKViewModeStyleRangeaddRange (double, bool=false)
 
GKViewModeStyleRangeaddRange (const QString &, bool=false)
 
GKViewModeStyleRangegetRange (GKObject *obj, const GKModelConnection *modelConn, const GKContext &context)
 
GKViewModeStyleRangegetRange (double from, double to=0.0) const
 
GKViewModeStyleRangegetRange (const QString &value) const
 
QMap< int, GKViewModeStyleRange * > getRangesForStackedBandsColumns (GKObject *obj, const GKModelConnection *modelConn, const GKContext &context)
 
void setUnits (const GK::SizeUnits &)
 
GK::SizeUnits getUnits () const
 
GKViewModeStyleRangegetDefaultRange () const
 
void setDefaultRange (GKViewModeStyleRange *)
 
void sortRanges ()
 
bool isScaleDependand () const
 
uint getFromScale () const
 
uint getToScale () const
 
bool visibleAtThisScale (uint) const
 
void setScaleDependand (bool)
 
void setDrawScale (uint, uint)
 
void setLabelDecimalPlaces (uint value)
 
void setLabelRoundingToZeroPlaces (uint value)
 
uint getLabelDecimalPlaces () const
 
uint getLabelRoundingToZeroPlaces () const
 
bool doRotate () const
 
void setDoRotate (bool rotate)
 
void setInternalName (const QString &)
 
const QString & getInternalName () const
 
void setCondition (GKMultiCondition cond)
 
GKMultiCondition getCondition () const
 
bool matchCondition (GKObject *obj, const GKModelConnection *modelConn, const GKContext &context=GKContext::anyContext)
 
double getMaxNormalizer () const
 
void setMaxNormalizer (double value)
 
void setShowLabelAsPercentage (bool enabled)
 
bool showLabelAsPercentage () const
 
- Public Member Functions inherited from GKObject
 GKObject ()
 
 GKObject (const GKObject &o)
 
virtual void addedToCatalog ()
 
virtual void removedFromCatalog ()
 
uint getTick () const
 
virtual void increaseTick ()
 
void setTick (uint t)
 
virtual GKObjectclone (bool addItToModel=true) const
 
virtual GKObjectcloneAsTemporary (bool addItToModel=true) const
 
GKFoldergetCreateRootFolder ()
 
GKFoldergetRootFolder () const
 
void setRootFolder (GKFolder *afolder)
 
GKFolderfindFolder (const QString &byName) const
 
QVector< GKFolder * > getParentFolders () const
 
bool isDataValueNull (const GKColumn *attr) const
 
virtual QVariant * getDataValue (const GKColumn *attr, bool *deleteit, const GKContext &context=GKContext::anyContext) const
 
QVariant * getDataValueByID (uint attrId, bool *deleteit, const GKContext &context=GKContext::anyContext) const
 
virtual void setDataValue (const GKColumn *attr, const QVariant &v)
 
void setDataValueByID (uint attrId, const QVariant &v)
 
virtual void setDataValueObject (const GKColumn *attr, const GKObject *obj)
 
void setDataValueObjectByID (uint attrId, const GKObject *obj)
 
virtual void setDataValueDouble (const GKColumn *attr, double v)
 
void setDataValueDoubleByID (uint attrId, double v)
 
virtual double getDataValueInTS (const GKColumn *attr, GKTimeSerieIndex index, double *deviation=NULL) const
 
double getDataValueInTSByID (uint attrId, GKTimeSerieIndex index, double *deviation=NULL) const
 
bool hasAnyTSWithData () const
 
virtual GKTimeSeriegetDataValueTS (const GKColumn *attr) const
 
GKTimeSeriegetDataValueTSByID (uint attrId) const
 
virtual void setDataValueInTS (const GKColumn *attr, GKTimeSerieIndex index, double value, double deviation, GKTSDescription *aDescription=NULL, int reservedSize=0)
 
virtual void setDataValueInTS (const GKColumn *attr, GKTimeSerieIndex index, double value, double deviation, double lowerValue, GKTSDescription *aDescription=NULL, int reservedSize=0)
 
virtual void setDataValueInSingleTS (const GKColumn *attr, GKTimeSerieIndex index, double value, double deviation, GKTSDescription *aDescription)
 
void setDataValueInTSByID (uint attrId, GKTimeSerieIndex index, double value, double deviation, GKTSDescription *aDescription=NULL, int reservedSize=0)
 
virtual void setAggregatedValueInTS (const GKColumn *attr, double value, double deviation, GKTSDescription *aDescription=NULL)
 
void setAggregatedValueInTSByID (uint attrId, double value, double deviation, GKTSDescription *aDescription=NULL)
 
virtual void clearDataValueTS (const GKColumn *attr, GKTSDescription *aDescription=NULL)
 
void clearDataValueTSByID (uint attrId, GKTSDescription *aDescription=NULL)
 
virtual int getDataValueInt (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const
 
int getDataValueIntByID (uint attrId, const GKContext &context=GKContext::anyContext) const
 
virtual double getDataValueDouble (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const
 
double getDataValueDoubleByID (uint attrId, const GKContext &context=GKContext::anyContext) const
 
QString getDataValueString (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const
 
QString getDataValueStringByID (uint attrId, const GKContext &context=GKContext::anyContext) const
 
virtual bool getDataValueBool (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const
 
bool getDataValueBoolByID (uint attrId, const GKContext &context=GKContext::anyContext) const
 
virtual GKObjectgetDataValueObject (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const
 
GKObjectgetDataValueObjectByID (uint attrId, const GKContext &context=GKContext::anyContext) const
 
QDate getDataValueDate (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const
 
QDate getDataValueDateByID (uint attrId, const GKContext &context=GKContext::anyContext) const
 
QTime getDataValueTime (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const
 
QTime getDataValueTimeByID (uint attrId, const GKContext &context=GKContext::anyContext) const
 
QDateTime getDataValueDateTime (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const
 
QDateTime getDataValueDateTimeByID (uint attrId, const GKContext &context=GKContext::anyContext) const
 
GKTimeDuration getDataValueTimeDuration (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const
 
GKTimeDuration getDataValueTimeDurationByID (uint attrId, const GKContext &context=GKContext::anyContext) const
 
void removeDataValue (const GKColumn *attr)
 
void removeDataValueByID (uint attrId)
 
const QString & getDescription () const
 
void setDescription (const QString &adescription)
 
const QString & getExternalId () const
 
void setExternalId (const QString &anId)
 
virtual GKObjectDelCmd * getDelCmd ()
 
virtual GKObjectConnectionDelCmd * getDelConnectionCmd (GKObject *target)
 
virtual void nonCommandObjectRemoved (GKObject *)
 
virtual void init ()
 
virtual void setId (uint aid, GKModel *model)
 
uint getId () const
 
QUuid getUUID () const
 
virtual void setName (const QString &aname)
 
const QString & getName () const
 
QString getExtendedId (IdentifierForm form=eIdentifierDefault) const
 
QString getNameOrExtendedId (IdentifierForm form=eIdentifierDefault) const
 
virtual const QString & getTypeName () const
 
virtual QString getTypeExternalName () const
 
const GKObjectgetMaster () const
 
GKTypegetType () const
 
virtual void setType (GKType *atype)
 
bool isA (const GKType *atype) const
 
bool isA (const QString &typeName) const
 
virtual void setModel (GKModel *amodel)
 
GKModelgetModel () const
 
virtual void setLock (GKLockType atype)
 
GKLockType getLock () const
 
virtual bool canBeDeleted () const
 
virtual bool canBeModified () const
 
virtual bool canBeEdited () const
 
GKObjectStatus getStatus () const
 
virtual void setStatus (const GKObjectStatus astatus)
 
void notifyStatusChange ()
 
bool isTemporary () const
 
void setTemporary (bool value)
 
bool isExternal () const
 
void setExternal (bool value)
 
virtual void preferencesChanged ()
 
void removeColumn (GKColumn *column)
 
void resetColumn (GKColumn *column)
 
- Public Member Functions inherited from GKBaseObject
 GKBaseObject ()
 
 if (base)
 
virtual uint getId () const =0
 
virtual const QString & getTypeName () const =0
 
virtual QString getTypeExternalName () const =0
 
virtual const GKObjectgetMaster () const =0
 
virtual const QString & getName () const =0
 
virtual const QString & getExternalId () const =0
 
virtual const QString & getDescription () const =0
 
virtual GKModelgetModel () const =0
 
virtual QVariant * getDataValue (const GKColumn *attr, bool *deleteit, const GKContext &context=GKContext::anyContext) const =0
 
virtual QVariant * getDataValueByID (uint attrId, bool *deleteit, const GKContext &context=GKContext::anyContext) const =0
 
virtual double getDataValueInTS (const GKColumn *attr, GKTimeSerieIndex index, double *deviation=NULL) const =0
 
virtual double getDataValueInTSByID (uint attrId, GKTimeSerieIndex index, double *deviation=NULL) const =0
 
virtual GKTimeSeriegetDataValueTS (const GKColumn *attr) const =0
 
virtual GKTimeSeriegetDataValueTSByID (uint attrId) const =0
 
virtual int getDataValueInt (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0
 
virtual int getDataValueIntByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0
 
virtual double getDataValueDouble (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0
 
virtual double getDataValueDoubleByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0
 
virtual QString getDataValueString (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0
 
virtual QString getDataValueStringByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0
 
virtual bool getDataValueBool (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0
 
virtual bool getDataValueBoolByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0
 
virtual GKObjectgetDataValueObject (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0
 
virtual GKObjectgetDataValueObjectByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0
 
virtual QDate getDataValueDate (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0
 
virtual QDate getDataValueDateByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0
 
virtual QTime getDataValueTime (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0
 
virtual QTime getDataValueTimeByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0
 
virtual QDateTime getDataValueDateTime (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0
 
virtual QDateTime getDataValueDateTimeByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0
 
virtual GKTimeDuration getDataValueTimeDuration (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0
 
virtual GKTimeDuration getDataValueTimeDurationByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0
 

Additional Inherited Members

- Public Attributes inherited from GKBaseObject
ConvertToSubClassCode Py_BEGIN_ALLOW_THREADS GKBaseObjectbase = (GKBaseObject*)sipCpp
 
 sipType = 0
 
- Static Public Attributes inherited from GKObject
static uint typeNameAtt
 
static uint typeExternalNameAtt
 
static uint revisedAtt
 
- Static Public Attributes inherited from GKBaseObject
Py_END_ALLOW_THREADS static End uint idAtt
 
static uint nameAtt
 
static uint externalIdAtt
 
static uint descriptionAtt
 

Detailed Description

It has several entries, each entry contains a range of values. In function of the object attribute value one of the entries is chosen. Note that a GKViewModeStyle modifies only one visualization attribute.

The internal name of the centroid configuration folder is "GKModel::viewStyles" The external name is "View Styles"

Member Enumeration Documentation

◆ GKViewModeStyleColorType

This enum defines the way the brush and the pen are affected:

  • ePen: only the pen is visible and modified, no special brush is drawn.
  • eBrush: only the brush is visible and modified, no special pen is drawn.
  • eBoth: like eBrush, but with a black solid pen.
Enumerator
eBoth 
ePen 
eBrush 

◆ GKViewModeStyleType

This enum defines the various visualization attributes that can be modified.

Warning
keep GKViewModeStyleTypeSize consistent with it.
Enumerator
eColor 
ePenWidth 
ePenStyle 
eBrushStyle 
eSpot 
eHide 
eAlpha 
eAttribute 
eDiagram 
eStackedBands 

◆ GKViewModeStyleVariableType

This enum defines if the visualization attribute will be modified discretely (one value per range) or continuously (interpolated values).

Enumerator
eContinuous 
eDiscrete 

Constructor & Destructor Documentation

◆ GKViewModeStyle()

GKViewModeStyle::GKViewModeStyle ( )

◆ ~GKViewModeStyle()

GKViewModeStyle::~GKViewModeStyle ( )

Member Function Documentation

◆ addRange() [1/4]

GKViewModeStyleRange * GKViewModeStyle::addRange ( const QString &  ,
bool  = false 
)

adds a regexp string value DISCRETE

◆ addRange() [2/4]

GKViewModeStyleRange * GKViewModeStyle::addRange ( double  ,
bool  = false 
)

adds a range value DISCRETE

◆ addRange() [3/4]

GKViewModeStyleRange * GKViewModeStyle::addRange ( double  ,
double  ,
bool  = false 
)

adds a range entry as: [from, to) CONTINUOUS

◆ addRange() [4/4]

void GKViewModeStyle::addRange ( GKViewModeStyleRange )

Adds a new range.

◆ doRotate()

bool GKViewModeStyle::doRotate ( ) const

Returns true if the view mode style rotates the painting according to the object's angle.

◆ getColorType()

GKViewModeStyleColorType GKViewModeStyle::getColorType ( ) const

Returns the color type.

◆ getColumn()

GKColumn * GKViewModeStyle::getColumn ( ) const

Returns the column.

◆ getCondition()

GKMultiCondition GKViewModeStyle::getCondition ( ) const

Returns the condition.

◆ getDefaultRange()

GKViewModeStyleRange * GKViewModeStyle::getDefaultRange ( ) const

returns the default range

◆ getDividerColumn()

GKColumn * GKViewModeStyle::getDividerColumn ( ) const
See also
GKViewModeStyle::setNormalizerColumn

◆ getFromScale()

uint GKViewModeStyle::getFromScale ( ) const

return the from scale value

◆ getInternalName()

const QString & GKViewModeStyle::getInternalName ( ) const

internal name of this style... there are functions that require some styles and they use this attribute to find the style (since the name is user editable and the ID depends of the moment of creation). It's a good idea to set a unique value for this field (among all the other styles).

◆ getLabelDecimalPlaces()

uint GKViewModeStyle::getLabelDecimalPlaces ( ) const

When drawing numeric labels, the precision.

◆ getLabelRoundingToZeroPlaces()

uint GKViewModeStyle::getLabelRoundingToZeroPlaces ( ) const

When drawing numeric labels, the precision.

◆ getMaxNormalizer()

double GKViewModeStyle::getMaxNormalizer ( ) const

Gets the max normalizer.

◆ getRange() [1/3]

GKViewModeStyleRange * GKViewModeStyle::getRange ( const QString &  value) const

returns the range for this value

◆ getRange() [2/3]

GKViewModeStyleRange * GKViewModeStyle::getRange ( double  from,
double  to = 0.0 
) const

returns the range for a value (from and to equal to the range values). For discrete variables the "to" parameter is not use.

◆ getRange() [3/3]

GKViewModeStyleRange * GKViewModeStyle::getRange ( GKObject obj,
const GKModelConnection modelConn,
const GKContext context 
)

returns the range for this value

◆ getRanges()

const QList< GKViewModeStyleRange * > & GKViewModeStyle::getRanges ( ) const

returns all ranges

◆ getRangesForStackedBandsColumns()

QMap< int, GKViewModeStyleRange * > GKViewModeStyle::getRangesForStackedBandsColumns ( GKObject obj,
const GKModelConnection modelConn,
const GKContext context 
)

returns the range for the value of each of the Diagram Columns (if any)

◆ getStyleType()

GKViewModeStyleType GKViewModeStyle::getStyleType ( ) const

Returns the style type.

◆ getToScale()

uint GKViewModeStyle::getToScale ( ) const

return the to scale value

◆ getTypeOwner()

GKType * GKViewModeStyle::getTypeOwner ( ) const

Returns the type.

◆ getUnits()

GK::SizeUnits GKViewModeStyle::getUnits ( ) const

Return the units.

◆ getVariableType()

GKViewModeStyleVariableType GKViewModeStyle::getVariableType ( ) const

Returns the variable type.

◆ isScaleDependand()

bool GKViewModeStyle::isScaleDependand ( ) const

returns whether the view mode style visibility depends of scale or not

◆ matchCondition()

bool GKViewModeStyle::matchCondition ( GKObject obj,
const GKModelConnection modelConn,
const GKContext context = GKContext::anyContext 
)

Returns true if the object fits the condition.

◆ removeAllRanges()

void GKViewModeStyle::removeAllRanges ( )

removes all ranges

◆ removeRange()

void GKViewModeStyle::removeRange ( GKViewModeStyleRange )

Removes the specified range.

Warning
The specified range MUST be contained in the GKViewModeStyle.

◆ setColorType()

void GKViewModeStyle::setColorType ( GKViewModeStyleColorType  aType)

Sets the color type.

◆ setColumn()

void GKViewModeStyle::setColumn ( GKType ,
GKColumn  
)

Sets the column of a specified type.

◆ setCondition()

void GKViewModeStyle::setCondition ( GKMultiCondition  cond)

Sets a condition to filter objects.

◆ setDefaultRange()

void GKViewModeStyle::setDefaultRange ( GKViewModeStyleRange )

sets the default range

◆ setDividerColumn()

void GKViewModeStyle::setDividerColumn ( GKColumn acol)

Set a column that will normalize the values of the style column (dividing by). If setUseNormalizing(True) is set then we will normalize the value by the maximum value in all the objects. If setUseNormalizing(False) we will take the object value.

◆ setDoRotate()

void GKViewModeStyle::setDoRotate ( bool  rotate)

See doRotate.

◆ setDrawScale()

void GKViewModeStyle::setDrawScale ( uint  ,
uint   
)

Sets the drawing scale.

◆ setInternalName()

void GKViewModeStyle::setInternalName ( const QString &  )

internal name of this style... there are functions that require some styles and they use this attribute to find the style (since the name is user editable and the ID depends of the moment of creation). It's a good idea to set a unique value for this field (among all the other styles).

◆ setLabelDecimalPlaces()

void GKViewModeStyle::setLabelDecimalPlaces ( uint  value)

When drawing numeric labels, the precision.

◆ setLabelRoundingToZeroPlaces()

void GKViewModeStyle::setLabelRoundingToZeroPlaces ( uint  value)

When drawing numeric labels, the precision.

◆ setMaxNormalizer()

void GKViewModeStyle::setMaxNormalizer ( double  value)

Sets the max normalizer.

◆ setScaleDependand()

void GKViewModeStyle::setScaleDependand ( bool  )

sets whether the view mode style visibility depends of scale or not

◆ setShowLabelAsPercentage()

void GKViewModeStyle::setShowLabelAsPercentage ( bool  enabled)

Sets the label to be shown as percentage

◆ setStyleType()

void GKViewModeStyle::setStyleType ( GKViewModeStyleType  )

Sets the style type.

◆ setUnits()

void GKViewModeStyle::setUnits ( const GK::SizeUnits )

Sets the units.

◆ setUseNormalizing()

void GKViewModeStyle::setUseNormalizing ( bool  normalize)
See also
GKViewModeStyle::setNormalizerColumn

◆ setVariableType()

void GKViewModeStyle::setVariableType ( GKViewModeStyleVariableType  )

Sets the variable type.

◆ showLabelAsPercentage()

bool GKViewModeStyle::showLabelAsPercentage ( ) const

Gets whether the label is set to be shown as percentage

◆ sortRanges()

void GKViewModeStyle::sortRanges ( )

Sort ranges by from value.

◆ useMaxNormalizing()

bool GKViewModeStyle::useMaxNormalizing ( ) const
See also
GKViewModeStyle::setNormalizerColumn

◆ usesColumn()

bool GKViewModeStyle::usesColumn ( const GKColumn ) const

Returns true if the column is used in this style (or any of its ranges).

◆ visibleAtThisScale()

bool GKViewModeStyle::visibleAtThisScale ( uint  ) const

returns if the style is visible at a specified scale value

© Aimsun SLU
Aimsun ®