# eric7.WebBrowser.WebBrowserSingleApplication

Module implementing the single application server and client for the web browser.

### Global Attributes

SAFile
SALoadUrl
SANewTab
SASearch
SAShutdown

### Classes

WebBrowserSingleApplicationClient | Class implementing the single application client of the web browser.
WebBrowserSingleApplicationServer | Class implementing the single application server embedded within the Web Browser.

### Functions

None

## WebBrowserSingleApplicationClient

Class implementing the single application client of the web browser.

### Derived from

SingleApplicationClient

### Class Attributes

None

### Class Methods

None

### Methods

WebBrowserSingleApplicationClient | Constructor
__loadUrl | Private method to send an URL to be loaded.
__newTab | Private method to send an URL to be loaded in a new tab.
__search | Private method to send a word to search for.
__shutdown | Private method to signal a shutdown request to the browser.
processArgs | Public method to process the command line args passed to the UI.

### Static Methods

None

#### WebBrowserSingleApplicationClient (Constructor)

WebBrowserSingleApplicationClient(name="")

Constructor

name (str)
  name to be used by the single application server

#### WebBrowserSingleApplicationClient.__loadUrl

__loadUrl(url)

Private method to send an URL to be loaded.

url (str)
  URL to be loaded

#### WebBrowserSingleApplicationClient.__newTab

__newTab(url)

Private method to send an URL to be loaded in a new tab.

url (str)
  URL to be loaded

#### WebBrowserSingleApplicationClient.__search

__search(word)

Private method to send a word to search for.

word (str)
  to to be searched for

#### WebBrowserSingleApplicationClient.__shutdown

__shutdown()

Private method to signal a shutdown request to the browser.

#### WebBrowserSingleApplicationClient.processArgs

processArgs(args, disconnect=True)

Public method to process the command line args passed to the UI.

args (argparse.Namespace)
  namespace object containing the parsed command line parameters
disconnect (bool)
  flag indicating to disconnect when done

Up

## WebBrowserSingleApplicationServer

Class implementing the single application server embedded within the Web Browser.

### Signals

loadUrl(str)
  emitted to load an URL
newTab(str)
  emitted to load an URL in a new tab
search(str)
  emitted to search for a given word
shutdown()
  emitted to shut down the browser

### Derived from

SingleApplicationServer

### Class Attributes

None

### Class Methods

None

### Methods

WebBrowserSingleApplicationServer | Constructor
__saLoadUrl | Private method to load an URL in a new tab.
__saNewTab | Private method to load an URL .
__saSearch | Private method to search for a given word.
__saShutdown | Private method to shut down the web browser.
handleCommand | Public slot to handle the command sent by the client.

### Static Methods

None

#### WebBrowserSingleApplicationServer (Constructor)

WebBrowserSingleApplicationServer(name="")

Constructor

name (str)
  name to be used by the single application server

#### WebBrowserSingleApplicationServer.__saLoadUrl

__saLoadUrl(url)

Private method to load an URL in a new tab.

url (str)
  URL to be loaded

#### WebBrowserSingleApplicationServer.__saNewTab

__saNewTab(url)

Private method to load an URL .

url (str)
  URL to be loaded

#### WebBrowserSingleApplicationServer.__saSearch

__saSearch(word)

Private method to search for a given word.

word (str)
  word to be searched for

#### WebBrowserSingleApplicationServer.__saShutdown

__saShutdown()

Private method to shut down the web browser.

#### WebBrowserSingleApplicationServer.handleCommand

handleCommand(command, arguments)

Public slot to handle the command sent by the client.

command (str)
  command sent by the client
arguments (list of str)
  list of command arguments

Up