Falkon Develop
Cross-platform Qt-based web browser
WebView Class Referenceabstract

#include <webview.h>

Inheritance diagram for WebView:
PopupWebView TabbedWebView TestWebView

Public Slots

void zoomIn ()
 
void zoomOut ()
 
void zoomReset ()
 
void editUndo ()
 
void editRedo ()
 
void editCut ()
 
void editCopy ()
 
void editPaste ()
 
void editSelectAll ()
 
void editDelete ()
 
void reloadBypassCache ()
 
void back ()
 
void forward ()
 
void printPage ()
 
void showSource ()
 
void sendPageByMail ()
 
void openUrlInNewTab (const QUrl &url, Qz::NewTabPositionFlags position)
 
virtual void closeView ()=0
 
virtual void loadInNewTab (const LoadRequest &req, Qz::NewTabPositionFlags position)=0
 
virtual bool isFullScreen ()=0
 
virtual void requestFullScreen (bool enable)=0
 

Signals

void pageChanged (WebPage *page)
 
void focusChanged (bool)
 
void viewportResized (QSize)
 
void showNotification (QWidget *)
 
void privacyChanged (bool)
 
void zoomLevelChanged (int)
 
void backgroundActivityChanged (bool)
 

Public Member Functions

 WebView (QWidget *parent=nullptr)
 
 ~WebView () override
 
QIcon icon (bool allowNull=false) const
 
QString title (bool allowEmpty=false) const
 
WebPagepage () const
 
void setPage (WebPage *page)
 
void load (const QUrl &url)
 
void load (const LoadRequest &request)
 
bool isLoading () const
 
int loadingProgress () const
 
bool backgroundActivity () const
 
int zoomLevel () const
 
void setZoomLevel (int level)
 
QPointF mapToViewport (const QPointF &pos) const
 
QRect scrollBarGeometry (Qt::Orientation orientation) const
 
void addNotification (QWidget *notif)
 
bool eventFilter (QObject *obj, QEvent *event) override
 
QWidget * inputWidget () const
 
virtual QWidget * overlayWidget ()=0
 

Static Public Member Functions

static bool isUrlValid (const QUrl &url)
 
static QList< int > zoomLevels ()
 
static bool forceContextMenuOnMouseRelease ()
 
static void setForceContextMenuOnMouseRelease (bool force)
 

Protected Slots

void slotLoadStarted ()
 
void slotLoadProgress (int progress)
 
void slotLoadFinished (bool ok)
 
void slotIconChanged ()
 
void slotUrlChanged (const QUrl &url)
 
void slotTitleChanged (const QString &title)
 
void openUrlInNewWindow ()
 
void sendTextByMail ()
 
void copyLinkToClipboard ()
 
void savePageAs ()
 
void copyImageToClipboard ()
 
void downloadLinkToDisk ()
 
void downloadImageToDisk ()
 
void downloadMediaToDisk ()
 
void openActionUrl ()
 
void showSiteInfo ()
 
void searchSelectedText ()
 
void searchSelectedTextInBackgroundTab ()
 
void bookmarkLink ()
 
void openUrlInSelectedTab ()
 
void openUrlInBackgroundTab ()
 
void userDefinedOpenUrlInNewTab (const QUrl &url=QUrl(), bool invert=false)
 
void userDefinedOpenUrlInBgTab (const QUrl &url=QUrl())
 

Protected Member Functions

void showEvent (QShowEvent *event) override
 
void resizeEvent (QResizeEvent *event) override
 
void contextMenuEvent (QContextMenuEvent *event) override
 
bool focusNextPrevChild (bool next) override
 
virtual void _wheelEvent (QWheelEvent *event)
 
virtual void _mousePressEvent (QMouseEvent *event)
 
virtual void _mouseReleaseEvent (QMouseEvent *event)
 
virtual void _mouseMoveEvent (QMouseEvent *event)
 
virtual void _keyPressEvent (QKeyEvent *event)
 
virtual void _keyReleaseEvent (QKeyEvent *event)
 
virtual void _contextMenuEvent (QContextMenuEvent *event)
 
void loadRequest (const LoadRequest &req)
 
void applyZoom ()
 
void createContextMenu (QMenu *menu, WebHitTestResult &hitTest)
 
void createPageContextMenu (QMenu *menu)
 
void createLinkContextMenu (QMenu *menu, const WebHitTestResult &hitTest)
 
void createImageContextMenu (QMenu *menu, const WebHitTestResult &hitTest)
 
