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
Options Class Reference

Options contains the current running options for the application. More...

Public Member Functions

bool isAnimation ()
 Returns true if animation is enabled, otherwise false. More...
 
bool isSound ()
 Returns true if sound is enabled, otherwise false. More...
 
bool isTelephonySound ()
 Returns true if telephony sound is enabled, otherwise false. More...
 
bool isDockFirst ()
 Returns true if dock first is enabled, otherwise false. More...
 
bool isLoggingEnabled ()
 Returns true if logging is enabled, otherwise false. More...
 
bool isPortShown ()
 Returns true if showing of port labels are enabled, otherwise false.. More...
 
bool isPortNotShownOnMouseOver ()
 Returns true if showing of port labels on mouse over is disabled, otherwise false. More...
 
bool isChallenge_PDUInfo ()
 Returns true if challenge mode for the PDU info is enabled, otherwise false. More...
 
bool isDeviceModelShown ()
 Returns true if displaying the device model names is enabled, otherwise false. More...
 
bool isLinkLightsShown ()
 Returns true if displaying the link links are enabled, otherwise false. More...
 
bool isAccessible ()
 Returns true if accessibility is enabled, otherwise false. More...
 
bool isPhysicalTabHidden ()
 Returns true if the Physical tabs in device dialogs are shown is enabled, otherwise false. More...
 
bool isConfigTabHidden ()
 Returns true if the Config tabs in device dialogs are shown is enabled, otherwise false. More...
 
bool isCliTabHidden ()
 Returns true if the CLI tabs in device dialogs are shown is enabled, otherwise false. More...
 
bool isDesktopTabHidden ()
 Returns true if the Desktop tabs in device dialogs are shown is enabled, otherwise false. More...
 
bool isGuiTabHidden ()
 Returns true if the GUI tabs in device dialogs are shown is enabled, otherwise false. More...
 
bool isHideDevModelLabel ()
 Returns true if all device model labels are to be hidden, otherwise false. More...
 
bool isHideDevLabel ()
 Returns true if all device name labels are to be hidden, otherwise false. More...
 
bool isHideQoSStamp ()
 Returns true if QoS stamps on packets are to be hidden, otherwise false. More...
 
bool isEnableCableLengthEffects ()
 Returns true if cable length effects are enabled, otherwise false. More...
 
bool isAutoCablingDisabled ()
 Returns true if auto cabling is disabled, otherwise false. More...
 
bool isUsingMetric ()
 Returns true if using Metric System, otherwise false. More...
 
bool isDevTaskbarShown ()
 Returns true if the device dialog taskbar is shown, otherwise false. More...
 
bool isExternalNetworkAccessEnabled ()
 Returns true if external network access from device scripts is enabled, otherwise false. More...
 
bool isUseCliDefaultTab ()
 Returns true if the CLI tab is the device default tab, otherwise false. More...
 
bool isCableInfoPopup ()
 Returns true if the cable info popup in Physical Workspace is shown when mouseover on the cable, otherwise false. More...
 
QString getConfigFilePath ()
 Returns the path to the administrative configuration file. More...
 
void setAnimation (bool)
 Enables or disables animation. More...
 
void setSound (bool)
 Enables or disables sound. More...
 
void setTelephonySound (bool)
 Enables or disables telephony sound. More...
 
void setIsDockFirst (bool)
 Enables or disables dock first. More...
 
void setIsLoggingEnabled (bool)
 Enables or disables logging. More...
 
void setIsPortShown (bool)
 Enables or disables the port label visibility. More...
 
void setPortNotShownOnMouseOver (bool)
 Enables or disables the port label visibility on mouse over. More...
 
void setIsChallenge_PDUInfo (bool)
 Enables or disables the Challenge Mode in PDU info. More...
 
void setAccessible (bool)
 Enables or disables accessibility features. More...
 
void setIsLinkLightShown (bool)
 Enables or disables link light visibility. More...
 
void addBackgroundImage (QString, QString)
 Adds a background image file to the list of allowed background images to be used on workspaces. More...
 
void removeBackgroundImage (QString)
 Removes the specified background image file from the list of allowed background images to be used on workspaces. More...
 
void setPhysicalTabHidden (bool)
 Enables or disables the Physical tab visibility. More...
 
void setConfigTabHidden (bool)
 Enables or disables the Config tab visibility. More...
 
