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

AppWindow serves as the entry point to all GUI objects. More...

Public Member Functions

MenuBar getMenuBar ()
 Returns the menu bar. More...
 
ToolBar getToolBar ()
 Returns the toolbar. More...
 
ToolBar getSecondaryToolBar ()
 Returns the secondary toolbar. More...
 
RSSwitch getRSSwitch ()
 Returns the Realtime/Simulation mode switch. More...
 
PLSwitch getPLSwitch ()
 Returns the Physical/Logical workspace switch. More...
 
LogicalToolbar getLogicalToolbar ()
 Returns the Logical workspace toolbar. More...
 
PhysicalToolbar getPhysicalToolbar ()
 Returns the Physical workspace toolbar. More...
 
SimulationToolbar getSimulationToolbar ()
 Returns the Simulation mode toolbar. More...
 
RealtimeToolbar getRealtimeToolbar ()
 Returns the Realtime mode toolbar. More...
 
void setPLFrameVisible (bool)
 
void setRSFrameVisible (bool)
 
PhysicalLocationDialog getPhysicalLocationDialog ()
 Returns the Physical Location dialog. More...
 
SimulationPanel getSimulationPanel ()
 Returns the Simulation panel. More...
 
UserCreatedPDU getUserCreatedPDU ()
 Returns the User Created PDU. More...
 
NetworkComponentBox getNetworkComponentBox ()
 Returns the Network Component Box. More...
 
PDUListWindow getPDUListWindow ()
 Returns the PDU list window. More...
 
ActivityWizard getActivityWizard ()
 Returns the Activity Wizard. More...
 
InfoDialog getInfoDialog ()
 Returns the info dialog. More...
 
CommonToolbar getCommonToolbar ()
 Returns the Common Toolbar. More...
 
bool isSimulationMode ()
 Returns true if currently in Simulation mode, otherwise false. More...
 
bool isRealtimeMode ()
 Returns true if currently in Realtime mode, otherwise false. More...
 
bool isLogicalMode ()
 Returns true if currently in Logical workspace, otherwise false. More...
 
bool isPhysicalMode ()
 Returns true if currently in Physical workspace, otherwise false. More...
 
Workspace getActiveWorkspace ()
 Returns the current active workspace. More...
 
ActiveDialog getActiveDialog ()
 Returns the current active dialog. More...
 
AdministrativeDialog getAdminDialog ()
 Returns the administrative dialog. More...
 
PaletteDialog getPaletteDialog ()
 Returns the palette dialog. More...
 
PrintDialogPT4 getPrintDialog ()
 Returns the print dialog. More...
 
InstructionDlg getInstructionDlg ()
 Returns the activity instructions dialog. More...
 
void suppressInstructionDlg (bool)
 
WebViewManager getWebViewManager ()
 Returns the WebView manager. More...
 
NetworkFile getActiveFile ()
 Returns the current active file. More...
 
void exit ()
 Exits Packet Tracer. More...
 
void exitNoConfirm (bool)
 Exits packet tracer with or without save conformation. More...
 
DialogManager getDialogManager ()
 Returns the dialog manager. More...
 
void writeToPT (QString)
 Writes a message to the IPC Log and shows it. More...
 
QString getVersion ()
 Returns the Packet Tracer version number. More...
 
QString getBasePath ()
 Returns the installation directory of Packet Tracer. More...
 
bool fileNew (bool)
 Creates a new file. More...
 
FileOpenReturnValue fileOpen (QString)
 Opens the specified file. More...
 
FileOpenReturnValue promptFileOpenFolder (QString)
 Prompts to browse a folder for a file to open. More...
 
vector< QString > getListOfFilesToOpen (QString)
 Retrives list of files that can be opened location. More...
 
vector< QString > getListOfFilesSaved (QString)
 Retrives list of files saved at default location. More...
 
QString getDefaultFileSaveLocation ()
 Retrives default save location. More...
 
QString getTempFileLocation ()
 
bool fileSave ()
 
void fileSaveAsync ()
 Starts save operation and returns immediately. More...
 
bool fileSaveAs (QString)
 
void fileSaveAsAsync (QString)
 Starts save as operation to the specified file and returns immediately. More...
 
void fileSaveAsNoPrompt (QString, bool)
 Same as fileSaveAs() except it does not prompt to overwrite the file. More...
 
bool fileSaveAsPkz (QString)
 
void fileSaveAsPkzAsync (QString)
 Starts save as pkz operation and returns immediately. More...
 
void fileActivityWizard ()
 Enters the Activity Wizard. More...
 