void createSelectedTextContextMenu (QMenu *menu, const WebHitTestResult &hitTest)
 
void createMediaContextMenu (QMenu *menu, const WebHitTestResult &hitTest)
 
void checkForForm (QAction *action, const QPoint &pos)
 
void createSearchEngine ()
 

Detailed Description

Definition at line 32 of file webview.h.

Constructor & Destructor Documentation

◆ WebView()

WebView::WebView ( QWidget *  parent = nullptr)
explicit

Definition at line 57 of file webview.cpp.

◆ ~WebView()

WebView::~WebView ( )
override

Definition at line 82 of file webview.cpp.

Member Function Documentation

◆ _contextMenuEvent()

void WebView::_contextMenuEvent ( QContextMenuEvent *  event)
protectedvirtual

Definition at line 1237 of file webview.cpp.

◆ _keyPressEvent()

void WebView::_keyPressEvent ( QKeyEvent *  event)
protectedvirtual

Definition at line 1167 of file webview.cpp.

◆ _keyReleaseEvent()

void WebView::_keyReleaseEvent ( QKeyEvent *  event)
protectedvirtual

Definition at line 1218 of file webview.cpp.

◆ _mouseMoveEvent()

void WebView::_mouseMoveEvent ( QMouseEvent *  event)
protectedvirtual

Definition at line 1160 of file webview.cpp.

◆ _mousePressEvent()

void WebView::_mousePressEvent ( QMouseEvent *  event)
protectedvirtual

Definition at line 1076 of file webview.cpp.

◆ _mouseReleaseEvent()

void WebView::_mouseReleaseEvent ( QMouseEvent *  event)
protectedvirtual

Definition at line 1112 of file webview.cpp.

◆ _wheelEvent()

void WebView::_wheelEvent ( QWheelEvent *  event)
protectedvirtual

Definition at line 1032 of file webview.cpp.

◆ addNotification()

void WebView::addNotification ( QWidget *  notif)

Definition at line 286 of file webview.cpp.

◆ applyZoom()

void WebView::applyZoom ( )
protected

Definition at line 291 of file webview.cpp.

◆ back

void WebView::back ( )
slot

Definition at line 363 of file webview.cpp.

◆ backgroundActivity()

bool WebView::backgroundActivity ( ) const

Definition at line 224 of file webview.cpp.

◆ backgroundActivityChanged

void WebView::backgroundActivityChanged ( bool  )
signal

◆ bookmarkLink

void WebView::bookmarkLink ( )
protectedslot

Definition at line 593 of file webview.cpp.

◆ checkForForm()

void WebView::checkForForm ( QAction *  action,
const QPoint &  pos 
)
protected

Definition at line 923 of file webview.cpp.

◆ closeView

virtual void WebView::closeView ( )
pure virtualslot

Implemented in TestWebView, PopupWebView, and TabbedWebView.

◆ contextMenuEvent()

void WebView::contextMenuEvent ( QContextMenuEvent *  event)
overrideprotected

Definition at line 1248 of file webview.cpp.

◆ copyImageToClipboard

void WebView::copyImageToClipboard ( )
protectedslot

Definition at line 516 of file webview.cpp.

◆ copyLinkToClipboard

void WebView::copyLinkToClipboard ( )
protectedslot

Definition at line 494 of file webview.cpp.

◆ createContextMenu()

void WebView::createContextMenu ( QMenu *  menu,
WebHitTestResult hitTest 
)
protected

Definition at line 672 of file webview.cpp.

◆ createImageContextMenu()

void WebView::createImageContextMenu ( QMenu *  menu,
const WebHitTestResult hitTest 
)
protected

Definition at line 828 of file webview.cpp.

◆ createLinkContextMenu()

void WebView::createLinkContextMenu ( QMenu *  menu,
const WebHitTestResult hitTest 
)
protected

Definition at line 801 of file webview.cpp.

◆ createMediaContextMenu()

void WebView::createMediaContextMenu ( QMenu *  menu,
const WebHitTestResult hitTest 
)
protected

Definition at line 909 of file webview.cpp.

◆ createPageContextMenu()

void WebView::createPageContextMenu ( QMenu *  menu)
protected

Definition at line 748 of file webview.cpp.

◆ createSearchEngine()

void WebView::createSearchEngine ( )
protected

Definition at line 945 of file webview.cpp.

◆ createSelectedTextContextMenu()

void WebView::createSelectedTextContextMenu ( QMenu *  menu,
const WebHitTestResult hitTest 
)
protected

