KDEWebKit
kgraphicswebview.h
Go to the documentation of this file.
00001 /* 00002 * This file is part of the KDE project. 00003 * 00004 * Copyright (C) 2007 Trolltech ASA 00005 * Copyright (C) 2008 Urs Wolfer <uwolfer @ kde.org> 00006 * Copyright (C) 2008 Laurent Montel <montel@kde.org> 00007 * Copyright (C) 2008 Michael Howell <mhowell123@gmail.com> 00008 * Copyright (C) 2009 Dawit Alemayehu <adawit @ kde.org> 00009 * 00010 * This library is free software; you can redistribute it and/or 00011 * modify it under the terms of the GNU Library General Public 00012 * License as published by the Free Software Foundation; either 00013 * version 2 of the License, or (at your option) any later version. 00014 * 00015 * This library is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 * Library General Public License for more details. 00019 * 00020 * You should have received a copy of the GNU Library General Public License 00021 * along with this library; see the file COPYING.LIB. If not, write to 00022 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00023 * Boston, MA 02110-1301, USA. 00024 * 00025 */ 00026 #ifndef KGRAPHICSWEBVIEW_H 00027 #define KGRAPHICSWEBVIEW_H 00028 00029 #include <kdewebkit_export.h> 00030 00031 #include <QtWebKit/QGraphicsWebView> 00032 00033 class KUrl; 00034 template<class T> class KWebViewPrivate; 00035 00055 class KDEWEBKIT_EXPORT KGraphicsWebView : public QGraphicsWebView 00056 { 00057 Q_OBJECT 00058 00059 public: 00072 explicit KGraphicsWebView(QGraphicsItem *parent = 0, bool createCustomPage = true); 00073 00077 ~KGraphicsWebView(); 00078 00087 bool isExternalContentAllowed() const; 00088 00099 void setAllowExternalContent(bool allow); 00100 00101 Q_SIGNALS: 00120 #ifndef KDE_NO_DEPRECATED 00121 KDE_DEPRECATED void selectionClipboardUrlPasted(const KUrl &url); 00122 #endif 00123 00146 void selectionClipboardUrlPasted(const KUrl &url, const QString& searchText); 00147 00157 void linkShiftClicked(const KUrl &url); 00158 00168 void linkMiddleOrCtrlClicked(const KUrl &url); 00169 00170 protected: 00179 void wheelEvent(QGraphicsSceneWheelEvent *event); 00180 00189 virtual void mousePressEvent(QGraphicsSceneMouseEvent *event); 00190 00199 virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); 00200 00201 private: 00202 friend class KWebViewPrivate<KGraphicsWebView>; 00203 KWebViewPrivate<KGraphicsWebView> * const d; 00204 }; 00205 00206 #endif // KWEBVIEW_H
KDE 4.6 API Reference