FileOpenReturnValue fileOpenFromBytes (vector< byte >, QString)
 Opens the specified file with the specified bytes of data. More...
 
FileOpenReturnValue fileOpenFromURL (QString)
 Opens a file at the specified URL. More...
 
vector< byte > fileSaveToBytes ()
 
void fileSaveToBytesAsync ()
 Starts save to bytes operation and returns immediately. More...
 
void fileNewed ()
 This event is emitted when a new file is created. More...
 
void fileOpened ()
 This event is emitted when a file is opened. More...
 
void activityFileOpening ()
 This event is emitted when a activity file is opening. More...
 
void fileClosing ()
 This event is emitted when the file is closing. More...
 
void fileSaved ()
 IPC event. More...
 
void fileSaveDone (bool)
 This event is emitted when a file is saved. More...
 
void fileSaveToBytesDone (vector< byte >)
 This event is emitted when a file is saved. More...
 
bool shouldIgnoreFileNew ()
 This delegate determines if PT should ignore the file->new action. If ignoring, then the script module should do something to let the user know. More...
 
bool shouldIgnoreFileOpenFolder (QString)
 This delegate determines if PT should ignore the file->open folder action. If ignoring, then the script module should do something to let the user know. More...
 
bool shouldIgnoreFileOpenRecent (QString)
 This delegate determines if PT should ignore the file->open recent file action. If ignoring, then the script module should do something to let the user know. More...
 
bool shouldIgnoreFileSave ()
 This delegate determines if PT should ignore the file->save action. If ignoring, then the script module should do something to let the user know. More...
 
bool shouldIgnoreFileSaveAs (QString)
 This delegate determines if PT should ignore the file->save as action. If ignoring, then the script module should do something to let the user know. More...
 
bool shouldIgnoreFileExit ()
 This delegate determines if PT should ignore the file->exit action. If ignoring, then the script module should do something to let the user know. More...
 
void enteredActivityWizard (bool)
 This event is emitted when the activity wizard is entered. More...
 
bool isPreventClose ()
 Returns true if Packet Tracer is prevented from closing, otherwise false. More...
 
void setPreventClose (bool)
 Allows or prevents Packet Tracer from closing. More...
 
long getProcessId ()
 Returns Packet Tracer application process ID. More...
 
QString getSessionId ()
 Returns the globally unique Packet Tracer application session ID. More...
 
QString getUserFolder ()
 Returns the user folder of the current user logged into the OS. More...
 
void appExit ()
 This event is emitted when the user exits application. More...
 
void lockedInterfaceInvoked (QString, QString, QString, QString)
 This event is emitted when a locked interface is invoked. More...
 
void setVisible (bool)
 Shows or hides the Packet Tracer main window. More...
 
void raise ()
 
void setDisabled (bool)
 Disables or enables the application. Buttons, etc will be shown as disabled and unuable. More...
 
void isMaximized ()
 
void showMaximized ()
 Sets the Packet Tracer main window to the maximum size. More...
 
void isMinimized ()
 
void showMinimized ()
 Sets the Packet Tracer main window to the minimum size. More...
 
void showNormal ()
 Sets the Packet Tracer main window to the normal size. More...
 
void setWindowTitle (QString)
 Sets the Packet Tracer main window title. More...
 
void setWindowGeometry (int, int, int, int)
 Sets the Packet Tracer main window geometry and position. More...
 
int getX ()
 Returns the Packet Tracer main window x-coorindate. More...
 
int getY ()
 Returns the Packet Tracer main window y-coorindate. More...
 
int getWidth ()
 Returns the Packet Tracer main window width. More...
 
int getHeight ()
 Returns the Packet Tracer main window height. More...
 
void setMaximumSize (int, int)
 Sets the maximum size of the Packet Tracer main window. More...
 
void setMaximumWidth (int)
 Sets the maximum width of the Packet Tracer main window. More...
 
void setMaximumHeight (int)
 Sets the maximum height of the Packet Tracer main window. More...
 
int getMaximumWidth ()
 Returns the maximum width of the Packet Tracer main window. More...
 
int getMaximumHeight ()
 Returns the maximum height of the Packet Tracer main window. More...
 
void setMinimumSize (int, int)
 Sets the minimum size of the Packet Tracer main window. More...
 
void setMinimumWidth (int)
 Sets the minimum width of the Packet Tracer main window. More...
 
void setMinimumHeight (int)
 Sets the minimum height of the Packet Tracer main window. More...
 
int getMinimumWidth ()
 Returns the minimum width of the Packet Tracer main window. More...
 
