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

WebView allows manipulation of WebViews such as the Instruction dialog and Script Modules. More...

Public Member Functions

uuid getWebViewId ()
 Returns the UUID of this WebView. More...
 
QString evaluateToVariant (QString)
 Evaluates the specified script. More...
 
void evaluateJavaScriptAsync (QString)
 Evaluates the specified script asynchronously. More...
 
void setHtml (QString)
 Sets the HTML content of the WebView. More...
 
void setUrl (QString)
 Sets the URL of the WebView. More...
 
QString getUrl ()
 Returns the URL of the current page being displayed. More...
 
QString getRequestedUrl ()
 Returns the requested URL, which may be different than what getUrl() returns. More...
 
void show ()
 Shows the WebView. More...
 
void hide ()
 Hides the WebView. More...
 
void raise ()
 Shows the WebView on top of other windows. More...
 
void setWindowTitle (QString)
 Sets the window title of the WebView. More...
 
void setGeometry (int, int, int, int)
 Sets the window position and geometry of the WebView. More...
 
int getX ()
 Returns the x position of the webview. More...
 
int getY ()
 Returns the y position of the webview. More...
 
int getWidth ()
 Returns the width of the webview. More...
 
int getHeight ()
 Returns the height of the webview. More...
 
void setMaximumSize (int, int)
 Sets the maximum size of the web view. More...
 
void setMaximumWidth (int)
 Sets the maximum width of the webview. More...
 
void setMaximumHeight (int)
 Sets the maximum height of the webview. More...
 
int getMaximumWidth ()
 Returns the maximum width of the webview. More...
 
int getMaximumHeight ()
 Returns the maximum height of the webview. More...
 
void setMinimumSize (int, int)
 Sets the minimum size of the web view. More...
 
void setMinimumWidth (int)
 Sets the minimum width of the webview. More...
 
void setMinimumHeight (int)
 Sets the minimum height of the webview. More...
 
int getMinimumWidth ()
 Returns the minimum width of the webview. More...
 
int getMinimumHeight ()
 Returns the minimum height of the webview. More...
 
void setPreferredSize (int, int)
 Sets the preferred size of the webview. More...
 
int getPreferredWidth ()
 Returns the preferred width of the webview. More...
 
int getPreferredHeight ()
 Returns the preferred height of the webview. More...
 
void isFullScreen ()
 
void showFullScreen ()
 
void isMaximized ()
 
void showMaximized ()
 
void isMinimized ()
 
void showMinimized ()
 
void showNormal ()
 
void setWindowFlags (WindowFlags)
 
WindowFlags getWindowFlags ()
 Returns the window flags for the WebView. See setWindowFlags() for enum values. More...
 
void setWindowModality (WindowModality)
 Sets the window modality for the WebView. More...
 
void setCanClose (bool)
 Allows or disallows closing of the WebView. More...
 
void closeRequested (uuid)
 IPC event. More...
 
void closed (uuid)
 IPC event. More...
 
void onFocus ()
 IPC event. More...
 
void offFocus ()
 IPC event. More...
 
bool addAllowedExternalFilter (QString)
 
bool removeAllowedExternalFilter (QString)
 
bool hasAllowedExternalFilter (QString)
 
vector< QString > getAllowedExternalFilters ()
 
void clearAllowedExternalFilters ()
 
void close ()
 
void attachToMainViewArea ()
 
void detachFromMainViewArea ()
 
bool isAttachedToMainViewArea ()
 
void javascriptDone (QString, QString)
 IPC event. More...
 
void dockToMainViewArea ()
 
void dockToMainViewAreaWithOptions (QString, DockWidgetArea, DockWidgetArea, Orientation, DockWidgetFeatures)
 
void undockFromMainViewArea ()
 
bool isDockedToMainViewArea ()
 
QString getDockWidgetWindowTitle ()
 
void setDockWidgetWindowTitle (QString)
 
void setBackgroundColor (long)
 
long getBackgroundColor ()
 
void setZoomFactor (double)
 
double getZoomFactor ()
 
void fileSystemResourceRequested (SmFileSystemResourceRequest)
 IPC event. More...
 
void enableRightClickMenu (bool)
 

Detailed Description

WebView allows manipulation of WebViews such as the Instruction dialog and Script Modules.

Member Function Documentation

◆ addAllowedExternalFilter()

bool WebView::addAllowedExternalFilter ( QString  )

◆ attachToMainViewArea()

void WebView::attachToMainViewArea ( )

◆ clearAllowedExternalFilters()

void WebView::clearAllowedExternalFilters ( )

◆ close()

void WebView::close ( )

◆ closed()

void WebView::closed ( uuid  )