void setCliTabHidden (bool)
 Enables or disables the CLI tab visibility. More...
 
void setDesktopTabHidden (bool)
 Enables or disables the Desktop tab visibility. More...
 
void setGuiTabHidden (bool)
 Enables or disables the GUI tab visibility. More...
 
void setHideDevModelLabel (bool, bool)
 Enables or disables hiding of device model labels. More...
 
void setHideDevLabel (bool, bool)
 Enables or disables hiding of device name labels. More...
 
void setHideQoSStamp (bool, bool)
 Enables or disables hiding of QoS stamps. More...
 
void setEnableCableLengthEffects (bool)
 Enables or disables cable length effects. More...
 
void setDisableAutoCabling (bool)
 Enables or disables auto cabling. More...
 
void setUseMetric (bool)
 Sets whether to use Metric System. More...
 
void setShowDevTaskbar (bool)
 Enables or disables the device taskbar. More...
 
void setEnableExternalNetworkAccess (bool)
 Enables or disables external network access from all script modules and device scripts. More...
 
void setUseCliDefaultTab (bool)
 Enables or disables the CLI tab as the default tab. More...
 
void setCableInfoPopup (bool)
 Enables or disables the cable info popup in Physical Workspace when mouseover on the cable. More...
 
void setBufferFullAction (BufferFullAction)
 Sets the Buffer Full Action option to the specified action. More...
 
BufferFullAction getBufferFullAction ()
 Returns the Buffer Full Action option. More...
 
bool saveFile (QString)
 Saves this configuration option to a file. More...
 
QString getCurrentLanguage ()
 Returns the current language. More...
 
void addCustomHideOption (QString, QString, bool)
 Adds a custom hide option in the Hide tab of Preferences. More...
 
void setCustomHideOption (QString, bool)
 Sets a custom hide option in the Hide tab of Preferences. More...
 
bool getCustomHideOption (QString, bool)
 Gets a custom hide option in the Hide tab of Preferences. More...
 
bool isMainToolbarShown ()
 
bool isSecondaryToolbarShown ()
 
bool isBottomToolbarShown ()
 
void setMainToolbarShown (bool)
 
void setSecondaryToolbarShown (bool)
 
void setBottomToolbarShown (bool)
 
void enableAddToRecentFiles (bool)
 Enables whether to allow adding to the recent files list in File menu. More...
 
void addRecentFile (QString)
 Adds a file to the recent file list. More...
 
void optionsChanged ()
 This event is emitted when an administrative options are changed. More...
 

Detailed Description

Options contains the current running options for the application.

Member Function Documentation

◆ addBackgroundImage()

void Options::addBackgroundImage ( QString  ,
QString   
)

Adds a background image file to the list of allowed background images to be used on workspaces.

Parameters
QStringlocation, the location to associate with the image. Locations: Building, City, Custom, Intercity, Logical
QStringfilePath, the relative path to the file from the application bin folder.

◆ addCustomHideOption()

void Options::addCustomHideOption ( QString  ,
QString  ,
bool   
)

Adds a custom hide option in the Hide tab of Preferences.

Parameters
id,theID to use for the option.
title,thetitle to display for the option.
defaultValue,trueto set is as being in affect, false to not be in effect.

◆ addRecentFile()

void Options::addRecentFile ( QString  )

Adds a file to the recent file list.

◆ enableAddToRecentFiles()

void Options::enableAddToRecentFiles ( bool  )

Enables whether to allow adding to the recent files list in File menu.

◆ getBufferFullAction()

BufferFullAction Options::getBufferFullAction ( )

Returns the Buffer Full Action option.

Returns
enum<BufferFullAction>, the Buffer Full Action. Buffer Full Actions: Prompt = 0, AutoClearEventList = 1, AutoViewPreviousEvents = 2

◆ getConfigFilePath()

QString Options::getConfigFilePath ( )

Returns the path to the administrative configuration file.

Remarks
This file is the serialization of the settings in this class.
Returns
QString, the path to the administrative configuration file.

◆ getCurrentLanguage()

QString Options::getCurrentLanguage ( )

Returns the current language.

Returns
QString, value reperesents the current language.

◆ getCustomHideOption()

bool Options::getCustomHideOption ( QString  ,
bool   
)

Gets a custom hide option in the Hide tab of Preferences.