int getMinimumHeight ()
 Returns the minimum height of the Packet Tracer main window. More...
 
int getMainViewAreaWidth ()
 Returns the main view area's width. More...
 
int getMainViewAreaHeight ()
 Returns the main view area's height. More...
 
void resized (int, int)
 This event is emitted when the Packet Tracer main window is resized. More...
 
bool isInterfaceLocked (QString, QString, QString)
 Returns true if the interface with the specified ID is locked, otherwise false. More...
 
void setClipboardText (QString)
 Sets the clipboard text(copy/paste text) to the given text. More...
 
QString getClipboardText ()
 Returns the current clipboard text, if any. More...
 
void helpPath (QString)
 Open a help file at the given path. More...
 
bool openURL (QString)
 Open URL in external web browser. More...
 
EnvironmentDialog getEnvironmentDialog ()
 Returns the Environment Dialog. More...
 
vector< QString > listDirectory (QString, QString)
 Temporary function used to update sample files. Not for normal use. More...
 
void setCheckOutdatedDevices (bool)
 Set if devices marked as outdated should be displayed for selection. More...
 
void deletePTConf ()
 
QString getPTSAMode ()
 Get the current PTSA Mode. More...
 
void setPTSAMode (QString)
 Get the current PTSA Mode. More...
 
bool isPTSA ()
 returns true if PTSA More...
 
void setPTSAPluginVisible (bool)
 show and hide pt window, called from ptsa plugin only. you still need to clear other windows, possibly with file->new More...
 
bool isActivityWizardOpen ()
 
StandardButton showMessageBox (QString, QString, QString, MessageBoxIcon, StandardButton, StandardButton, StandardButton)
 Shows a modal message box with standard buttons over the PT main window. More...
 
int showMessageBoxWithCustomButtons (QString, QString, QString, MessageBoxIcon, QString, int, int)
 Shows a modal message box with custom buttons over the PT main window. More...
 

Detailed Description

AppWindow serves as the entry point to all GUI objects.

Member Function Documentation

◆ activityFileOpening()

void AppWindow::activityFileOpening ( )

This event is emitted when a activity file is opening.

IPC event.

◆ appExit()

void AppWindow::appExit ( )

This event is emitted when the user exits application.

IPC event.

◆ deletePTConf()

void AppWindow::deletePTConf ( )

◆ enteredActivityWizard()

void AppWindow::enteredActivityWizard ( bool  )

This event is emitted when the activity wizard is entered.

  • convertedCurrentFile, true if a existing network was converted to use as the answer network, false if not..

IPC event.

◆ exit()

void AppWindow::exit ( )

Exits Packet Tracer.

◆ exitNoConfirm()

void AppWindow::exitNoConfirm ( bool  )

Exits packet tracer with or without save conformation.

Parameters
flag,trueto exit Packet Tracer without save confirmation, false to exit with save confirmation.

◆ fileActivityWizard()

void AppWindow::fileActivityWizard ( )

Enters the Activity Wizard.

◆ fileClosing()

void AppWindow::fileClosing ( )

This event is emitted when the file is closing.

IPC event.

◆ fileNew()

bool AppWindow::fileNew ( bool  )

Creates a new file.

Parameters
flag,trueshows the save confirmation dialog, false does not.
Returns
bool, true if a new file was created, otherwise false.

◆ fileNewed()

void AppWindow::fileNewed ( )

This event is emitted when a new file is created.

IPC event.

◆ fileOpen()

FileOpenReturnValue AppWindow::fileOpen ( QString  )

Opens the specified file.

Parameters
filename,thepath of the file.
Returns
EFileOpenReturnValue Can be of the following values: eFileReturnOk, eFileReturnBadSSL, eFileReturnBadDecompress, eFileReturnBadBinary, eFileReturnBadMetafile, eFileReturnBadConfiguration, eFileReturnUnableToReadFile, eFileReturnBadOptions, eFileReturnUserCancel

◆ fileOpened()

void AppWindow::fileOpened ( )

This event is emitted when a file is opened.

IPC event.

◆ fileOpenFromBytes()

FileOpenReturnValue AppWindow::fileOpenFromBytes ( vector< byte >  ,
QString   
)

Opens the specified file with the specified bytes of data.

Parameters
data,vectorof bytes of the file.
filename,thepath of the file.
Returns
bool, true if the file was opened, otherwise false.

◆ fileOpenFromURL()

FileOpenReturnValue AppWindow::fileOpenFromURL ( QString  )

Opens a file at the specified URL.

