Falkon Develop
Cross-platform Qt-based web browser
QmlTab Class Reference

The class exposing a browser tab to QML. More...

#include <qmltab.h>

Inheritance diagram for QmlTab:

Signals

void titleChanged (const QString &title)
 The signal emitted when the tab title is changed. More...
 
void pinnedChanged (bool pinned)
 The signal emitted when pinned state of the tab is changed. More...
 
void loadingChanged (bool loading)
 The signal emitted when loading state of the tab is changed. More...
 
void mutedChanged (bool muted)
 The signal emitted when muted state of the tab is changed. More...
 
void restoredChanged (bool restored)
 The signal emitted when restored state of the tab is changed. More...
 
void playingChanged (bool playing)
 The signal emitted when playing state of the tab is changed. More...
 
void zoomLevelChanged (int zoomLevel)
 The signal emitted when zoom level of the tab is changed. More...
 
void backgroundActivityChanged (int backgroundActivityChanged)
 The signal emitted when background activity of the tab is changed. More...
 
void navigationRequestAccepted (const QUrl &url, QWebEnginePage::NavigationType type, bool isMainFrame)
 The signal emitted when navigation request is accepted. More...
 

Public Member Functions

 QmlTab (WebTab *webTab=nullptr, QObject *parent=nullptr)
 
Q_INVOKABLE void detach ()
 Detaches the tab. More...
 
Q_INVOKABLE void setZoomLevel (int zoomLevel)
 Set the zoom level of the tab. More...
 
Q_INVOKABLE void stop ()
 Stops webview associated with the tab. More...
 
Q_INVOKABLE void reload ()
 Reloads webview associated with the tab. More...
 
Q_INVOKABLE void unload ()
 Unloads the tab. More...
 
Q_INVOKABLE void load (const QString &url)
 Loads webview associated with the tab. More...
 
Q_INVOKABLE void zoomIn ()
 Decreases the zoom level of the tab. More...
 
Q_INVOKABLE void zoomOut ()
 Increases the zoom level of the tab. More...
 
Q_INVOKABLE void zoomReset ()
 Resets the tab zoom level. More...
 
Q_INVOKABLE void undo ()
 Performs edit undo on the tab. More...
 
Q_INVOKABLE void redo ()
 Performs edit redo on the tab. More...
 
Q_INVOKABLE void selectAll ()
 Performs edit select-all on the tab. More...
 
Q_INVOKABLE void reloadBypassCache ()
 Reloads the tab by bypassing the cache. More...
 
Q_INVOKABLE void back ()
 Loads the previous page. More...
 
Q_INVOKABLE void forward ()
 Loads the next page. More...
 
Q_INVOKABLE void printPage ()
 Prints the page. More...
 
Q_INVOKABLE void showSource ()
 Shows the page source. More...
 
Q_INVOKABLE void sendPageByMail ()
 Sends page by mail. More...
 
Q_INVOKABLE QVariant execJavaScript (const QJSValue &value)
 execute JavaScript function in a page More...
 
Q_INVOKABLE QmlWebHitTestResulthitTestContent (const QPoint &point)
 Gets result of web hit test at a given point. More...
 
void setWebPage (WebPage *webPage)
 

Properties

QString url
 url of the tab More...
 
QString title
 title of the tab More...
 
int zoomLevel
 zoom level of the tab More...
 
int index
 index of the tab More...
 
bool pinned
 checks if the tab is pinned More...
 
bool muted
 checks if the tab is muted More...
 
bool restored
 checks if the tab is restored More...
 
bool current
 checks if the tab is the current tab More...
 
bool playing
 checks if the tab is playing More...
 
QmlWindowbrowserWindow
 window of the tab More...
 
bool loading
 checks if the tab is loading More...
 
int loadingProgress
 get the loading progress of the tab More...
 
bool backgroundActivity
 checks if the tab has associated background activity More...
 
bool canGoBack
 checks if the tab is can go back More...
 
bool canGoForward
 checks if the tab is can go forward More...
 

Detailed Description

The class exposing a browser tab to QML.

Definition at line 31 of file qmltab.h.

Constructor & Destructor Documentation

◆ QmlTab()

QmlTab::QmlTab ( WebTab webTab = nullptr,
QObject *  parent = nullptr 
)
explicit

Definition at line 26 of file qmltab.cpp.

Member Function Documentation

◆ back()

void QmlTab::back ( )

Loads the previous page.

Definition at line 158 of file qmltab.cpp.

◆ backgroundActivityChanged

void QmlTab::backgroundActivityChanged ( int  backgroundActivityChanged)
signal

The signal emitted when background activity of the tab is changed.

Parameters
Boolrepresenting if there is background activity attached to the tab

◆ detach()

void QmlTab::detach ( )

Detaches the tab.

Definition at line 39 of file qmltab.cpp.

◆ execJavaScript()

QVariant QmlTab::execJavaScript ( const QJSValue &  value)

execute JavaScript function in a page

Parameters
value,representingJavaScript function
Returns
QVariant, the return value of executed javascript

Definition at line 203 of file qmltab.cpp.

◆ forward()

void QmlTab::forward ( )

Loads the next page.

Definition at line 167 of file qmltab.cpp.

◆ hitTestContent()

QmlWebHitTestResult * QmlTab::hitTestContent ( const QPoint &  point)

Gets result of web hit test at a given point.

Parameters
point
Returns
result of web hit test

Definition at line 215 of file qmltab.cpp.

◆ load()

void QmlTab::load ( const QString &  url)

Loads webview associated with the tab.

Parameters
Stringrepresenting the url to load

Definition at line 84 of file qmltab.cpp.

◆ loadingChanged

void QmlTab::loadingChanged ( bool  loading)
signal