Parameters
id,theID of the option to get.
defaultFalue,ifthe option doesn't exist, the value from this will be returned.
Returns
bool, value is true if the option is on, false if not.

◆ isAccessible()

bool Options::isAccessible ( )

Returns true if accessibility is enabled, otherwise false.

Remarks
Accessibility enables screen reader support.
Returns
bool, true if Accessibility is enabled, otherwise false.

◆ isAnimation()

bool Options::isAnimation ( )

Returns true if animation is enabled, otherwise false.

Returns
bool, true if animation is enabled, otherwise false.

◆ isAutoCablingDisabled()

bool Options::isAutoCablingDisabled ( )

Returns true if auto cabling is disabled, otherwise false.

Returns
bool, true if auto cabling is disabled, otherwise false.

◆ isBottomToolbarShown()

bool Options::isBottomToolbarShown ( )

◆ isCableInfoPopup()

bool Options::isCableInfoPopup ( )

Returns true if the cable info popup in Physical Workspace is shown when mouseover on the cable, otherwise false.

Returns
bool, true if the cable info popup in Physical Workspace is shown when mouseover on the cable, otherwise false.

◆ isChallenge_PDUInfo()

bool Options::isChallenge_PDUInfo ( )

Returns true if challenge mode for the PDU info is enabled, otherwise false.

Returns
bool, true if challenge mode for PDU info is enabled, otherwise false.

◆ isCliTabHidden()

bool Options::isCliTabHidden ( )

Returns true if the CLI tabs in device dialogs are shown is enabled, otherwise false.

Returns
bool, true if the CLI tabs in device dialogs are shown is enabled, otherwise false.

◆ isConfigTabHidden()

bool Options::isConfigTabHidden ( )

Returns true if the Config tabs in device dialogs are shown is enabled, otherwise false.

Returns
bool, true if the Config tabs in device dialogs are shown is enabled, otherwise false.

◆ isDesktopTabHidden()

bool Options::isDesktopTabHidden ( )

Returns true if the Desktop tabs in device dialogs are shown is enabled, otherwise false.

Returns
bool, true if the Desktop tabs in device dialogs are shown is enabled, otherwise false.

◆ isDeviceModelShown()

bool Options::isDeviceModelShown ( )

Returns true if displaying the device model names is enabled, otherwise false.

Returns
bool, true if displaying device model names are enabled, otherwise false.

◆ isDevTaskbarShown()

bool Options::isDevTaskbarShown ( )

Returns true if the device dialog taskbar is shown, otherwise false.

Returns
bool, true if the device dialog taskbar is shown, otherwise false.

◆ isDockFirst()

bool Options::isDockFirst ( )

Returns true if dock first is enabled, otherwise false.

Remarks
If dock first is enabled, then dock windows will automatically dock instead of pop up on launch.
Returns
bool, true if dock first is enabled, otherwise false.

◆ isEnableCableLengthEffects()

bool Options::isEnableCableLengthEffects ( )

Returns true if cable length effects are enabled, otherwise false.

Returns
bool, true if cable length effects are enabled, otherwise false.

◆ isExternalNetworkAccessEnabled()

bool Options::isExternalNetworkAccessEnabled ( )

Returns true if external network access from device scripts is enabled, otherwise false.

Returns
bool, true if external network access from device scripts is enabled, otherwise false.

◆ isGuiTabHidden()

bool Options::isGuiTabHidden ( )

Returns true if the GUI tabs in device dialogs are shown is enabled, otherwise false.

Returns
bool, true if the GUI tabs in device dialogs are shown is enabled, otherwise false.

◆ isHideDevLabel()

bool Options::isHideDevLabel ( )

Returns true if all device name labels are to be hidden, otherwise false.

Returns
bool, true if all device name labels are to be hidden, otherwise false.

◆ isHideDevModelLabel()

bool Options::isHideDevModelLabel ( )

Returns true if all device model labels are to be hidden, otherwise false.

Returns
bool, true if all device model labels are to be hidden, otherwise false.

◆ isHideQoSStamp()

bool Options::isHideQoSStamp ( )

Returns true if QoS stamps on packets are to be hidden, otherwise false.

Returns
bool, true if QoS stamps on packets are to be hidden, otherwise false.

◆ isLinkLightsShown()

bool Options::isLinkLightsShown ( )

Returns true if displaying the link links are enabled, otherwise false.

