Cisco Packet Tracer Extensions API 8.1.0
API for communication between Cisco Packet Tracer application and its extension applications and modules.
Public Member Functions | List of all members
Cluster Class Reference

Public Member Functions

void setName (QString)
 Allows to change cluster name to newName. More...
 
QString getName ()
 Returns cluster name. More...
 
void nameChanged (QString, QString)
 Generated when cluster name changes to a new one. More...
 
QString getId ()
 Returns cluster ID. More...
 
void idChanged (QString, QString)
 Generated when cluster ID changes to a new one. More...
 
int getChildClusterCount ()
 Returns the number of child cluster objects. More...
 
Cluster getChildClusterAt (int)
 Returns child cluster object at a given index. More...
 
Cluster getParentCluster ()
 Returns parent cluster object. More...
 
double getXCoordinate ()
 Returns the current x-coordinate position in the Logical workspace for this cluster. More...
 
double getYCoordinate ()
 Returns the current y-coordinate position in the Logical workspace for this cluster. More...
 
double getCenterXCoordinate ()
 Returns the current x-coordinate position in the Logical workspace for this cluster. More...
 
double getCenterYCoordinate ()
 Returns the current y-coordinate position in the Logical workspace for this cluster. More...
 
bool moveToLocationCentered (int, int)
 Moves this cluster to the specified location for its center in Logical workspace. More...
 
bool moveToLocation (int, int)
 Moves this cluster to the specified location in Logical workspace. More...
 
void setIconPath (QString)
 Sets the icon to use for the cluster. More...
 
QString getIconPath ()
 Returns the path to the image to use for the cluster icon. More...
 

Detailed Description

\brief Clusters used to group clusters inside logical workspace

Member Function Documentation

◆ getCenterXCoordinate()

double Cluster::getCenterXCoordinate ( )

Returns the current x-coordinate position in the Logical workspace for this cluster.

Returns
double, the current x-coordinate.

◆ getCenterYCoordinate()

double Cluster::getCenterYCoordinate ( )

Returns the current y-coordinate position in the Logical workspace for this cluster.

Returns
double, the current y-coordinate.

◆ getChildClusterAt()

Cluster Cluster::getChildClusterAt ( int  )

Returns child cluster object at a given index.

Parameters
index,theindex of child cluster to return.
Returns
Cluster, value is the child cluster at the given index. Range(0, getContainerCount()-1)

◆ getChildClusterCount()

int Cluster::getChildClusterCount ( )

Returns the number of child cluster objects.

Returns
int, the number of child clusters inside the cluster.

◆ getIconPath()

QString Cluster::getIconPath ( )

Returns the path to the image to use for the cluster icon.

Returns
QString, the cluster image icon path.

◆ getId()

QString Cluster::getId ( )

Returns cluster ID.

Returns
QString, value is the ID of the cluster.

◆ getName()

QString Cluster::getName ( )

Returns cluster name.

Returns
QString, value is the cluster name.

◆ getParentCluster()

Cluster Cluster::getParentCluster ( )

Returns parent cluster object.

Returns
Cluster, value is the parent of the cluster.

◆ getXCoordinate()

double Cluster::getXCoordinate ( )

Returns the current x-coordinate position in the Logical workspace for this cluster.

Returns
double, the current x-coordinate.

◆ getYCoordinate()

double Cluster::getYCoordinate ( )

Returns the current y-coordinate position in the Logical workspace for this cluster.

Returns
double, the current y-coordinate.

◆ idChanged()

void Cluster::idChanged ( QString  ,
QString   
)

Generated when cluster ID changes to a new one.

  • newId, the new ID of the cluster.
  • , oldId, the new ID of the cluster.

IPC event.

◆ moveToLocation()

bool Cluster::moveToLocation ( int  ,
int   
)

Moves this cluster to the specified location in Logical workspace.

Parameters
x,thenew x-coordinate position.
y,thenew y-coordinate position.
Returns
bool, true if successful, otherwise false.

◆ moveToLocationCentered()

bool Cluster::moveToLocationCentered ( int  ,
int   
)

Moves this cluster to the specified location for its center in Logical workspace.

Parameters
x,thenew x-coordinate position.
y,thenew y-coordinate position.
Returns
bool, true if successful, otherwise false.

◆ nameChanged()

void Cluster::nameChanged ( QString  ,
QString   
)

Generated when cluster name changes to a new one.

  • newName, the name the cluster was given.
  • oldName, the name the cluster had before it was given the new name.

IPC event.

◆ setIconPath()

void Cluster::setIconPath ( QString  )

Sets the icon to use for the cluster.

Parameters
str,pathto the image to use for the cluster icon.

◆ setName()

void Cluster::setName ( QString  )

Allows to change cluster name to newName.

Parameters
newName,nameto use.

The documentation for this class was generated from the following file: