The browser dialog displays HTML code in a browser panel. The HTML code is delivered through a separate object of class BrowserSource which acts as a "server" for a specific kind of URL scheme. Whenever the browser sees a URL starting with "int:" it will ask the connected BrowserSource object for the HTML code of that page using it's 'get' method. The task of the BrowserSource object is to format the data requested in HTML and deliver it.
One use case for that class is the implementation of rich data browsers for structured information. In a simple scenario, the browser dialog can be instantiated with a static HTML page. In that case, only the content of that page is shown.
| void | _create | | Ensures the C++ object is created |
| void | _destroy | | Explicitly destroys the object |
| [const] | bool | _destroyed? | | Returns a value indicating whether the object was already destroyed |
| [const] | bool | _is_const_object? | | Returns a value indicating whether the reference is a const reference |
| void | _manage | | Marks the object as managed by the script side. |
| void | _unmanage | | Marks the object as no longer owned by the script side. |
| void | caption= | (string caption) | Sets the caption of the window |
| int | execute | | Executes the HTML browser dialog as a modal window |
| void | home= | (string home_url) | Sets the browser's initial and current URL which is selected if the "home" location is choosen |
| void | label= | (string label) | Sets the label text |
| void | load | (string url) | Loads the given URL into the browser dialog |
| void | reload | | Reloads the current page |
| void | resize | (int width, int height) | Sets the size of the dialog window |
| void | search | (string search_item) | Issues a search request using the given search item and the search URL specified with set_search_url |
| void | set_search_url | (string url, string query_item) | Enables the search field and specifies the search URL generated for a search |
| void | source= | (BrowserSource ptr source) | Connects to a source object |
_create | Signature: void _create Description: Ensures the C++ object is created
Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created. |
_destroy | Signature: void _destroy Description: Explicitly destroys the object
Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception.
If the object is not owned by the script, this method will do nothing. |
_destroyed? | Signature: [const] bool _destroyed? Description: Returns a value indicating whether the object was already destroyed
This method returns true, if the object was destroyed, either explicitly or by the C++ side.
The latter may happen, if the object is owned by a C++ object which got destroyed itself. |
_is_const_object? | Signature: [const] bool _is_const_object? Description: Returns a value indicating whether the reference is a const reference
This method returns true, if self is a const reference.
In that case, only const methods may be called on self. |
_manage | Signature: void _manage Description: Marks the object as managed by the script side.
After calling this method on an object, the script side will be responsible for the management of the object. This method may be called if an object is returned from a C++ function and the object is known not to be owned by any C++ instance. If necessary, the script side may delete the object if the script's reference is no longer required. Usually it's not required to call this method. It has been introduced in version 0.24. |
_unmanage | Signature: void _unmanage Description: Marks the object as no longer owned by the script side.
Calling this method will make this object no longer owned by the script's memory management. Instead, the object must be managed in some other way. Usually this method may be called if it is known that some C++ object holds and manages this object. Technically speaking, this method will turn the script's reference into a weak reference. After the script engine decides to delete the reference, the object itself will still exist. If the object is not managed otherwise, memory leaks will occur. Usually it's not required to call this method. It has been introduced in version 0.24. |
caption= | Signature: void caption= (string caption) Description: Sets the caption of the window Python specific notes: The object exposes a writable attribute 'caption'. This is the setter.
|
closed | Signature: [virtual] void closed Description: Callback when the dialog is closed Use of this method is deprecated |
create | Signature: void create Description: Ensures the C++ object is created Use of this method is deprecated. Use _create instead |
destroy | Signature: void destroy Description: Explicitly destroys the object Use of this method is deprecated. Use _destroy instead |
destroyed? | Signature: [const] bool destroyed? Description: Returns a value indicating whether the object was already destroyed Use of this method is deprecated. Use _destroyed? instead |
exec | Signature: int exec Description: Executes the HTML browser dialog as a modal window Use of this method is deprecated. Use execute instead Python specific notes: This method is available as method 'exec_' in Python
|
execute | Signature: int execute Description: Executes the HTML browser dialog as a modal window Python specific notes: This method is available as method 'exec_' in Python
|
home= | Signature: void home= (string home_url) Description: Sets the browser's initial and current URL which is selected if the "home" location is choosen The home URL is the one shown initially and the one which is selected when the "home" button is pressed. The default location is "int:/index.html".
Python specific notes: The object exposes a writable attribute 'home'. This is the setter.
|
is_const_object? | Signature: [const] bool is_const_object? Description: Returns a value indicating whether the reference is a const reference Use of this method is deprecated. Use _is_const_object? instead |
label= | Signature: void label= (string label) Description: Sets the label text The label is shown left of the navigation buttons.
By default, no label is specified. This method has been introduced in version 0.23.
Python specific notes: The object exposes a writable attribute 'label'. This is the setter.
|
load | Signature: void load (string url) Description: Loads the given URL into the browser dialog Typically the URL has the "int:" scheme so the HTML code is taken from the BrowserSource object.
|
new | Signature: [static] new BrowserDialog ptr new (BrowserSource ptr source) Description: Creates a HTML browser window with a BrowserSource as the source of HTML code This method has been introduced in version 0.23.
Python specific notes: This method is the default initializer of the object
|
Signature: [static] new BrowserDialog ptr new (string html) Description: Creates a HTML browser window with a static HTML content This method has been introduced in version 0.23.
Python specific notes: This method is the default initializer of the object
|
Signature: [static] new BrowserDialog ptr new (QWidget ptr parent,BrowserSource ptr source) Description: Creates a HTML browser window with a BrowserSource as the source of HTML code This method variant with a parent argument has been introduced in version 0.24.2.
Python specific notes: This method is the default initializer of the object
|
Signature: [static] new BrowserDialog ptr new (QWidget ptr parent,string html) Description: Creates a HTML browser window with a static HTML content This method variant with a parent argument has been introduced in version 0.24.2.
Python specific notes: This method is the default initializer of the object
|
reload | Signature: void reload Description: Reloads the current page |
resize | Signature: void resize (int width,int height) Description: Sets the size of the dialog window |
search | Signature: void search (string search_item) Description: Issues a search request using the given search item and the search URL specified with set_search_url See set_search_url for a description of the search mechanism.
|
set_caption | Signature: void set_caption (string caption) Description: Sets the caption of the window Use of this method is deprecated. Use caption= instead Python specific notes: The object exposes a writable attribute 'caption'. This is the setter.
|
set_home | Signature: void set_home (string home_url) Description: Sets the browser's initial and current URL which is selected if the "home" location is choosen Use of this method is deprecated. Use home= instead Python specific notes: The object exposes a writable attribute 'home'. This is the setter.
|
set_search_url | Signature: void set_search_url (string url,string query_item) Description: Enables the search field and specifies the search URL generated for a search If a search URL is set, the search box right to the navigation bar will be enabled. When a text is entered into the search box, the browser will navigate to an URL composed of the search URL, the search item and the search text, i.e. "myurl?item=search_text". This method has been introduced in version 0.23.
|
set_size | Signature: void set_size (int width,int height) Description: Sets the size of the dialog window Use of this method is deprecated. Use resize instead |
set_source | Signature: void set_source (BrowserSource ptr source) Description: Connects to a source object Use of this method is deprecated. Use source= instead Python specific notes: The object exposes a writable attribute 'source'. This is the setter.
|
source= | Signature: void source= (BrowserSource ptr source) Description: Connects to a source object Setting the source should be the first thing done after the BrowserDialog object is created. It will not have any effect after the browser has loaded the first page. In particular, home= should be called after the source was set. Python specific notes: The object exposes a writable attribute 'source'. This is the setter.
|