Returns
bool, true if displaying the link lights are enabled, otherwise false.

◆ isLoggingEnabled()

bool Options::isLoggingEnabled ( )

Returns true if logging is enabled, otherwise false.

Remarks
Logs the users IOS commands to memory which can be exported to a text file.
Returns
bool, true if logging is enabled, otherwise false.

◆ isMainToolbarShown()

bool Options::isMainToolbarShown ( )

◆ isPhysicalTabHidden()

bool Options::isPhysicalTabHidden ( )

Returns true if the Physical tabs in device dialogs are shown is enabled, otherwise false.

Returns
bool, true if the Physical tabs in device dialogs are shown is enabled, otherwise false.

◆ isPortNotShownOnMouseOver()

bool Options::isPortNotShownOnMouseOver ( )

Returns true if showing of port labels on mouse over is disabled, otherwise false.

Returns
bool, true if showing of port labels on mouse over is disabled, otherwise false.

◆ isPortShown()

bool Options::isPortShown ( )

Returns true if showing of port labels are enabled, otherwise false..

Returns
bool, true if showing of port labels are enabled, otherwise false.

◆ isSecondaryToolbarShown()

bool Options::isSecondaryToolbarShown ( )

◆ isSound()

bool Options::isSound ( )

Returns true if sound is enabled, otherwise false.

Returns
bool, true if sound is enabled, otherwise false.

◆ isTelephonySound()

bool Options::isTelephonySound ( )

Returns true if telephony sound is enabled, otherwise false.

Returns
bool, true if telephony sound is enabled, otherwise false.

◆ isUseCliDefaultTab()

bool Options::isUseCliDefaultTab ( )

Returns true if the CLI tab is the device default tab, otherwise false.

Returns
bool, true if the CLI tab is the device default tab, otherwise false.

◆ isUsingMetric()

bool Options::isUsingMetric ( )

Returns true if using Metric System, otherwise false.

Returns
bool, true if using Metric System, otherwise false.

◆ optionsChanged()

void Options::optionsChanged ( )

This event is emitted when an administrative options are changed.

IPC event.

◆ removeBackgroundImage()

void Options::removeBackgroundImage ( QString  )

Removes the specified background image file from the list of allowed background images to be used on workspaces.

Parameters
QStringfilePath, the relative path to the file from the application bin folder.

◆ saveFile()

bool Options::saveFile ( QString  )

Saves this configuration option to a file.

Parameters
filename,thefilename including the path to save to.
Returns
bool, value is true if the file was saved, false if not.

◆ setAccessible()

void Options::setAccessible ( bool  )

Enables or disables accessibility features.

Parameters
bEnable,trueto enable accessibility features, false to disable it.

◆ setAnimation()

void Options::setAnimation ( bool  )

Enables or disables animation.

Parameters
bEnable,trueto enable animation, false to disable it.

◆ setBottomToolbarShown()

void Options::setBottomToolbarShown ( bool  )

◆ setBufferFullAction()

void Options::setBufferFullAction ( BufferFullAction  )

Sets the Buffer Full Action option to the specified action.

Parameters
action,theBuffer Full Action. Buffer Full Actions: Prompt = 0, AutoClearEventList = 1, AutoViewPreviousEvents = 2

◆ setCableInfoPopup()

void Options::setCableInfoPopup ( bool  )

Enables or disables the cable info popup in Physical Workspace when mouseover on the cable.

Parameters
bEnable,trueto show the cable info popup in Physical Workspace when mouseover on the cable.

◆ setCliTabHidden()

void Options::setCliTabHidden ( bool  )

Enables or disables the CLI tab visibility.

Parameters
bEnable,trueto enable CLI tab visibility, false to disable it.

◆ setConfigTabHidden()

void Options::setConfigTabHidden ( bool  )

Enables or disables the Config tab visibility.

Parameters
bEnable,trueto enable Config tab visibility, false to disable it.

◆ setCustomHideOption()

void Options::setCustomHideOption ( QString  ,
bool   
)

Sets a custom hide option in the Hide tab of Preferences.

Parameters
id,theID of the option to set.
value,trueto set is as being in affect, false to not be in effect.

◆ setDesktopTabHidden()

void Options::setDesktopTabHidden ( bool  )

Enables or disables the Desktop tab visibility.

Parameters
bEnable,trueto enable Desktop tab visibility, false to disable it.

