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

InstructionDlg is the instruction dialog associated with activity files. More...

Public Member Functions

void resetActivity ()
 Resets the activity. More...
 
void showAnswerPage (bool)
 Shows the Check Results page. More...
 
void closeAnswerPage ()
 Closes the Check Results page. More...
 
void prev ()
 Shows the previous instruction page. More...
 
void next ()
 Shows the next instruction page. More...
 
void alwaysOnTop (bool)
 Enables or disables the always on top feature. More...
 
void dock ()
 Dock the instructions dialog to the left of the main window. More...
 
void undock ()
 Undock the instructions dialog. More...
 
bool isDocked ()
 Returns true if instructions dialog is docked, false otherwise. More...
 
void dockChanged (bool)
 This event is emitted when this window is docked or undocked. More...
 
void setVisible (bool)
 Shows or hides this widget from view. More...
 
void setWidgetVisible (string, bool)
 Shows or hides the specified child widget. More...
 
void setDisabled (bool)
 Enables or disables input events to this widget. More...
 
void setWidgetDisable (string, bool)
 Enables or disables the specified child widget. More...
 
bool isEditInstructionsLocked ()
 
void setEditInstructionsLocked (bool)
 
void setWindowGeometry (int, int, int, int)
 
int getX ()
 
int getY ()
 
int getWidth ()
 
int getHeight ()
 
void raise ()
 
WebView getWebView ()
 
void countdownExpired ()
 This event is emitted when countdown expires. More...
 
bool isShowCheckResultsLockMessage ()
 
void setShowCheckResultsLockMessage (bool)
 set to show check results lock message or not. More...
 
void overrideTimeLabel (QString, QString)
 Overrides the time label in the instruction box. More...
 
void overrideProgressLabel (QString, QString)
 Overrides the progress label in the instruction box. More...
 
void overrideInstructions ()
 Overrides the instructions and the system will not update instructions anymore. More...
 
WebView getTabWebView (int)
 Returns the web view in a tab. More...
 
void setTabVisible (int, bool)
 Shows or hides a tab. More...
 
bool addButton (QString, QString, HorizontalAlignment, int, int)
 Adds a button to the instruction dialog. More...
 
bool addSlider (QString, int, int, int, HorizontalAlignment, int, int)
 Adds a slider to the instruction dialog. More...
 
bool addLabel (QString, QString, HorizontalAlignment)
 Adds a label to the instruction dialog. More...
 
bool removeWidget (QString)
 Removes a widget that was previously added to the instruction dialog. More...
 
bool setSliderValue (QString, int)
 Sets the value of a slider that was previously added to the instruction dialog. More...
 
bool setLabelText (QString, QString)
 Sets the text on the label that was previously added to the instruction dialog. More...
 
bool setWidgetToolTip (QString, QString)
 Sets the tooltip for a widget that was previously added to the instruction dialog. More...
 
void buttonClicked (QString)
 This event is emitted when a button that was previously added to the instruction dialog is clicked. More...
 
void sliderValueChanged (QString, int)
 This event is emitted when the value of a slider that was previously added to the instruction dialog is changed. More...
 

Detailed Description

InstructionDlg is the instruction dialog associated with activity files.

Member Function Documentation

◆ addButton()

bool InstructionDlg::addButton ( QString  ,
QString  ,
HorizontalAlignment  ,
int  ,
int   
)

Adds a button to the instruction dialog.

Parameters
name,thename of the widget
label,thelabel on the button
alignment,HorizontalAlignmentenum: Left = 0x00000001, Right = 0x00000002
minWidth,theminimum width of the widget
maxWidth,themaximum width of the widget

◆ addLabel()

bool InstructionDlg::addLabel ( QString  ,
QString  ,
HorizontalAlignment   
)

Adds a label to the instruction dialog.

Parameters
name,thename of the widget
text,thetext on the label
alignment,HorizontalAlignmentenum: Left = 0x00000001, Right = 0x00000002

◆ addSlider()

bool InstructionDlg::addSlider ( QString  ,
int  ,
int  ,
int  ,
HorizontalAlignment  ,
int  ,
int   
)

Adds a slider to the instruction dialog.

Parameters
name,thename of the widget
min,theminimum value
max,themaximum value
alignment,HorizontalAlignmentenum: Left = 0x00000001, Right = 0x00000002
minWidth,theminimum width of the widget
maxWidth,themaximum width of the widget

◆ alwaysOnTop()

void InstructionDlg::alwaysOnTop ( bool  )

Enables or disables the always on top feature.

Parameters
bOn,trueto enable the always on top feature, false to disable it.

◆ buttonClicked()

void InstructionDlg::buttonClicked ( QString  )

This event is emitted when a button that was previously added to the instruction dialog is clicked.

Parameters
name,thename of the widget

IPC event.

◆ closeAnswerPage()

void InstructionDlg::closeAnswerPage ( )

Closes the Check Results page.

◆ countdownExpired()

void InstructionDlg::countdownExpired ( )

