pycrossword  0.3
Pure-Python implementation of a crossword puzzle generator and editor
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
pycross.browser.WebView Class Reference

Main widget component of the web browser used to view and edit web documents. More...

Inheritance diagram for pycross.browser.WebView:

Public Member Functions

def __init__ (self, parent=None)
 
def setPage (self, page)
 Makes page the new web page of the web view. More...
 
def createWebActionTrigger (self, page, webAction)
 Connects the web action Changed signal to custom signal. More...
 
def isWebActionEnabled (self, webAction)
 Checks if a web action is enabled. More...
 
def favIcon (self)
 Returns the current page's favicon. More...
 
def createWindow (self, windowtype)
 Creates a new GUI window for the page depending on the window type. More...
 
def contextMenuEvent (self, QtGui.QContextMenuEvent event)
 Handles the context (right-click) menu for the page showing a menu with available web actions. More...
 
def on_menu_action (self, checked)
 Handler called when a context menu action is triggered. More...
 
def on_loadStarted (self)
 Handler called when page loading has started. More...
 
def on_loadProgress (self, value)
 Handler called while the page is being loaded. More...
 
def on_loadFinished (self, ok)
 Handler called when the page has been loaded. More...
 
def on_iconChanged (self, icon)
 Handler called when the page favicon has been changed. More...
 
def on_renderProcessTerminated (self, terminationStatus, exitCode)
 Handler called when page rendering (loading) has been stopped. More...
 

Public Attributes

 m_loadProgress
 int page load status (%) More...
 

Static Public Attributes

 webActionEnabledChanged = QtCore.pyqtSignal(QtWebEngineWidgets.QWebEnginePage.WebAction, bool)
 signal emitted when a web action (back, forward etc) is changed (e.g. More...
 
 favIconChanged = QtCore.pyqtSignal(QtGui.QIcon)
 signal emitted when the page favicon is changed More...
 
 devToolsRequested = QtCore.pyqtSignal(QtWebEngineWidgets.QWebEnginePage)
 signal emitted when the user requests the Developer Tools on that page More...
 

Detailed Description

Main widget component of the web browser used to view and edit web documents.

Contains a single WebPage object.

Constructor & Destructor Documentation

◆ __init__()

def pycross.browser.WebView.__init__ (   self,
  parent = None 
)

Member Function Documentation

◆ contextMenuEvent()

def pycross.browser.WebView.contextMenuEvent (   self,
QtGui.QContextMenuEvent  event 
)

Handles the context (right-click) menu for the page showing a menu with available web actions.

Parameters
eventQtGui.QContextMenuEvent the context menu event

◆ createWebActionTrigger()

def pycross.browser.WebView.createWebActionTrigger (   self,
  page,
  webAction 
)

Connects the web action Changed signal to custom signal.

Parameters
pageQtWebEngineWidgets.QWebEnginePage web page whose action we are connecting
webActionQtWebEngineWidgets.QWebEnginePage.WebAction web action to connect

◆ createWindow()

def pycross.browser.WebView.createWindow (   self,
  windowtype 
)

Creates a new GUI window for the page depending on the window type.

Parameters
windowtypeQtWebEngineWidgets.QWebEnginePage.WebWindowType type of the new window
Returns
QtWidgets.QWidget new window

◆ favIcon()

def pycross.browser.WebView.favIcon (   self)

Returns the current page's favicon.

Returns
QtGui.QIcon the favicon

◆ isWebActionEnabled()

def pycross.browser.WebView.isWebActionEnabled (   self,
  webAction 
)

Checks if a web action is enabled.

Parameters
webActionQtWebEngineWidgets.QWebEnginePage.WebAction web action to check
Returns
bool the action's Enabled status

◆ on_iconChanged()

def pycross.browser.WebView.on_iconChanged (   self,
  icon 
)

Handler called when the page favicon has been changed.

Parameters
iconQtGui.QIcon the new icon

◆ on_loadFinished()

def pycross.browser.WebView.on_loadFinished (   self,
  ok 
)

Handler called when the page has been loaded.

Parameters
okbool load status: True = successful load; False = error

◆ on_loadProgress()

def pycross.browser.WebView.on_loadProgress (   self,
  value 
)

Handler called while the page is being loaded.

Parameters
valueint current load progress (%)

◆ on_loadStarted()

def pycross.browser.WebView.on_loadStarted (   self)

Handler called when page loading has started.

◆ on_menu_action()

def pycross.browser.WebView.on_menu_action (   self,
  checked 
)

Handler called when a context menu action is triggered.

◆ on_renderProcessTerminated()

def pycross.browser.WebView.on_renderProcessTerminated (   self,
  terminationStatus,
  exitCode 
)

Handler called when page rendering (loading) has been stopped.

Parameters
terminationStatusQtWebEngineWidgets.QWebEnginePage.RenderProcessTerminationStatus the termination status (reason)
exitCodeint the exit (error) code

◆ setPage()

def pycross.browser.WebView.setPage (   self,
  page 
)

Makes page the new web page of the web view.

Parameters
pageQtWebEngineWidgets.QWebEnginePage new page

Member Data Documentation

◆ devToolsRequested

pycross.browser.WebView.devToolsRequested = QtCore.pyqtSignal(QtWebEngineWidgets.QWebEnginePage)
static

signal emitted when the user requests the Developer Tools on that page

◆ favIconChanged

pycross.browser.WebView.favIconChanged = QtCore.pyqtSignal(QtGui.QIcon)
static

signal emitted when the page favicon is changed

◆ m_loadProgress

pycross.browser.WebView.m_loadProgress

int page load status (%)

◆ webActionEnabledChanged

pycross.browser.WebView.webActionEnabledChanged = QtCore.pyqtSignal(QtWebEngineWidgets.QWebEnginePage.WebAction, bool)
static

signal emitted when a web action (back, forward etc) is changed (e.g.

disabled / enabled)


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