◆ setDisableAutoCabling()

void Options::setDisableAutoCabling ( bool  )

Enables or disables auto cabling.

Parameters
bEnable,trueto disable auto cabling, false to enable it.

◆ setEnableCableLengthEffects()

void Options::setEnableCableLengthEffects ( bool  )

Enables or disables cable length effects.

Parameters
bEnable,trueto enable cable length effects, false to disable it.

◆ setEnableExternalNetworkAccess()

void Options::setEnableExternalNetworkAccess ( bool  )

Enables or disables external network access from all script modules and device scripts.

Parameters
bEnable,trueto enable external network access from all script modules and device scripts, false to disable it.

◆ setGuiTabHidden()

void Options::setGuiTabHidden ( bool  )

Enables or disables the GUI tab visibility.

Parameters
bEnable,trueto enable GUI tab visibility, false to disable it.

◆ setHideDevLabel()

void Options::setHideDevLabel ( bool  ,
bool   
)

Enables or disables hiding of device name labels.

Parameters
bEnable,trueto enable hiding of device name labels, false to disable it.
isWorkspaceActive,trueif the workspace is active, false if not.

◆ setHideDevModelLabel()

void Options::setHideDevModelLabel ( bool  ,
bool   
)

Enables or disables hiding of device model labels.

Parameters
bEnable,trueto enable hiding of device model labels, false to disable it.
isWorkspaceActive,trueif the workspace is active, false if not.

◆ setHideQoSStamp()

void Options::setHideQoSStamp ( bool  ,
bool   
)

Enables or disables hiding of QoS stamps.

Parameters
bEnable,trueto enable hiding of QoS stamps, false to disable it.
isWorkspaceActive,trueif the workspace is active, false if not.

◆ setIsChallenge_PDUInfo()

void Options::setIsChallenge_PDUInfo ( bool  )

Enables or disables the Challenge Mode in PDU info.

Parameters
bEnable,trueto enable Challenge Mode in PDU info, false to disable it.

◆ setIsDockFirst()

void Options::setIsDockFirst ( bool  )

Enables or disables dock first.

Parameters
bEnable,trueto enable dock first, false to disable it.
Remarks
Enabling dock first will cause all new dockable dialogs to be docked when shown.

◆ setIsLinkLightShown()

void Options::setIsLinkLightShown ( bool  )

Enables or disables link light visibility.

Parameters
bEnable,trueto enable link light visibility, false to disable it.

◆ setIsLoggingEnabled()

void Options::setIsLoggingEnabled ( bool  )

Enables or disables logging.

Parameters
bEnable,trueto enable logging, false to disable it.

◆ setIsPortShown()

void Options::setIsPortShown ( bool  )

Enables or disables the port label visibility.

Parameters
bEnable,trueto enable port label visibility, false to disable it.

◆ setMainToolbarShown()

void Options::setMainToolbarShown ( bool  )

◆ setPhysicalTabHidden()

void Options::setPhysicalTabHidden ( bool  )

Enables or disables the Physical tab visibility.

Parameters
bEnable,trueto enable Physical tab visibility, false to disable it.

◆ setPortNotShownOnMouseOver()

void Options::setPortNotShownOnMouseOver ( bool  )

Enables or disables the port label visibility on mouse over.

Parameters
bEnable,trueto enable port label visibility on mouse over, false to disable it.

◆ setSecondaryToolbarShown()

void Options::setSecondaryToolbarShown ( bool  )

◆ setShowDevTaskbar()

void Options::setShowDevTaskbar ( bool  )

Enables or disables the device taskbar.

Parameters
bEnable,trueto enable the device taskbar, false to disable it.

◆ setSound()

void Options::setSound ( bool  )

Enables or disables sound.

Parameters
bEnable,trueto enable sound, false to disable it.

◆ setTelephonySound()

void Options::setTelephonySound ( bool  )

Enables or disables telephony sound.

Parameters
bEnable,trueto enable telephony sound, false to disable it.

◆ setUseCliDefaultTab()

void Options::setUseCliDefaultTab ( bool  )

Enables or disables the CLI tab as the default tab.

Parameters
bEnable,trueto enable the CLI tab as the default tab, false to disable it.

◆ setUseMetric()

void Options::setUseMetric ( bool  )

Sets whether to use Metric System.

Parameters
bMetric,trueto use Metric System, false to use Imperial System.

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