Definition at line 851 of file webview.cpp.

◆ downloadImageToDisk

void WebView::downloadImageToDisk ( )
protectedslot

Definition at line 526 of file webview.cpp.

◆ downloadLinkToDisk

void WebView::downloadLinkToDisk ( )
protectedslot

Definition at line 521 of file webview.cpp.

◆ downloadMediaToDisk

void WebView::downloadMediaToDisk ( )
protectedslot

Definition at line 531 of file webview.cpp.

◆ editCopy

void WebView::editCopy ( )
slot

Definition at line 337 of file webview.cpp.

◆ editCut

void WebView::editCut ( )
slot

Definition at line 332 of file webview.cpp.

◆ editDelete

void WebView::editDelete ( )
slot

Definition at line 352 of file webview.cpp.

◆ editPaste

void WebView::editPaste ( )
slot

Definition at line 342 of file webview.cpp.

◆ editRedo

void WebView::editRedo ( )
slot

Definition at line 327 of file webview.cpp.

◆ editSelectAll

void WebView::editSelectAll ( )
slot

Definition at line 347 of file webview.cpp.

◆ editUndo

void WebView::editUndo ( )
slot

Definition at line 322 of file webview.cpp.

◆ eventFilter()

bool WebView::eventFilter ( QObject *  obj,
QEvent *  event 
)
override

Definition at line 1274 of file webview.cpp.

◆ focusChanged

void WebView::focusChanged ( bool  )
signal

◆ focusNextPrevChild()

bool WebView::focusNextPrevChild ( bool  next)
overrideprotected

Definition at line 1264 of file webview.cpp.

◆ forceContextMenuOnMouseRelease()

bool WebView::forceContextMenuOnMouseRelease ( )
static

Definition at line 272 of file webview.cpp.

◆ forward

void WebView::forward ( )
slot

Definition at line 374 of file webview.cpp.

◆ icon()

QIcon WebView::icon ( bool  allowNull = false) const

Definition at line 90 of file webview.cpp.

◆ inputWidget()

QWidget * WebView::inputWidget ( ) const

Definition at line 251 of file webview.cpp.

◆ isFullScreen

virtual bool WebView::isFullScreen ( )
pure virtualslot

Implemented in TestWebView, PopupWebView, and TabbedWebView.

◆ isLoading()

bool WebView::isLoading ( ) const

Definition at line 214 of file webview.cpp.

◆ isUrlValid()

bool WebView::isUrlValid ( const QUrl &  url)
static

Definition at line 257 of file webview.cpp.

◆ load() [1/2]

void WebView::load ( const LoadRequest request)

Definition at line 191 of file webview.cpp.

◆ load() [2/2]

void WebView::load ( const QUrl &  url)

Definition at line 177 of file webview.cpp.

◆ loadingProgress()

int WebView::loadingProgress ( ) const

Definition at line 219 of file webview.cpp.

◆ loadInNewTab

virtual void WebView::loadInNewTab ( const LoadRequest req,
Qz::NewTabPositionFlags  position 
)
pure virtualslot

Implemented in TestWebView, PopupWebView, and TabbedWebView.

◆ loadRequest()

void WebView::loadRequest ( const LoadRequest req)
protected

Definition at line 1269 of file webview.cpp.

◆ mapToViewport()

QPointF WebView::mapToViewport ( const QPointF &  pos) const

Definition at line 240 of file webview.cpp.

◆ openActionUrl

void WebView::openActionUrl ( )
protectedslot

Definition at line 541 of file webview.cpp.

◆ openUrlInBackgroundTab

void WebView::openUrlInBackgroundTab ( )
protectedslot

Definition at line 615 of file webview.cpp.

◆ openUrlInNewTab

void WebView::openUrlInNewTab ( const QUrl &  url,
Qz::NewTabPositionFlags  position 
)
slot

Definition at line 536 of file webview.cpp.

◆ openUrlInNewWindow

void WebView::openUrlInNewWindow ( )
protectedslot

Definition at line 468 of file webview.cpp.

◆ openUrlInSelectedTab

void WebView::openUrlInSelectedTab ( )
protectedslot

Definition at line 608 of file webview.cpp.

◆ overlayWidget()

virtual QWidget * WebView::overlayWidget ( )
pure virtual

Implemented in TestWebView, PopupWebView, and TabbedWebView.

◆ page()

WebPage * WebView::page ( ) const

Definition at line 132 of file webview.cpp.

◆ pageChanged

void WebView::pageChanged ( WebPage page)
signal

