22#include <QWebEnginePage>
25#include "../windows/qmlwindow.h"
38 Q_PROPERTY(QString
url READ
url CONSTANT)
112 explicit QmlTab(
WebTab *webTab =
nullptr, QObject *parent =
nullptr);
117 Q_INVOKABLE
void detach();
126 Q_INVOKABLE
void stop();
130 Q_INVOKABLE
void reload();
134 Q_INVOKABLE
void unload();
139 Q_INVOKABLE
void load(
const QString &
url);
143 Q_INVOKABLE
void zoomIn();
155 Q_INVOKABLE
void undo();
159 Q_INVOKABLE
void redo();
171 Q_INVOKABLE
void back();
261 WebTab *m_webTab =
nullptr;
263 QList<QMetaObject::Connection> m_lambdaConnections;
266 QString
title()
const;
281 void createConnections();
282 void removeConnections();
The class exposing a browser tab to QML.
Q_INVOKABLE void detach()
Detaches the tab.
int index
index of the tab
bool pinned
checks if the tab is pinned
Q_INVOKABLE void printPage()
Prints the page.
bool restored
checks if the tab is restored
Q_INVOKABLE void reload()
Reloads webview associated with the tab.
void pinnedChanged(bool pinned)
The signal emitted when pinned state of the tab is changed.
void setWebPage(WebPage *webPage)
bool loading
checks if the tab is loading
void backgroundActivityChanged(int backgroundActivityChanged)
The signal emitted when background activity of the tab is changed.
int loadingProgress
get the loading progress of the tab
bool backgroundActivity
checks if the tab has associated background activity
QString title
title of the tab
int zoomLevel
zoom level of the tab
Q_INVOKABLE void showSource()
Shows the page source.
Q_INVOKABLE void stop()
Stops webview associated with the tab.
Q_INVOKABLE void reloadBypassCache()
Reloads the tab by bypassing the cache.
bool current
checks if the tab is the current tab
void titleChanged(const QString &title)
The signal emitted when the tab title is changed.
QmlTab(WebTab *webTab=nullptr, QObject *parent=nullptr)
Q_INVOKABLE void selectAll()
Performs edit select-all on the tab.
Q_INVOKABLE void setZoomLevel(int zoomLevel)
Set the zoom level of the tab.
void restoredChanged(bool restored)
The signal emitted when restored state of the tab is changed.
bool canGoForward
checks if the tab is can go forward
Q_INVOKABLE void back()
Loads the previous page.
void zoomLevelChanged(int zoomLevel)
The signal emitted when zoom level of the tab is changed.
void navigationRequestAccepted(const QUrl &url, QWebEnginePage::NavigationType type, bool isMainFrame)
The signal emitted when navigation request is accepted.
Q_INVOKABLE void unload()
Unloads the tab.
void playingChanged(bool playing)
The signal emitted when playing state of the tab is changed.
Q_INVOKABLE void forward()
Loads the next page.
Q_INVOKABLE void undo()
Performs edit undo on the tab.
QString url
url of the tab
void loadingChanged(bool loading)
The signal emitted when loading state of the tab is changed.
Q_INVOKABLE QVariant execJavaScript(const QJSValue &value)
execute JavaScript function in a page
bool muted
checks if the tab is muted
Q_INVOKABLE void load(const QString &url)
Loads webview associated with the tab.
Q_INVOKABLE void zoomOut()
Increases the zoom level of the tab.
Q_INVOKABLE void zoomReset()
Resets the tab zoom level.
bool playing
checks if the tab is playing
Q_INVOKABLE void redo()
Performs edit redo on the tab.
void mutedChanged(bool muted)
The signal emitted when muted state of the tab is changed.
Q_INVOKABLE void zoomIn()
Decreases the zoom level of the tab.
Q_INVOKABLE QmlWebHitTestResult * hitTestContent(const QPoint &point)
Gets result of web hit test at a given point.
Q_INVOKABLE void sendPageByMail()
Sends page by mail.
bool canGoBack
checks if the tab is can go back
QmlWindow * browserWindow
window of the tab
The class exposing result of WebHitTest to QML.
The class exposing Browser window to QML.
int value(const QColor &c)