Parameters
url,theURL of the file.
Returns
bool, true if the file was opened, otherwise false.

◆ fileSave()

bool AppWindow::fileSave ( )

◆ fileSaveAs()

bool AppWindow::fileSaveAs ( QString  )
Deprecated:
Use fileSaveAsAsync() and register to fileSaveDone() event.

◆ fileSaveAsAsync()

void AppWindow::fileSaveAsAsync ( QString  )

Starts save as operation to the specified file and returns immediately.

Parameters
filename,thepath of the file.
Remarks
Register to fileSaveDone() event to get the status.

◆ fileSaveAsNoPrompt()

void AppWindow::fileSaveAsNoPrompt ( QString  ,
bool   
)

Same as fileSaveAs() except it does not prompt to overwrite the file.

Parameters
filename,thepath of the file.
bAsync,setto true to use fileSaveAsAsync()
Remarks
Register to fileSaveDone() event to get the status.

◆ fileSaveAsPkz()

bool AppWindow::fileSaveAsPkz ( QString  )
Deprecated:
Use fileSaveAsPkzAsync() and register to fileSaveDone() event.

◆ fileSaveAsPkzAsync()

void AppWindow::fileSaveAsPkzAsync ( QString  )

Starts save as pkz operation and returns immediately.

Parameters
filename,thepath of the file.
Remarks
Register to fileSaveDone() to get the status.

◆ fileSaveAsync()

void AppWindow::fileSaveAsync ( )

Starts save operation and returns immediately.

Remarks
Register to fileSaveDone() event to get the status.

◆ fileSaved()

void AppWindow::fileSaved ( )

IPC event.

Deprecated:
. Use fileSaveDone() event.

◆ fileSaveDone()

void AppWindow::fileSaveDone ( bool  )

This event is emitted when a file is saved.

  • success, true if the file was saved successfully, otherwise false.

IPC event.

◆ fileSaveToBytes()

vector< byte > AppWindow::fileSaveToBytes ( )

◆ fileSaveToBytesAsync()

void AppWindow::fileSaveToBytesAsync ( )

Starts save to bytes operation and returns immediately.

Remarks
Register to fileSaveToBytesDone() event to get save in bytes.

◆ fileSaveToBytesDone()

void AppWindow::fileSaveToBytesDone ( vector< byte >  )

This event is emitted when a file is saved.

  • data, vector of bytes of the file.

IPC event.

◆ getActiveDialog()

ActiveDialog AppWindow::getActiveDialog ( )

Returns the current active dialog.

Returns
ActiveDialog, the current active dialog.

◆ getActiveFile()

NetworkFile AppWindow::getActiveFile ( )

Returns the current active file.

Returns
NetworkFile, the current active file.

◆ getActiveWorkspace()

Workspace AppWindow::getActiveWorkspace ( )

Returns the current active workspace.

Returns
Workspace, the current active workspace.

◆ getActivityWizard()

ActivityWizard AppWindow::getActivityWizard ( )

Returns the Activity Wizard.

Returns
ActivityWizard, the Activity Wizard widget.

◆ getAdminDialog()

AdministrativeDialog AppWindow::getAdminDialog ( )

Returns the administrative dialog.

Returns
AdministrativeDialog, the administrative dialog widget.

◆ getBasePath()

QString AppWindow::getBasePath ( )

Returns the installation directory of Packet Tracer.

Returns
QString, the installation directory of Packet Tracer.

◆ getClipboardText()

QString AppWindow::getClipboardText ( )

Returns the current clipboard text, if any.

Returns
QString, text stored in the copy/paste clipboard.

◆ getCommonToolbar()

CommonToolbar AppWindow::getCommonToolbar ( )

Returns the Common Toolbar.

Returns
InfoDialog, the Common Toolbar widget.

◆ getDefaultFileSaveLocation()

QString AppWindow::getDefaultFileSaveLocation ( )

Retrives default save location.

Returns
Returns default save location

◆ getDialogManager()

DialogManager AppWindow::getDialogManager ( )

Returns the dialog manager.

Returns
DialogManager, the dialog manager.

◆ getEnvironmentDialog()

EnvironmentDialog AppWindow::getEnvironmentDialog ( )

Returns the Environment Dialog.

Returns
Environment Dialog

◆ getHeight()

int AppWindow::getHeight ( )

Returns the Packet Tracer main window height.

Returns
int, the Packet Tracer main window height.

◆ getInfoDialog()

InfoDialog AppWindow::getInfoDialog ( )

Returns the info dialog.

Returns
InfoDialog, the Info Dialog widget.

