|
Cisco Packet Tracer Extensions API 8.1.0
API for communication between Cisco Packet Tracer application and its extension applications and modules.
|
Workspace is the base class for Logical and Physical workspace related objects. More...
Public Member Functions | |
| bool | isLogicalView () |
| Returns true if the Logical workspace is currently visible, otherwise false. More... | |
| bool | isGeoView () |
| Returns true if the Physical workspace is currently visible, otherwise false. More... | |
| bool | isRackView () |
| Returns true if the wiring closet is currently visible, otherwise false. More... | |
| LogicalWorkspace | getLogicalWorkspace () |
| Returns the Logical workspace. More... | |
| GeoView | getGeoView () |
| Returns the Physical workspace. More... | |
| RackView | getRackView () |
| Returns the wiring closet. More... | |
| PhysicalObject | getRootPhysicalObject () |
| PhysicalObject | getCurrentPhysicalObject () |
| Returns the current physical location. More... | |
| bool | switchToPhysicalObject (PhysicalObject) |
| Switch to the new physical location. More... | |
| void | physicalObjectAdded (PhysicalObject) |
| This event is emitted when a new Physical object(container, building, closet...) is added. More... | |
| void | physicalObjectRemoved (uuid) |
| This event is emitted when a Physical object(container, building, closet...) is removed. More... | |
| void | physicalObjectMoved (PhysicalObject, uuid, PhysicalObject) |
| This event is emitted when a Physical object(container, building, closet...) is moved. More... | |
| void | currentPhysicalObjectChanged (PhysicalObject, PhysicalObject) |
| This event is emitted when a Physical object(container, building, closet...) is changed. More... | |
| void | setLogicalBackgroundPath (QString, bool) |
| Sets the background image of the logical workspace. More... | |
| vector< QString > | devicesAt (int, int, int, int, bool) |
| Returns a list of devices within a rectangle with specified with and height right of the specified location. More... | |
| void | setComponentOpacity (QString, QString, double) |
| Set the opacity for a component. More... | |
| void | fillColor (QString, QString, int, int, int) |
| Fill the component with a specified color. More... | |
| void | setComponentRotation (QString, QString, double) |
| Set the rotation for a component. More... | |
| void | setThingRotation (QString, double) |
| Set the rotation for a thing. More... | |
| void | setThingCustomText (QString, int, int, int, int, QString) |
| Set the custom text for Thing at a location. More... | |
| bool | hasProperty (QString) |
| Check if the a property is defined. More... | |
| QString | getProperty (QString) |
| Return the property value. More... | |
| void | setProperty (QString, QString) |
| Set the property value. More... | |
| vector< QString > | getProperties () |
| Return a list of properties defined. More... | |
| void | pauseEnvironmentTime () |
| Pause the Environemnt time. More... | |
| void | resumeEnvironmentTime () |
| Resume the Environemnt time. More... | |
| int | getEnvironmentTimeInSeconds () |
| Get Environment time in seconds. More... | |
| void | resetEnvironment () |
| Reset the Environemnt time. More... | |
| void | setParentGraphicFromComponent (QString, QString, int, bool, bool) |
| Set parent graphic from component. More... | |
| bool | moveItemInWorkspace (QString, int, int) |
| Move item in workspace to a new location. More... | |
| void | setBaseZLevel (QString, float) |
| Sets the base z level, which is the current z level plus the base level. More... | |
| float | getZLevel (QString) |
| Returns the current z level. More... | |
| void | setVisible (bool) |
| void | zoomIn () |
| Zooms into the workspace. More... | |
| void | zoomOut () |
| Zooms out of the workspace. More... | |
| void | zoomReset () |
| Resets the zoom scale of the workspace. More... | |
| void | deviceTypeSelected (QString, DeviceDescriptor, bool) |
| This event is emitted when a device or cable is selected from the network component box or cable pegboard. More... | |
| void | deviceTypeDeselected () |
| This event is emitted when a device or cable is deselected from the network component box (via clicking on the cancel button) or when a cable is deselected from a cable pegboard. More... | |
Workspace is the base class for Logical and Physical workspace related objects.
| void Workspace::currentPhysicalObjectChanged | ( | PhysicalObject | , |
| PhysicalObject | |||
| ) |
This event is emitted when a Physical object(container, building, closet...) is changed.
IPC event.
| vector< QString > Workspace::devicesAt | ( | int | , |
| int | , | ||
| int | , | ||
| int | , | ||
| bool | |||
| ) |
Returns a list of devices within a rectangle with specified with and height right of the specified location.
| x,x | coordinate of the specified location |
| y,y | coordinate of the specified location |
| w,width | of the rectangle that contains the devices to be included |
| h,height | of the rectangle that contains the devices to be included |
| includeClusters,true | if including devices inside the cluster and false if not including |
| void Workspace::deviceTypeDeselected | ( | ) |
This event is emitted when a device or cable is deselected from the network component box (via clicking on the cancel button) or when a cable is deselected from a cable pegboard.
IPC event.
| void Workspace::deviceTypeSelected | ( | QString | , |
| DeviceDescriptor | , | ||
| bool | |||
| ) |
This event is emitted when a device or cable is selected from the network component box or cable pegboard.
IPC event.
| void Workspace::fillColor | ( | QString | , |
| QString | , | ||
| int | , | ||
| int | , | ||
| int | |||
| ) |
Fill the component with a specified color.
| deviceName,device | name |
| componentName,component | name |
| red,the | rbg red value |
| green,the | rbg green value |
| blue,the | rbg blue value |
| PhysicalObject Workspace::getCurrentPhysicalObject | ( | ) |
Returns the current physical location.
| int Workspace::getEnvironmentTimeInSeconds | ( | ) |
Get Environment time in seconds.
| GeoView Workspace::getGeoView | ( | ) |
| LogicalWorkspace Workspace::getLogicalWorkspace | ( | ) |
Returns the Logical workspace.
| vector< QString > Workspace::getProperties | ( | ) |
Return a list of properties defined.
| QString Workspace::getProperty | ( | QString | ) |
Return the property value.
| prop,property | name |
| RackView Workspace::getRackView | ( | ) |
| PhysicalObject Workspace::getRootPhysicalObject | ( | ) |
Returns the root/top item in the physical workspace location tree
| float Workspace::getZLevel | ( | QString | ) |
Returns the current z level.
| bool Workspace::hasProperty | ( | QString | ) |
Check if the a property is defined.
| prop,property | name |
| bool Workspace::isGeoView | ( | ) |
Returns true if the Physical workspace is currently visible, otherwise false.
| bool Workspace::isLogicalView | ( | ) |
Returns true if the Logical workspace is currently visible, otherwise false.
| bool Workspace::isRackView | ( | ) |
Returns true if the wiring closet is currently visible, otherwise false.
| bool Workspace::moveItemInWorkspace | ( | QString | , |
| int | , | ||
| int | |||
| ) |
Move item in workspace to a new location.
| itemName,item | name |
| x,the | x coordinate |
| y,the | y coordinate |
| void Workspace::pauseEnvironmentTime | ( | ) |
Pause the Environemnt time.
| void Workspace::physicalObjectAdded | ( | PhysicalObject | ) |
This event is emitted when a new Physical object(container, building, closet...) is added.
IPC event.
| void Workspace::physicalObjectMoved | ( | PhysicalObject | , |
| uuid | , | ||
| PhysicalObject | |||
| ) |
This event is emitted when a Physical object(container, building, closet...) is moved.
IPC event.
| void Workspace::physicalObjectRemoved | ( | uuid | ) |
This event is emitted when a Physical object(container, building, closet...) is removed.
IPC event.
| void Workspace::resetEnvironment | ( | ) |
Reset the Environemnt time.
| void Workspace::resumeEnvironmentTime | ( | ) |
Resume the Environemnt time.
| void Workspace::setBaseZLevel | ( | QString | , |
| float | |||
| ) |
Sets the base z level, which is the current z level plus the base level.
| deviceName,item | name |
| baseZLevel,the | base level |
| void Workspace::setComponentOpacity | ( | QString | , |
| QString | , | ||
| double | |||
| ) |
Set the opacity for a component.
| deviceName,device | name |
| componentName,component | name |
| value,the | opacity value |
| void Workspace::setComponentRotation | ( | QString | , |
| QString | , | ||
| double | |||
| ) |
Set the rotation for a component.
| deviceName,device | name |
| componentName,component | name |
| value,the | rotation value |
| void Workspace::setLogicalBackgroundPath | ( | QString | , |
| bool | |||
| ) |
Sets the background image of the logical workspace.
| tiled,true | if the image will be used as tiled layout and false if not |
| void Workspace::setParentGraphicFromComponent | ( | QString | , |
| QString | , | ||
| int | , | ||
| bool | , | ||
| bool | |||
| ) |
Set parent graphic from component.
| deviceName,device | name |
| componentName,component | name |
| index,the | image index to be used |
| bOnLogical,if | true, set parent graphic in logical workspace |
| bOnPhysical,if | true, set parent graphic in physical workspace |
| void Workspace::setProperty | ( | QString | , |
| QString | |||
| ) |
Set the property value.
| prop,property | name |
| value,property | value |
| void Workspace::setThingCustomText | ( | QString | , |
| int | , | ||
| int | , | ||
| int | , | ||
| int | , | ||
| QString | |||
| ) |
Set the custom text for Thing at a location.
| deviceName,device | name |
| x,the | x coordinate of where the text will show up |
| y,the | y coordinate of where the text will show up |
| width,the | width the text |
| height,the | height of the text |
| text,the | string to show up |
| void Workspace::setThingRotation | ( | QString | , |
| double | |||
| ) |
Set the rotation for a thing.
| deviceName,device | name |
| value,the | rotation value |
| void Workspace::setVisible | ( | bool | ) |
| bool Workspace::switchToPhysicalObject | ( | PhysicalObject | ) |
Switch to the new physical location.
| object,PhysicalObject | object |
| void Workspace::zoomIn | ( | ) |
Zooms into the workspace.
| void Workspace::zoomOut | ( | ) |
Zooms out of the workspace.
| void Workspace::zoomReset | ( | ) |
Resets the zoom scale of the workspace.