The signal emitted when loading state of the tab is changed.

Parameters
Boolrepresenting if the tab is loading

◆ mutedChanged

void QmlTab::mutedChanged ( bool  muted)
signal

The signal emitted when muted state of the tab is changed.

Parameters
Boolrepresenting if the tab is muted

◆ navigationRequestAccepted

void QmlTab::navigationRequestAccepted ( const QUrl &  url,
QWebEnginePage::NavigationType  type,
bool  isMainFrame 
)
signal

The signal emitted when navigation request is accepted.

Parameters
url,representingrequested url
typeof navigation
isMainFrame,representsif navigation is requested for a top level page.

◆ pinnedChanged

void QmlTab::pinnedChanged ( bool  pinned)
signal

The signal emitted when pinned state of the tab is changed.

Parameters
Boolrepresenting if a tab is pinned

◆ playingChanged

void QmlTab::playingChanged ( bool  playing)
signal

The signal emitted when playing state of the tab is changed.

Parameters
Boolrepresenting if the tab is in playing state

◆ printPage()

void QmlTab::printPage ( )

Prints the page.

Definition at line 176 of file qmltab.cpp.

◆ redo()

void QmlTab::redo ( )

Performs edit redo on the tab.

Definition at line 131 of file qmltab.cpp.

◆ reload()

void QmlTab::reload ( )

Reloads webview associated with the tab.

Definition at line 66 of file qmltab.cpp.

◆ reloadBypassCache()

void QmlTab::reloadBypassCache ( )

Reloads the tab by bypassing the cache.

Definition at line 149 of file qmltab.cpp.

◆ restoredChanged

void QmlTab::restoredChanged ( bool  restored)
signal

The signal emitted when restored state of the tab is changed.

Parameters
Boolrepresenting if the tab is restored

◆ selectAll()

void QmlTab::selectAll ( )

Performs edit select-all on the tab.

Definition at line 140 of file qmltab.cpp.

◆ sendPageByMail()

void QmlTab::sendPageByMail ( )

Sends page by mail.

Definition at line 194 of file qmltab.cpp.

◆ setWebPage()

void QmlTab::setWebPage ( WebPage webPage)

Definition at line 364 of file qmltab.cpp.

◆ setZoomLevel()

void QmlTab::setZoomLevel ( int  zoomLevel)

Set the zoom level of the tab.

Parameters
Integerrepresenting the zoom level

Definition at line 48 of file qmltab.cpp.

◆ showSource()

void QmlTab::showSource ( )

Shows the page source.

Definition at line 185 of file qmltab.cpp.

◆ stop()

void QmlTab::stop ( )

Stops webview associated with the tab.

Definition at line 57 of file qmltab.cpp.

◆ titleChanged

void QmlTab::titleChanged ( const QString &  title)
signal

The signal emitted when the tab title is changed.

Parameters
Stringrepresenting the new title

◆ undo()

void QmlTab::undo ( )

Performs edit undo on the tab.

Definition at line 122 of file qmltab.cpp.

◆ unload()

void QmlTab::unload ( )

Unloads the tab.

Definition at line 75 of file qmltab.cpp.

◆ zoomIn()

void QmlTab::zoomIn ( )

Decreases the zoom level of the tab.

Definition at line 95 of file qmltab.cpp.

◆ zoomLevelChanged

void QmlTab::zoomLevelChanged ( int  zoomLevel)
signal

The signal emitted when zoom level of the tab is changed.

Parameters
Integerrepresenting the zoom level

◆ zoomOut()

void QmlTab::zoomOut ( )

Increases the zoom level of the tab.

Definition at line 104 of file qmltab.cpp.

◆ zoomReset()

void QmlTab::zoomReset ( )

Resets the tab zoom level.

Definition at line 113 of file qmltab.cpp.

Property Documentation

◆ backgroundActivity

bool QmlTab::backgroundActivity
read

checks if the tab has associated background activity

Definition at line 1 of file qmltab.h.

◆ browserWindow

QmlWindow* QmlTab::browserWindow
read

window of the tab

Definition at line 1 of file qmltab.h.

◆ canGoBack

bool QmlTab::canGoBack
read

checks if the tab is can go back

Definition at line 1 of file qmltab.h.

◆ canGoForward

bool QmlTab::canGoForward
read

checks if the tab is can go forward

Definition at line 1 of file qmltab.h.

◆ current

bool QmlTab::current
read

checks if the tab is the current tab

Definition at line 1 of file qmltab.h.

◆ index

int QmlTab::index
read

index of the tab

Definition at line 1 of file qmltab.h.

◆ loading

bool QmlTab::loading
read

checks if the tab is loading

Definition at line 1 of file qmltab.h.

◆ loadingProgress

int QmlTab::loadingProgress
read

get the loading progress of the tab

Definition at line 1 of file qmltab.h.

◆ muted

bool QmlTab::muted
read

checks if the tab is muted

Definition at line 1 of file qmltab.h.

◆ pinned

bool QmlTab::pinned
read

checks if the tab is pinned

Definition at line 1 of file qmltab.h.

◆ playing

bool QmlTab::playing
read

checks if the tab is playing

Definition at line 1 of file qmltab.h.

◆ restored

bool QmlTab::restored
read

checks if the tab is restored

Definition at line 1 of file qmltab.h.

◆ title

QString QmlTab::title
read

title of the tab

Definition at line 1 of file qmltab.h.

◆ url

QString QmlTab::url
read

url of the tab

Definition at line 1 of file qmltab.h.

◆ zoomLevel

int QmlTab::zoomLevel
read

zoom level of the tab

Zoom levels are from 0 to 18

Definition at line 1 of file qmltab.h.


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