◆ getInstructionDlg()

InstructionDlg AppWindow::getInstructionDlg ( )

Returns the activity instructions dialog.

Returns
InstructionDlg, the activity instructions dialog widget.

◆ getListOfFilesSaved()

vector< QString > AppWindow::getListOfFilesSaved ( QString  )

Retrives list of files saved at default location.

Parameters
location,Reserved
Returns
List of files that can be opened.

◆ getListOfFilesToOpen()

vector< QString > AppWindow::getListOfFilesToOpen ( QString  )

Retrives list of files that can be opened location.

Parameters
location,Reserved
Returns
List of files that can be opened.

◆ getLogicalToolbar()

LogicalToolbar AppWindow::getLogicalToolbar ( )

Returns the Logical workspace toolbar.

Returns
LogicalToolbar, the Logical workspace toolbar widget.

◆ getMainViewAreaHeight()

int AppWindow::getMainViewAreaHeight ( )

Returns the main view area's height.

Returns
int, the main view area's height.

◆ getMainViewAreaWidth()

int AppWindow::getMainViewAreaWidth ( )

Returns the main view area's width.

Returns
int, the main view area's width.

◆ getMaximumHeight()

int AppWindow::getMaximumHeight ( )

Returns the maximum height of the Packet Tracer main window.

◆ getMaximumWidth()

int AppWindow::getMaximumWidth ( )

Returns the maximum width of the Packet Tracer main window.

◆ getMenuBar()

MenuBar AppWindow::getMenuBar ( )

Returns the menu bar.

Returns
MenuBar, the menu bar widget.

◆ getMinimumHeight()

int AppWindow::getMinimumHeight ( )

Returns the minimum height of the Packet Tracer main window.

◆ getMinimumWidth()

int AppWindow::getMinimumWidth ( )

Returns the minimum width of the Packet Tracer main window.

◆ getNetworkComponentBox()

NetworkComponentBox AppWindow::getNetworkComponentBox ( )

Returns the Network Component Box.

Returns
NetworkComponentBox, the NetworkComponentBox widget.

◆ getPaletteDialog()

PaletteDialog AppWindow::getPaletteDialog ( )

Returns the palette dialog.

Returns
PaletteDialog, the palette dialog widget.

◆ getPDUListWindow()

PDUListWindow AppWindow::getPDUListWindow ( )

Returns the PDU list window.

Returns
PDUListWindow, the PDU List Window widget.

◆ getPhysicalLocationDialog()

PhysicalLocationDialog AppWindow::getPhysicalLocationDialog ( )

Returns the Physical Location dialog.

Returns
PhysicalLocationDialog, the Physical Location dialog widget.

◆ getPhysicalToolbar()

PhysicalToolbar AppWindow::getPhysicalToolbar ( )

Returns the Physical workspace toolbar.

Returns
PhysicalToolbar, the Physical workspace toolbar widget.

◆ getPLSwitch()

PLSwitch AppWindow::getPLSwitch ( )

Returns the Physical/Logical workspace switch.

Returns
PLSwitch, the Physical/Logical workspace switch widget.

◆ getPrintDialog()

PrintDialogPT4 AppWindow::getPrintDialog ( )

Returns the print dialog.

Returns
PrintDialogPT4, the print dialog widget.

◆ getProcessId()

long AppWindow::getProcessId ( )

Returns Packet Tracer application process ID.

Returns
long, Packet Tracer application process ID.

◆ getPTSAMode()

QString AppWindow::getPTSAMode ( )

Get the current PTSA Mode.

Returns
QString, current PTSA Mode.

◆ getRealtimeToolbar()

RealtimeToolbar AppWindow::getRealtimeToolbar ( )

Returns the Realtime mode toolbar.

Returns
RealtimeToolbar, the Realtime mode toolbar widget.

◆ getRSSwitch()

RSSwitch AppWindow::getRSSwitch ( )

Returns the Realtime/Simulation mode switch.

Returns
RSSwitch, the Realtime/Simulation mode switch widget.

◆ getSecondaryToolBar()

ToolBar AppWindow::getSecondaryToolBar ( )

Returns the secondary toolbar.

Returns
ToolBar, the toolbar widget.

◆ getSessionId()

QString AppWindow::getSessionId ( )

Returns the globally unique Packet Tracer application session ID.

Returns
QString, the globally unique Packet Tracer application session ID.

◆ getSimulationPanel()

SimulationPanel AppWindow::getSimulationPanel ( )

Returns the Simulation panel.

Returns
SimulationPanel, the Simulation panel widget.

