Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F16570374
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
17 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/kdewebkit/CMakeLists.txt b/kdewebkit/CMakeLists.txt
index 4a281df98c..e2b95af54e 100644
--- a/kdewebkit/CMakeLists.txt
+++ b/kdewebkit/CMakeLists.txt
@@ -1,36 +1,37 @@
project(kdewebkit)
include_directories(
${KDE4_KDECORE_INCLUDES}
${KDE4_KDEUI_INCLUDES}
${KDE4_KIO_INCLUDES}
${KDE4_KPARTS_INCLUDES}
)
set(kdewebkit_LIB_SRCS
kwebwallet.cpp
kgraphicswebview.cpp
kwebpage.cpp
kwebview.cpp
kwebpluginfactory.cpp
)
kde4_add_library(kdewebkit ${LIBRARY_TYPE}
${kdewebkit_LIB_SRCS}
)
+generate_export_header(kdewebkit)
target_link_libraries(kdewebkit ${KDE4_KPARTS_LIBS} ${QT_QTWEBKIT_LIBRARY} kcoreaddons)
target_link_libraries(kdewebkit LINK_INTERFACE_LIBRARIES kparts kio kdecore ${QT_QTWEBKIT_LIBRARY} ${QT_QTNETWORK_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTCORE_LIBRARY})
set_target_properties(kdewebkit PROPERTIES VERSION ${KDE_NON_GENERIC_LIB_VERSION} SOVERSION ${KDE_NON_GENERIC_LIB_SOVERSION})
install(TARGETS kdewebkit ${INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES
- kdewebkit_export.h
+ ${CMAKE_CURRENT_BINARY_DIR}/kdewebkit_export.h
kwebwallet.h
kgraphicswebview.h
kwebpluginfactory.h
kwebpage.h
kwebview.h
DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel)
diff --git a/kdewebkit/kdewebkit_export.h b/kdewebkit/kdewebkit_export.h
deleted file mode 100644
index d3b3f9cbc4..0000000000
--- a/kdewebkit/kdewebkit_export.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * This file is part of the KDE project.
- *
- * Copyright (C) 2009 Urs Wolfer <uwolfer @ kde.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef KDEWEBKIT_EXPORT_H
-#define KDEWEBKIT_EXPORT_H
-
-/* needed for KDE_EXPORT and KDE_IMPORT macros */
-#include <kdemacros.h>
-
-#ifndef KDEWEBKIT_EXPORT
-# if defined(KDELIBS_STATIC_LIBS)
- /* No export/import for static libraries */
-# define KDEWEBKIT_EXPORT
-# elif defined(MAKE_KDEWEBKIT_LIB)
- /* We are building this library */
-# define KDEWEBKIT_EXPORT KDE_EXPORT
-# else
- /* We are using this library */
-# define KDEWEBKIT_EXPORT KDE_IMPORT
-# endif
-#endif
-
-# ifndef KDEWEBKIT_EXPORT_DEPRECATED
-# define KDEWEBKIT_EXPORT_DEPRECATED KDE_DEPRECATED KDEWEBKIT_EXPORT
-# endif
-
-#endif // KDEWEBKIT_EXPORT_H
diff --git a/kdewebkit/kgraphicswebview.h b/kdewebkit/kgraphicswebview.h
index c30b328e82..3ca0a6274f 100644
--- a/kdewebkit/kgraphicswebview.h
+++ b/kdewebkit/kgraphicswebview.h
@@ -1,206 +1,206 @@
/*
* This file is part of the KDE project.
*
* Copyright (C) 2007 Trolltech ASA
* Copyright (C) 2008 Urs Wolfer <uwolfer @ kde.org>
* Copyright (C) 2008 Laurent Montel <montel@kde.org>
* Copyright (C) 2008 Michael Howell <mhowell123@gmail.com>
* Copyright (C) 2009 Dawit Alemayehu <adawit @ kde.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
*/
#ifndef KGRAPHICSWEBVIEW_H
#define KGRAPHICSWEBVIEW_H
#include <kdewebkit_export.h>
#include <QtWebKit/QGraphicsWebView>
class KUrl;
template<class T> class KWebViewPrivate;
/**
* @short A re-implementation of QGraphicsWebView that provides KDE integration.
*
* This is a drop-in replacement for QGraphicsWebView that provides full KDE
* integration through the use of @ref KWebPage. It also provides signals that
* capture middle, shift and ctrl mouse clicks on links and URL pasting from the
* selection clipboard.
*
* The specific functionality provided by this class (over and above what
* would be acheived by using KWebPage with a QGraphicsWebView) is that
* scrolling * with the mouse wheel while holding down CTRL zooms the page (see
* QGraphicsWebView::setZoomFactor) and several useful signals are emitted when
* the user performs certain actions.
*
* @author Urs Wolfer <uwolfer @ kde.org>
* @author Dawit Alemayehu <adawit @ kde.org>
*
* @since 4.4
*/
class KDEWEBKIT_EXPORT KGraphicsWebView : public QGraphicsWebView
{
Q_OBJECT
public:
/**
* Constructs a KGraphicsWebView object with parent @p parent.
*
* Set @p createCustomPage to false to prevent the creation of a
* @ref KWebPage object for KDE integration. Doing so allows you to
* avoid unnecessary object creation and deletion if you are going to
* use a subclass of KWebPage.
*
* @param parent the parent object
* @param createCustomPage if @c true, the view's page is set to an
* instance of KWebPage
*/
explicit KGraphicsWebView(QGraphicsItem *parent = 0, bool createCustomPage = true);
/**
* Destroys the KGraphicsWebView.
*/
~KGraphicsWebView();
/**
* Returns true if access to remote content is allowed.
*
* By default access to remote content is allowed.
*
* @see setAllowExternalContent()
* @see KWebPage::isExternalContentAllowed()
*/
bool isExternalContentAllowed() const;
/**
* Set @p allow to false if you want to prevent access to remote content.
*
* If this function is set to false only resources on the local system
* can be accessed through this class. By default fetching external content
* is allowed.
*
* @see isExternalContentAllowed()
* @see KWebPage::setAllowExternalContent(bool)
*/
void setAllowExternalContent(bool allow);
Q_SIGNALS:
/**
* Emitted when a URL from the selection clipboard is pasted on this view.
*
* This is triggered when the user clicks on the page with the middle
* mouse button when there is something in the global mouse selection
* clipboard. This is typically only possible on X11.
*
* Uri filters are applied to the selection clipboard to generate @p url.
*
* If the content in the selection clipboard is not a valid url and a
* default search engine is configured, @p url will be set to a query
* to the default search engine.
*
* @param url url generated from the selection clipboard content
*
* @deprecated use selectionClipboardUrlPasted(KUrl, bool) instead
* @see QClipboard
*/
#ifndef KDE_NO_DEPRECATED
- KDE_DEPRECATED void selectionClipboardUrlPasted(const KUrl &url);
+ KDEWEBKIT_DEPRECATED void selectionClipboardUrlPasted(const KUrl &url);
#endif
/**
* Emitted when a URL from the selection clipboard is pasted on this view.
*
* This is triggered when the user clicks on the page with the middle
* mouse button when there is something in the global mouse selection
* clipboard. This is typically only possible on X11.
*
* Uri filters are applied to the selection clipboard to generate @p url.
*
* If the content in the selection clipboard is not a valid URL and a
* default search engine is configured, @p searchText will be set to the
* content of the clipboard (250 characters maximum) and @p url will be
* set to a query to the default search engine.
*
* @param url the URL generated from the selection clipboard content
* @param searchText content of the selection clipboard if it is not a
* valid URL
*
* @see KUriFilter
* @see QClipboard
* @since 4.6
*/
void selectionClipboardUrlPasted(const KUrl &url, const QString& searchText);
/**
* Emitted when a link is clicked with the left mouse button while SHIFT is
* held down.
*
* A KDE user would typically expect this to result in the triggering of a
* "save link as" action.
*
* @param url the URL of the clicked link
*/
void linkShiftClicked(const KUrl &url);
/**
* Emitted when a link is clicked with the middle mouse button or clicked
* with the left mouse button while CTRL is held down.
*
* Typically, the user would expect this to result in the URL being opened
* in a new tab or window.
*
* @param url the URL of the clicked link
*/
void linkMiddleOrCtrlClicked(const KUrl &url);
protected:
/**
* @reimp
*
* Reimplemented for internal reasons, the API is not affected.
*
* @see QWidget::wheelEvent
* @internal
*/
void wheelEvent(QGraphicsSceneWheelEvent *event);
/**
* @reimp
*
* Reimplemented for internal reasons, the API is not affected.
*
* @see QWidget::mousePressEvent
* @internal
*/
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
/**
* @reimp
*
* Reimplemented for internal reasons, the API is not affected.
*
* @see QWidget::mouseReleaseEvent
* @internal
*/
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
private:
friend class KWebViewPrivate<KGraphicsWebView>;
KWebViewPrivate<KGraphicsWebView> * const d;
};
#endif // KWEBVIEW_H
diff --git a/kdewebkit/kwebview.h b/kdewebkit/kwebview.h
index f3149222f4..d4e229b69e 100644
--- a/kdewebkit/kwebview.h
+++ b/kdewebkit/kwebview.h
@@ -1,207 +1,207 @@
/*
* This file is part of the KDE project.
*
* Copyright (C) 2007 Trolltech ASA
* Copyright (C) 2008 Urs Wolfer <uwolfer @ kde.org>
* Copyright (C) 2008 Laurent Montel <montel@kde.org>
* Copyright (C) 2008 Michael Howell <mhowell123@gmail.com>
* Copyright (C) 2009 Dawit Alemayehu <adawit @ kde.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
*/
#ifndef KWEBVIEW_H
#define KWEBVIEW_H
#include <kdewebkit_export.h>
#include <QtWebKit/QWebView>
class KUrl;
template<class T> class KWebViewPrivate;
/**
* @short A re-implementation of QWebView that provides KDE integration.
*
* This is a drop-in replacement for QWebView that provides full KDE
* integration through @ref KWebPage as well as additional signals that
* capture middle, shift and ctrl mouse clicks on links and URL pasting
* from the selection clipboard.
*
* The specific functionality provided by this class (over and above what
* would be acheived by using KWebPage with a QWebView) is that scrolling
* with the mouse wheel while holding down CTRL zooms the page (see
* QWebView::setZoomFactor) and several useful signals are emitted when
* the user performs certain actions.
*
* See the signal documentation for more details.
*
* @author Urs Wolfer <uwolfer @ kde.org>
* @author Dawit Alemayehu <adawit @ kde.org>
* @since 4.4
*/
class KDEWEBKIT_EXPORT KWebView : public QWebView
{
Q_OBJECT
Q_PROPERTY(bool externalContentAllowed READ isExternalContentAllowed WRITE setAllowExternalContent)
public:
/**
* Constructs a KWebView object with parent @p parent.
*
* Set @p createCustomPage to false to prevent the creation of a
* @ref KWebPage object for KDE integration. Doing so allows you to
* avoid unnecessary object creation and deletion if you are going to
* use a subclass of KWebPage.
*
* @param parent the parent object
* @param createCustomPage if @c true, the view's page is set to an
* instance of KWebPage
*/
explicit KWebView(QWidget *parent = 0, bool createCustomPage = true);
/**
* Destroys the KWebView.
*/
~KWebView();
/**
* Returns true if access to remote content is allowed.
*
* By default access to remote content is allowed.
*
* @see setAllowExternalContent()
* @see KWebPage::isExternalContentAllowed()
*/
bool isExternalContentAllowed() const;
/**
* Set @p allow to false if you want to prevent access to remote content.
*
* If this function is set to false only resources on the local system
* can be accessed through this class. By default fetching external content
* is allowed.
*
* @see isExternalContentAllowed()
* @see KWebPage::setAllowExternalContent(bool)
*/
void setAllowExternalContent(bool allow);
Q_SIGNALS:
/**
* Emitted when a URL from the selection clipboard is pasted on this view.
*
* This is triggered when the user clicks on the page with the middle
* mouse button when there is something in the global mouse selection
* clipboard. This is typically only possible on X11.
*
* Uri filters are applied to the selection clipboard to generate @p url.
*
* If the content in the selection clipboard is not a valid url and a
* default search engine is configured, @p url will be set to a query
* to the default search engine.
*
* @param url url generated from the selection clipboard content
*
* @deprecated use selectionClipboardUrlPasted(KUrl, bool) instead
* @see QClipboard
*/
#ifndef KDE_NO_DEPRECATED
- KDE_DEPRECATED void selectionClipboardUrlPasted(const KUrl &url);
+ KDEWEBKIT_DEPRECATED void selectionClipboardUrlPasted(const KUrl &url);
#endif
/**
* Emitted when a URL from the selection clipboard is pasted on this view.
*
* This is triggered when the user clicks on the page with the middle
* mouse button when there is something in the global mouse selection
* clipboard. This is typically only possible on X11.
*
* Uri filters are applied to the selection clipboard to generate @p url.
*
* If the content in the selection clipboard is not a valid URL and a
* default search engine is configured, @p searchText will be set to the
* content of the clipboard (250 characters maximum) and @p url will be
* set to a query to the default search engine.
*
* @param url the URL generated from the selection clipboard content
* @param searchText content of the selection clipboard if it is not a
* valid URL
*
* @see KUriFilter
* @see QClipboard
* @since 4.6
*/
void selectionClipboardUrlPasted(const KUrl &url, const QString& searchText);
/**
* Emitted when a link is clicked with the left mouse button while SHIFT is
* held down.
*
* A KDE user would typically expect this to result in the triggering of a
* "save link as" action.
*
* @param url the URL of the clicked link
*/
void linkShiftClicked(const KUrl &url);
/**
* Emitted when a link is clicked with the middle mouse button or clicked
* with the left mouse button while CTRL is held down.
*
* Typically, the user would expect this to result in the URL being opened
* in a new tab or window.
*
* @param url the URL of the clicked link
*/
void linkMiddleOrCtrlClicked(const KUrl &url);
protected:
/**
* @reimp
*
* Reimplemented for internal reasons, the API is not affected.
*
* @see QWidget::wheelEvent
* @internal
*/
void wheelEvent(QWheelEvent *event);
/**
* @reimp
*
* Reimplemented for internal reasons, the API is not affected.
*
* @see QWidget::mousePressEvent
* @internal
*/
virtual void mousePressEvent(QMouseEvent *event);
/**
* @reimp
*
* Reimplemented for internal reasons, the API is not affected.
*
* @see QWidget::mouseReleaseEvent
* @internal
*/
virtual void mouseReleaseEvent(QMouseEvent *event);
private:
friend class KWebViewPrivate<KWebView>;
KWebViewPrivate<KWebView> * const d;
};
#endif // KWEBVIEW_H
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Fri, Nov 1, 9:16 AM (1 d, 12 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
10075710
Default Alt Text
(17 KB)
Attached To
Mode
rKL kdelibs
Attached
Detach File
Event Timeline
Log In to Comment