This event is emitted when countdown expires.

IPC event.

◆ dock()

void InstructionDlg::dock ( )

Dock the instructions dialog to the left of the main window.

◆ dockChanged()

void InstructionDlg::dockChanged ( bool  )

This event is emitted when this window is docked or undocked.

IPC event.

◆ getHeight()

int InstructionDlg::getHeight ( )

◆ getTabWebView()

WebView InstructionDlg::getTabWebView ( int  )

Returns the web view in a tab.

◆ getWebView()

WebView InstructionDlg::getWebView ( )

◆ getWidth()

int InstructionDlg::getWidth ( )

◆ getX()

int InstructionDlg::getX ( )

◆ getY()

int InstructionDlg::getY ( )

◆ isDocked()

bool InstructionDlg::isDocked ( )

Returns true if instructions dialog is docked, false otherwise.

Returns
bool, true if instructions dialog is docked, false otherwise.

◆ isEditInstructionsLocked()

bool InstructionDlg::isEditInstructionsLocked ( )

◆ isShowCheckResultsLockMessage()

bool InstructionDlg::isShowCheckResultsLockMessage ( )

◆ next()

void InstructionDlg::next ( )

Shows the next instruction page.

◆ overrideInstructions()

void InstructionDlg::overrideInstructions ( )

Overrides the instructions and the system will not update instructions anymore.

◆ overrideProgressLabel()

void InstructionDlg::overrideProgressLabel ( QString  ,
QString   
)

Overrides the progress label in the instruction box.

◆ overrideTimeLabel()

void InstructionDlg::overrideTimeLabel ( QString  ,
QString   
)

Overrides the time label in the instruction box.

◆ prev()

void InstructionDlg::prev ( )

Shows the previous instruction page.

◆ raise()

void InstructionDlg::raise ( )

◆ removeWidget()

bool InstructionDlg::removeWidget ( QString  )

Removes a widget that was previously added to the instruction dialog.

Parameters
name,thename of the widget

◆ resetActivity()

void InstructionDlg::resetActivity ( )

Resets the activity.

◆ setDisabled()

void InstructionDlg::setDisabled ( bool  )

Enables or disables input events to this widget.

Parameters
bDisabled,trueto disable input events to this widget, false to enable input events.

◆ setEditInstructionsLocked()

void InstructionDlg::setEditInstructionsLocked ( bool  )

◆ setLabelText()

bool InstructionDlg::setLabelText ( QString  ,
QString   
)

Sets the text on the label that was previously added to the instruction dialog.

Parameters
name,thename of the widget
text,thetext

◆ setShowCheckResultsLockMessage()

void InstructionDlg::setShowCheckResultsLockMessage ( bool  )

set to show check results lock message or not.

Parameters
bShow,trueto show check result lock message, false to not show.

◆ setSliderValue()

bool InstructionDlg::setSliderValue ( QString  ,
int   
)

Sets the value of a slider that was previously added to the instruction dialog.

Parameters
name,thename of the widget
value,thevalue

◆ setTabVisible()

void InstructionDlg::setTabVisible ( int  ,
bool   
)

Shows or hides a tab.

◆ setVisible()

void InstructionDlg::setVisible ( bool  )

Shows or hides this widget from view.

Parameters
bVisible,trueto show this widget, false to hide it.

◆ setWidgetDisable()

void InstructionDlg::setWidgetDisable ( string  ,
bool   
)

Enables or disables the specified child widget.

Parameters
widgetName,wherewidgetName can be one of the following: checkAnswerBtn, resetBtn, prevBtn, nextBtn, topCB, progressLbl, timeLbl.
bDisabled,trueto disable input events to this child widget, false to enable input events.

◆ setWidgetToolTip()

bool InstructionDlg::setWidgetToolTip ( QString  ,
QString   
)

Sets the tooltip for a widget that was previously added to the instruction dialog.

Parameters
name,thename of the widget
tooltip,thetooltip

◆ setWidgetVisible()

void InstructionDlg::setWidgetVisible ( string  ,
bool   
)

Shows or hides the specified child widget.

Parameters
widgetName,wherewidgetName can be one of the following: checkAnswerBtn, resetBtn, prevBtn, nextBtn, topCB, progressLbl, timeLbl.
bVisible,trueto show this child widget, false to hide it.

◆ setWindowGeometry()

void InstructionDlg::setWindowGeometry ( int  ,
int  ,
int  ,
int   
)

◆ showAnswerPage()

void InstructionDlg::showAnswerPage ( bool  )

Shows the Check Results page.

Parameters
bResetOnClose,trueto reset the activity after closing the Check Results page, false to not reset the activity.

◆ sliderValueChanged()

void InstructionDlg::sliderValueChanged ( QString  ,
int   
)

This event is emitted when the value of a slider that was previously added to the instruction dialog is changed.

Parameters
name,thename of the widget
value,thenew value of the slider

IPC event.

◆ undock()

void InstructionDlg::undock ( )

Undock the instructions dialog.


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