◆ getSimulationToolbar()

SimulationToolbar AppWindow::getSimulationToolbar ( )

Returns the Simulation mode toolbar.

Returns
SimulationToolbar, the Simulation mode toolbar widget.

◆ getTempFileLocation()

QString AppWindow::getTempFileLocation ( )
Deprecated:
Use fileSaveAsync() and register to fileSaveDone() event.

◆ getToolBar()

ToolBar AppWindow::getToolBar ( )

Returns the toolbar.

Returns
ToolBar, the toolbar widget.

◆ getUserCreatedPDU()

UserCreatedPDU AppWindow::getUserCreatedPDU ( )

Returns the User Created PDU.

Returns
UserCreatedPDU, the User Created PDU widget.

◆ getUserFolder()

QString AppWindow::getUserFolder ( )

Returns the user folder of the current user logged into the OS.

Returns
QString, the user folder of the current user logged into the OS.

◆ getVersion()

QString AppWindow::getVersion ( )

Returns the Packet Tracer version number.

Remarks
The version includes the major, minor, maintainance and possibly build numbers.
Returns
QString, the Packet Tracer version number.

◆ getWebViewManager()

WebViewManager AppWindow::getWebViewManager ( )

Returns the WebView manager.

Returns
WebViewManager, the WebView manager.

◆ getWidth()

int AppWindow::getWidth ( )

Returns the Packet Tracer main window width.

Returns
int, the Packet Tracer main window width.

◆ getX()

int AppWindow::getX ( )

Returns the Packet Tracer main window x-coorindate.

Returns
int, the Packet Tracer main window x-coorindate.

◆ getY()

int AppWindow::getY ( )

Returns the Packet Tracer main window y-coorindate.

Returns
int, the Packet Tracer main window y-coorindate.

◆ helpPath()

void AppWindow::helpPath ( QString  )

Open a help file at the given path.

Parameters
subPath,subpathto the file to open.

◆ isActivityWizardOpen()

bool AppWindow::isActivityWizardOpen ( )

◆ isInterfaceLocked()

bool AppWindow::isInterfaceLocked ( QString  ,
QString  ,
QString   
)

Returns true if the interface with the specified ID is locked, otherwise false.

Parameters
ID,theID of the item to check if locked.
branchID1,limitthe search to this branch ID.
branchID2,limitthe search to this branch ID of branchID1.
Returns
bool, true if the interface with the specified ID is locked, otherwise false.

◆ isLogicalMode()

bool AppWindow::isLogicalMode ( )

Returns true if currently in Logical workspace, otherwise false.

Returns
bool, true if currently in Logical workspace, otherwise false.

◆ isMaximized()

void AppWindow::isMaximized ( )

◆ isMinimized()

void AppWindow::isMinimized ( )

◆ isPhysicalMode()

bool AppWindow::isPhysicalMode ( )

Returns true if currently in Physical workspace, otherwise false.

Returns
bool, true if currently in Physical workspace, otherwise false.

◆ isPreventClose()

bool AppWindow::isPreventClose ( )

Returns true if Packet Tracer is prevented from closing, otherwise false.

Returns
bool, true if Packet Tracer is prevented from closing, otherwise false.

◆ isPTSA()

bool AppWindow::isPTSA ( )

returns true if PTSA

Returns
bool, true if PTSA.

◆ isRealtimeMode()

bool AppWindow::isRealtimeMode ( )

Returns true if currently in Realtime mode, otherwise false.

Returns
bool, true if currently in Realtime mode, otherwise false.

◆ isSimulationMode()

bool AppWindow::isSimulationMode ( )

Returns true if currently in Simulation mode, otherwise false.

Returns
bool, true if currently in Simulation mode, otherwise false.

◆ listDirectory()

vector< QString > AppWindow::listDirectory ( QString  ,
QString   
)

Temporary function used to update sample files. Not for normal use.

◆ lockedInterfaceInvoked()

void AppWindow::lockedInterfaceInvoked ( QString  ,
QString  ,
QString  ,
QString   
)

This event is emitted when a locked interface is invoked.

  • lockMsg, the lock message.
  • lockID, lock type.
  • branch1, search limited to this branch ID
  • branch2, search limited to this branch ID of branchID1

IPC event.

◆ openURL()

bool AppWindow::openURL ( QString  )

Open URL in external web browser.

Parameters
url,urlto open.

◆ promptFileOpenFolder()

FileOpenReturnValue AppWindow::promptFileOpenFolder ( QString  )

Prompts to browse a folder for a file to open.