IPC event.

◆ closeRequested()

void WebView::closeRequested ( uuid  )

IPC event.

◆ detachFromMainViewArea()

void WebView::detachFromMainViewArea ( )

◆ dockToMainViewArea()

void WebView::dockToMainViewArea ( )

◆ dockToMainViewAreaWithOptions()

void WebView::dockToMainViewAreaWithOptions ( QString  ,
DockWidgetArea  ,
DockWidgetArea  ,
Orientation  ,
DockWidgetFeatures   
)

◆ enableRightClickMenu()

void WebView::enableRightClickMenu ( bool  )

◆ evaluateJavaScriptAsync()

void WebView::evaluateJavaScriptAsync ( QString  )

Evaluates the specified script asynchronously.

Parameters
scriptSource,thepath or source of the script.

◆ evaluateToVariant()

QString WebView::evaluateToVariant ( QString  )

Evaluates the specified script.

Parameters
scriptSource,thepath or source of the script.
Returns
QString, returns the a unique string to match result from generated event.

◆ fileSystemResourceRequested()

void WebView::fileSystemResourceRequested ( SmFileSystemResourceRequest  )

IPC event.

◆ getAllowedExternalFilters()

vector< QString > WebView::getAllowedExternalFilters ( )

◆ getBackgroundColor()

long WebView::getBackgroundColor ( )

◆ getDockWidgetWindowTitle()

QString WebView::getDockWidgetWindowTitle ( )

◆ getHeight()

int WebView::getHeight ( )

Returns the height of the webview.

◆ getMaximumHeight()

int WebView::getMaximumHeight ( )

Returns the maximum height of the webview.

◆ getMaximumWidth()

int WebView::getMaximumWidth ( )

Returns the maximum width of the webview.

◆ getMinimumHeight()

int WebView::getMinimumHeight ( )

Returns the minimum height of the webview.

◆ getMinimumWidth()

int WebView::getMinimumWidth ( )

Returns the minimum width of the webview.

◆ getPreferredHeight()

int WebView::getPreferredHeight ( )

Returns the preferred height of the webview.

◆ getPreferredWidth()

int WebView::getPreferredWidth ( )

Returns the preferred width of the webview.

◆ getRequestedUrl()

QString WebView::getRequestedUrl ( )

Returns the requested URL, which may be different than what getUrl() returns.

◆ getUrl()

QString WebView::getUrl ( )

Returns the URL of the current page being displayed.

◆ getWebViewId()

uuid WebView::getWebViewId ( )

Returns the UUID of this WebView.

Returns
uuid, the UUID of this WebView.

◆ getWidth()

int WebView::getWidth ( )

Returns the width of the webview.

◆ getWindowFlags()

WindowFlags WebView::getWindowFlags ( )

Returns the window flags for the WebView. See setWindowFlags() for enum values.

◆ getX()

int WebView::getX ( )

Returns the x position of the webview.

◆ getY()

int WebView::getY ( )

Returns the y position of the webview.

◆ getZoomFactor()

double WebView::getZoomFactor ( )

◆ hasAllowedExternalFilter()

bool WebView::hasAllowedExternalFilter ( QString  )

◆ hide()

void WebView::hide ( )

Hides the WebView.

◆ isAttachedToMainViewArea()

bool WebView::isAttachedToMainViewArea ( )

◆ isDockedToMainViewArea()

bool WebView::isDockedToMainViewArea ( )

◆ isFullScreen()

void WebView::isFullScreen ( )

◆ isMaximized()

void WebView::isMaximized ( )

◆ isMinimized()

void WebView::isMinimized ( )

◆ javascriptDone()

void WebView::javascriptDone ( QString  ,
QString   
)

IPC event.

◆ offFocus()

void WebView::offFocus ( )

IPC event.

◆ onFocus()

void WebView::onFocus ( )

IPC event.

◆ raise()

void WebView::raise ( )

Shows the WebView on top of other windows.

◆ removeAllowedExternalFilter()

bool WebView::removeAllowedExternalFilter ( QString  )

◆ setBackgroundColor()

void WebView::setBackgroundColor ( long  )

◆ setCanClose()

void WebView::setCanClose ( bool  )

Allows or disallows closing of the WebView.

Parameters
bCanClose,trueto allow closing of the WebView, false to disallow.

◆ setDockWidgetWindowTitle()

void WebView::setDockWidgetWindowTitle ( QString  )

◆ setGeometry()

void WebView::setGeometry ( int  ,
int  ,
int  ,
int   
)

Sets the window position and geometry of the WebView.

Parameters
x,thex-coordinate for the WebView.
y,they-coordinate for the WebView.
width,thewidth for the WebView.
height,theheight for the WebView.

