Projects/WebKit/Library: Difference between revisions

    From KDE TechBase
    (Update documentation)
    Line 11: Line 11:
    * void showContextMenu() [signal] : If setCustomContextMenu is set to true, this signal will be emited when the user right-clicks on the page.
    * void showContextMenu() [signal] : If setCustomContextMenu is set to true, this signal will be emited when the user right-clicks on the page.
    * void openUrlInNewTab(const KUrl) [signal] : When the user middle-clicks a link, instead of opening it, KWebView will emit this signal. In tab-enabled browsers, this usually results in opening a new tab.
    * void openUrlInNewTab(const KUrl) [signal] : When the user middle-clicks a link, instead of opening it, KWebView will emit this signal. In tab-enabled browsers, this usually results in opening a new tab.
    * void load(const KUrl&, const KParts::OpenUrlArguments&, const KParts::BrowserArguments&) : convenience function similar to QWebView::load(), but for KParts-style arguments instead.


    === KWebPage ===
    === KWebPage ===
    A QWebPage with KDE integration.
    A QWebPage with KDE integration.
    * void setAllowExternalContent(bool) : Useful for, as an example, email applications: should this KWebPage be allowed to request content from the web?
    * bool isExternalContentAllowed() : Will this KWebPage load content from the web?


    === KIO/AccessManger, KIO/AccessMangerReply (before: KNetworkAccessManager, KNetworkReply) ===
    === KIO/AccessManger, KIO/AccessMangerReply (before: KNetworkAccessManager, KNetworkReply) ===
    Overwrites the default QtNetwork based QNetworkAccessManager for KIO-based network-interaction.
    Overwrites the default QtNetwork based QNetworkAccessManager for KIO-based network-interaction. Also supplies a few special additions (like the rest of WebKitKDE does).
    * void setAllowExternalContent(bool) : Should this AccessManager load content from the web?
    * bool isExternalContentAllowed() : Will this AccessManager load content from the web?

    Revision as of 02:11, 13 May 2009

    This page is still work in progress.

    About

    The WebKitKDE library sits on top of QtWebKit, providing KDE integration (for example, WebActions using KDE icons and shortcuts, downloading using KIO, etc). WebKitKDE provides the following classes:

    KWebView

    A QWebView with KDE integration.

    • KWebPage* KWebView::page() : Overridden from QWebView, it return a KWebPage instead of a QWebPage.
    • QWidget* KWebView::searchBar() : Get a search bar widget, usable for searching the page.
    • void setCustomContextMenu(bool) [slot] : Should KWebView use it's own context menu, or should it emit a signal on right-click.
    • void showContextMenu() [signal] : If setCustomContextMenu is set to true, this signal will be emited when the user right-clicks on the page.
    • void openUrlInNewTab(const KUrl) [signal] : When the user middle-clicks a link, instead of opening it, KWebView will emit this signal. In tab-enabled browsers, this usually results in opening a new tab.
    • void load(const KUrl&, const KParts::OpenUrlArguments&, const KParts::BrowserArguments&) : convenience function similar to QWebView::load(), but for KParts-style arguments instead.

    KWebPage

    A QWebPage with KDE integration.

    • void setAllowExternalContent(bool) : Useful for, as an example, email applications: should this KWebPage be allowed to request content from the web?
    • bool isExternalContentAllowed() : Will this KWebPage load content from the web?

    KIO/AccessManger, KIO/AccessMangerReply (before: KNetworkAccessManager, KNetworkReply)

    Overwrites the default QtNetwork based QNetworkAccessManager for KIO-based network-interaction. Also supplies a few special additions (like the rest of WebKitKDE does).

    • void setAllowExternalContent(bool) : Should this AccessManager load content from the web?
    • bool isExternalContentAllowed() : Will this AccessManager load content from the web?