Parameters
folder,thepath of the folder to browse.
Returns
EFileOpenReturnValue Can be of the following values: eFileReturnOk, eFileReturnBadSSL, eFileReturnBadDecompress, eFileReturnBadBinary, eFileReturnBadMetafile, eFileReturnBadConfiguration, eFileReturnUnableToReadFile, eFileReturnBadOptions, eFileReturnUserCancel

◆ raise()

void AppWindow::raise ( )

◆ resized()

void AppWindow::resized ( int  ,
int   
)

This event is emitted when the Packet Tracer main window is resized.

  • width, the width of the main window
  • height, the height of the main window

IPC event.

◆ setCheckOutdatedDevices()

void AppWindow::setCheckOutdatedDevices ( bool  )

Set if devices marked as outdated should be displayed for selection.

Parameters
bCheck,trueif outdated devices should be handled when setting up the toolbar, false if not.

◆ setClipboardText()

void AppWindow::setClipboardText ( QString  )

Sets the clipboard text(copy/paste text) to the given text.

Parameters
text,textto put on the clipboard to use for paste.

◆ setDisabled()

void AppWindow::setDisabled ( bool  )

Disables or enables the application. Buttons, etc will be shown as disabled and unuable.

Parameters
flag,trueto disable the application and false to enable.

◆ setMaximumHeight()

void AppWindow::setMaximumHeight ( int  )

Sets the maximum height of the Packet Tracer main window.

◆ setMaximumSize()

void AppWindow::setMaximumSize ( int  ,
int   
)

Sets the maximum size of the Packet Tracer main window.

◆ setMaximumWidth()

void AppWindow::setMaximumWidth ( int  )

Sets the maximum width of the Packet Tracer main window.

◆ setMinimumHeight()

void AppWindow::setMinimumHeight ( int  )

Sets the minimum height of the Packet Tracer main window.

◆ setMinimumSize()

void AppWindow::setMinimumSize ( int  ,
int   
)

Sets the minimum size of the Packet Tracer main window.

◆ setMinimumWidth()

void AppWindow::setMinimumWidth ( int  )

Sets the minimum width of the Packet Tracer main window.

◆ setPLFrameVisible()

void AppWindow::setPLFrameVisible ( bool  )

◆ setPreventClose()

void AppWindow::setPreventClose ( bool  )

Allows or prevents Packet Tracer from closing.

Parameters
bPreventClose,trueto prevent Packet Tracer from closing, false to allow closing.

◆ setPTSAMode()

void AppWindow::setPTSAMode ( QString  )

Get the current PTSA Mode.

Returns
QString, current PTSA Mode.

◆ setPTSAPluginVisible()

void AppWindow::setPTSAPluginVisible ( bool  )

show and hide pt window, called from ptsa plugin only. you still need to clear other windows, possibly with file->new

Returns

◆ setRSFrameVisible()

void AppWindow::setRSFrameVisible ( bool  )

◆ setVisible()

void AppWindow::setVisible ( bool  )

Shows or hides the Packet Tracer main window.

    \brief This event is emitted when a message box should be displayed.
    \NOT APPLICABLE TO DESKTOP

event: popupMessage(QString reason, QString title, QString message, QString buttonA, QString buttonB, QString buttonC, QString buttonD) - PrivApplication;

Parameters
flag,trueto show the Packet Tracer main window, false to hide it.

◆ setWindowGeometry()

void AppWindow::setWindowGeometry ( int  ,
int  ,
int  ,
int   
)

Sets the Packet Tracer main window geometry and position.

Parameters
x,thex-coordinate of the main window.
y,they-coordinate of the main window.
width,thewidth of the main window.
height,theheight of the main window.

◆ setWindowTitle()

void AppWindow::setWindowTitle ( QString  )

Sets the Packet Tracer main window title.

Parameters
title,thewindow title

◆ shouldIgnoreFileExit()

bool AppWindow::shouldIgnoreFileExit ( )

This delegate determines if PT should ignore the file->exit action. If ignoring, then the script module should do something to let the user know.

Returns
bool, true if PT should ignore the file->exit action.

◆ shouldIgnoreFileNew()

bool AppWindow::shouldIgnoreFileNew ( )

This delegate determines if PT should ignore the file->new action. If ignoring, then the script module should do something to let the user know.

Returns
bool, true if PT should ignore the file->new action.

◆ shouldIgnoreFileOpenFolder()

bool AppWindow::shouldIgnoreFileOpenFolder ( QString  )