◆ printPage

void WebView::printPage ( )
slot

Definition at line 385 of file webview.cpp.

◆ privacyChanged

void WebView::privacyChanged ( bool  )
signal

◆ reloadBypassCache

void WebView::reloadBypassCache ( )
slot

Definition at line 358 of file webview.cpp.

◆ requestFullScreen

virtual void WebView::requestFullScreen ( bool  enable)
pure virtualslot

Implemented in TestWebView, PopupWebView, and TabbedWebView.

◆ resizeEvent()

void WebView::resizeEvent ( QResizeEvent *  event)
overrideprotected

Definition at line 1242 of file webview.cpp.

◆ savePageAs

void WebView::savePageAs ( )
protectedslot

Definition at line 501 of file webview.cpp.

◆ scrollBarGeometry()

QRect WebView::scrollBarGeometry ( Qt::Orientation  orientation) const

Definition at line 245 of file webview.cpp.

◆ searchSelectedText

void WebView::searchSelectedText ( )
protectedslot

Definition at line 567 of file webview.cpp.

◆ searchSelectedTextInBackgroundTab

void WebView::searchSelectedTextInBackgroundTab ( )
protectedslot

Definition at line 580 of file webview.cpp.

◆ sendPageByMail

void WebView::sendPageByMail ( )
slot

Definition at line 485 of file webview.cpp.

◆ sendTextByMail

void WebView::sendTextByMail ( )
protectedslot

Definition at line 475 of file webview.cpp.

◆ setForceContextMenuOnMouseRelease()

void WebView::setForceContextMenuOnMouseRelease ( bool  force)
static

Definition at line 278 of file webview.cpp.

◆ setPage()

void WebView::setPage ( WebPage page)

Definition at line 137 of file webview.cpp.

◆ setZoomLevel()

void WebView::setZoomLevel ( int  level)

Definition at line 234 of file webview.cpp.

◆ showEvent()

void WebView::showEvent ( QShowEvent *  event)
overrideprotected

Definition at line 662 of file webview.cpp.

◆ showNotification

void WebView::showNotification ( QWidget *  )
signal

◆ showSiteInfo

void WebView::showSiteInfo ( )
protectedslot

Definition at line 561 of file webview.cpp.

◆ showSource

void WebView::showSource ( )
slot

Definition at line 548 of file webview.cpp.

◆ slotIconChanged

void WebView::slotIconChanged ( )
protectedslot

Definition at line 442 of file webview.cpp.

◆ slotLoadFinished

void WebView::slotLoadFinished ( bool  ok)
protectedslot

Definition at line 434 of file webview.cpp.

◆ slotLoadProgress

void WebView::slotLoadProgress ( int  progress)
protectedslot

Definition at line 422 of file webview.cpp.

◆ slotLoadStarted

void WebView::slotLoadStarted ( )
protectedslot

Definition at line 413 of file webview.cpp.

◆ slotTitleChanged

void WebView::slotTitleChanged ( const QString &  title)
protectedslot

Definition at line 458 of file webview.cpp.

◆ slotUrlChanged

void WebView::slotUrlChanged ( const QUrl &  url)
protectedslot

Definition at line 447 of file webview.cpp.

◆ title()

QString WebView::title ( bool  allowEmpty = false) const

Definition at line 107 of file webview.cpp.

◆ userDefinedOpenUrlInBgTab

void WebView::userDefinedOpenUrlInBgTab ( const QUrl &  url = QUrl())
protectedslot

Definition at line 648 of file webview.cpp.

◆ userDefinedOpenUrlInNewTab

void WebView::userDefinedOpenUrlInNewTab ( const QUrl &  url = QUrl(),
bool  invert = false 
)
protectedslot

Definition at line 622 of file webview.cpp.

◆ viewportResized

void WebView::viewportResized ( QSize  )
signal

◆ zoomIn

void WebView::zoomIn ( )
slot

Definition at line 298 of file webview.cpp.

◆ zoomLevel()

int WebView::zoomLevel ( ) const

Definition at line 229 of file webview.cpp.

◆ zoomLevelChanged

void WebView::zoomLevelChanged ( int  )
signal

◆ zoomLevels()

QList< int > WebView::zoomLevels ( )
static

Definition at line 264 of file webview.cpp.

◆ zoomOut

void WebView::zoomOut ( )
slot

Definition at line 306 of file webview.cpp.

◆ zoomReset

void WebView::zoomReset ( )
slot

Definition at line 314 of file webview.cpp.


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