◆ setHtml()

void WebView::setHtml ( QString  )

Sets the HTML content of the WebView.

Parameters
html,theHTML content for the WebView.

◆ setMaximumHeight()

void WebView::setMaximumHeight ( int  )

Sets the maximum height of the webview.

◆ setMaximumSize()

void WebView::setMaximumSize ( int  ,
int   
)

Sets the maximum size of the web view.

◆ setMaximumWidth()

void WebView::setMaximumWidth ( int  )

Sets the maximum width of the webview.

◆ setMinimumHeight()

void WebView::setMinimumHeight ( int  )

Sets the minimum height of the webview.

◆ setMinimumSize()

void WebView::setMinimumSize ( int  ,
int   
)

Sets the minimum size of the web view.

◆ setMinimumWidth()

void WebView::setMinimumWidth ( int  )

Sets the minimum width of the webview.

◆ setPreferredSize()

void WebView::setPreferredSize ( int  ,
int   
)

Sets the preferred size of the webview.

◆ setUrl()

void WebView::setUrl ( QString  )

Sets the URL of the WebView.

Parameters
url,theURL for the WebView.

◆ setWindowFlags()

void WebView::setWindowFlags ( WindowFlags  )
    \brief Sets the window flags for the WebView.

    \param flags,   the window flags.
                    Window flags:
                        Widget = 0x00000000,
                        Window = 0x00000001,
                        Dialog = 0x00000002 | Window,
                        Sheet = 0x00000004 | Window,
                        Drawer = Sheet | Dialog,
                        Popup = 0x00000008 | Window,
                        Tool = Popup | Dialog,
                        ToolTip = Popup | Sheet,
                        SplashScreen = ToolTip | Dialog,
                        Desktop = 0x00000010 | Window,
                        SubWindow = 0x00000012,
                        ForeignWindow = 0x00000020 | Window,
                        CoverWindow = 0x00000040 | Window,

                        WindowType_Mask = 0x000000ff,
                        MSWindowsFixedSizeDialogHint = 0x00000100,
                        MSWindowsOwnDC = 0x00000200,
                        BypassWindowManagerHint = 0x00000400,
                        X11BypassWindowManagerHint = BypassWindowManagerHint,
                        FramelessWindowHint = 0x00000800,
                        WindowTitleHint = 0x00001000,
                        WindowSystemMenuHint = 0x00002000,
                        WindowMinimizeButtonHint = 0x00004000,
                        WindowMaximizeButtonHint = 0x00008000,
                        WindowMinMaxButtonsHint = WindowMinimizeButtonHint | WindowMaximizeButtonHint,
                        WindowContextHelpButtonHint = 0x00010000,
                        WindowShadeButtonHint = 0x00020000,
                        WindowStaysOnTopHint = 0x00040000,
                        WindowTransparentForInput = 0x00080000,
                        WindowOverridesSystemGestures = 0x00100000,
                        WindowDoesNotAcceptFocus = 0x00200000,
                        MaximizeUsingFullscreenGeometryHint = 0x00400000,

                        CustomizeWindowHint = 0x02000000,
                        WindowStaysOnBottomHint = 0x04000000,
                        WindowCloseButtonHint = 0x08000000,
                        MacWindowToolBarButtonHint = 0x10000000,
                        BypassGraphicsProxyWidget = 0x20000000,
                        NoDropShadowWindowHint = 0x40000000,
                        WindowFullscreenButtonHint = 0x80000000,

The following enums have overlapping values with other enums. This was not intentional, but it's too late to change now. WindowOkButtonHint = 0x00080000, // WindowTransparentForInput WindowCancelButtonHint = 0x00100000 // WindowOverridesSystemGestures

◆ setWindowModality()

void WebView::setWindowModality ( WindowModality  )

Sets the window modality for the WebView.

Parameters
modality,thewindow modality. Window flags: Qt::NonModal = 0, Qt::WindowModal = 1, Qt::ApplicationModal = 2,

◆ setWindowTitle()

void WebView::setWindowTitle ( QString  )

Sets the window title of the WebView.

Parameters
title,thetitle for the WebView.

◆ setZoomFactor()

void WebView::setZoomFactor ( double  )

◆ show()

void WebView::show ( )

Shows the WebView.

◆ showFullScreen()

void WebView::showFullScreen ( )

◆ showMaximized()

void WebView::showMaximized ( )

◆ showMinimized()

void WebView::showMinimized ( )

◆ showNormal()

void WebView::showNormal ( )

◆ undockFromMainViewArea()

void WebView::undockFromMainViewArea ( )

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