This delegate determines if PT should ignore the file->open folder action. If ignoring, then the script module should do something to let the user know.

  • folder, the folder the user wants to browse for files to open.
Returns
bool, true if PT should ignore the file->open folder action.

◆ shouldIgnoreFileOpenRecent()

bool AppWindow::shouldIgnoreFileOpenRecent ( QString  )

This delegate determines if PT should ignore the file->open recent file action. If ignoring, then the script module should do something to let the user know.

  • file, the path of the recent file to open.
Returns
bool, true if PT should ignore the file->open recent file action.

◆ shouldIgnoreFileSave()

bool AppWindow::shouldIgnoreFileSave ( )

This delegate determines if PT should ignore the file->save action. If ignoring, then the script module should do something to let the user know.

Returns
bool, true if PT should ignore the file->save action.

◆ shouldIgnoreFileSaveAs()

bool AppWindow::shouldIgnoreFileSaveAs ( QString  )

This delegate determines if PT should ignore the file->save as action. If ignoring, then the script module should do something to let the user know.

  • file, the file to save as
Returns
bool, true if PT should ignore the file->save as action.

◆ showMaximized()

void AppWindow::showMaximized ( )

Sets the Packet Tracer main window to the maximum size.

◆ showMessageBox()

StandardButton AppWindow::showMessageBox ( QString  ,
QString  ,
QString  ,
MessageBoxIcon  ,
StandardButton  ,
StandardButton  ,
StandardButton   
)

Shows a modal message box with standard buttons over the PT main window.

  • title, window title
  • message, message text
  • informativeText, sub message text
  • icon, an icon next to the message, can be one of the following: NoIcon = 0, Information = 1, Warning = 2, Critical = 3, Question = 4
  • buttons, a StandardButton value combining all standard buttons to show
  • defaultButton, the StandardButton value for the default button
  • escapeButton, the StandardButton value for the default button

StandardButton values: Ok = 0x00000400, // An "OK" button defined with the AcceptRole. Open = 0x00002000, // An "Open" button defined with the AcceptRole. Save = 0x00000800, // A "Save" button defined with the AcceptRole. Cancel = 0x00400000, // A "Cancel" button defined with the RejectRole. Close = 0x00200000, // A "Close" button defined with the RejectRole. Discard = 0x00800000, // A "Discard" or "Don't Save" button, depending on the platform, defined with the DestructiveRole. Apply = 0x02000000, // An "Apply" button defined with the ApplyRole. Reset = 0x04000000, // A "Reset" button defined with the ResetRole. RestoreDefaults = 0x08000000, // A "Restore Defaults" button defined with the ResetRole. Help = 0x01000000, // A "Help" button defined with the HelpRole. SaveAll = 0x00001000, // A "Save All" button defined with the AcceptRole. Yes = 0x00004000, // A "Yes" button defined with the YesRole. YesToAll = 0x00008000, // A "Yes to All" button defined with the YesRole. No = 0x00010000, // A "No" button defined with the NoRole. NoToAll = 0x00020000, // A "No to All" button defined with the NoRole. Abort = 0x00040000, // An "Abort" button defined with the RejectRole. Retry = 0x00080000, // A "Retry" button defined with the AcceptRole. Ignore = 0x00100000, // An "Ignore" button defined with the AcceptRole. NoButton = 0x00000000 // An invalid button.

Returns
StandardButton value, the value of the selected button

◆ showMessageBoxWithCustomButtons()

int AppWindow::showMessageBoxWithCustomButtons ( QString  ,
QString  ,
QString  ,
MessageBoxIcon  ,
QString  ,
int  ,
int   
)

Shows a modal message box with custom buttons over the PT main window.

  • title, window title
  • message, message text
  • informativeText, sub message text
  • icon, an icon next to the message, can be one of the following: NoIcon = 0, Information = 1, Warning = 2, Critical = 3, Question = 4
  • buttonsJson, an array of strings for buttons in JSON string representation
  • defaultButtonIndex, the index of the default button
  • escapeButtonIndex, the index of the escape button, or -1 if not used
Returns
int, the index of the selected button or -1 if no selection

◆ showMinimized()

void AppWindow::showMinimized ( )

Sets the Packet Tracer main window to the minimum size.

◆ showNormal()

void AppWindow::showNormal ( )

Sets the Packet Tracer main window to the normal size.

◆ suppressInstructionDlg()

void AppWindow::suppressInstructionDlg ( bool  )

◆ writeToPT()

void AppWindow::writeToPT ( QString  )

Writes a message to the IPC Log and shows it.

Parameters
msg,themessage to write to the IPC Log.

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