• Skip to content
  • Skip to link menu
KDE 4.3 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KHTML

khtml_ext.h

Go to the documentation of this file.
00001 /* This file is part of the KDE project
00002  *
00003  * Copyright (C) 2000-2003 Simon Hausmann <hausmann@kde.org>
00004  *               2001-2003 George Staikos <staikos@kde.org>
00005  *               2001-2003 Laurent Montel <montel@kde.org>
00006  *               2001-2003 Dirk Mueller <mueller@kde.org>
00007  *               2001-2003 Waldo Bastian <bastian@kde.org>
00008  *               2001-2003 David Faure <faure@kde.org>
00009  *               2001-2003 Daniel Naber <dnaber@kde.org>
00010  *
00011  * This library is free software; you can redistribute it and/or
00012  * modify it under the terms of the GNU Library General Public
00013  * License as published by the Free Software Foundation; either
00014  * version 2 of the License, or (at your option) any later version.
00015  *
00016  * This library is distributed in the hope that it will be useful,
00017  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00019  * Library General Public License for more details.
00020  *
00021  * You should have received a copy of the GNU Library General Public License
00022  * along with this library; see the file COPYING.LIB.  If not, write to
00023  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00024  * Boston, MA 02110-1301, USA.
00025  */
00026 
00027 #ifndef __khtml_ext_h__
00028 #define __khtml_ext_h__
00029 
00030 #include "khtml_part.h"
00031 
00032 #include <QtCore/QPointer>
00033 
00034 #include <kselectaction.h>
00035 #include <kio/global.h>
00036 
00041 class KHTMLPartBrowserExtension : public KParts::BrowserExtension
00042 {
00043   Q_OBJECT
00044   friend class KHTMLPart;
00045   friend class KHTMLView;
00046 public:
00047   KHTMLPartBrowserExtension( KHTMLPart *parent );
00048 
00049   virtual int xOffset();
00050   virtual int yOffset();
00051 
00052   virtual void saveState( QDataStream &stream );
00053   virtual void restoreState( QDataStream &stream );
00054 
00055     // internal
00056     void editableWidgetFocused( QWidget *widget );
00057     void editableWidgetBlurred( QWidget *widget );
00058 
00059     void setExtensionProxy( KParts::BrowserExtension *proxyExtension );
00060 
00061 public Q_SLOTS:
00062     void cut();
00063     void copy();
00064     void paste();
00065     void searchProvider();
00066     void reparseConfiguration();
00067     void print();
00068     void disableScrolling();
00069 
00070     // internal . updates the state of the cut/copt/paste action based
00071     // on whether data is available in the clipboard
00072     void updateEditActions();
00073 
00074 private Q_SLOTS:
00075     // connected to a frame's browserextensions enableAction signal
00076     void extensionProxyActionEnabled( const char *action, bool enable );
00077     void extensionProxyEditableWidgetFocused();
00078     void extensionProxyEditableWidgetBlurred();
00079 
00080 Q_SIGNALS:
00081     void editableWidgetFocused();
00082     void editableWidgetBlurred();
00083 private:
00084     void callExtensionProxyMethod( const char *method );
00085 
00086     KHTMLPart *m_part;
00087     QPointer<QWidget> m_editableFormWidget;
00088     QPointer<KParts::BrowserExtension> m_extensionProxy;
00089     bool m_connectedToClipboard;
00090 };
00091 
00092 class KHTMLPartBrowserHostExtension : public KParts::BrowserHostExtension
00093 {
00094 public:
00095   KHTMLPartBrowserHostExtension( KHTMLPart *part );
00096   virtual ~KHTMLPartBrowserHostExtension();
00097 
00098   virtual QStringList frameNames() const;
00099 
00100   virtual const QList<KParts::ReadOnlyPart*> frames() const;
00101 
00102   virtual BrowserHostExtension* findFrameParent( KParts::ReadOnlyPart *callingPart, const QString &frame );
00103 
00104     virtual bool openUrlInFrame(const KUrl &url, const KParts::OpenUrlArguments& arguments, const KParts::BrowserArguments &browserArguments);
00105 
00106 private:
00107   KHTMLPart *m_part;
00108 };
00109 
00114 class KHTMLPopupGUIClient : public QObject
00115 {
00116   Q_OBJECT
00117 public:
00118   KHTMLPopupGUIClient( KHTMLPart *khtml, const KUrl &url );
00119   virtual ~KHTMLPopupGUIClient();
00120 
00121     KParts::BrowserExtension::ActionGroupMap actionGroups() const;
00122 
00123   static void saveURL( QWidget *parent, const QString &caption, const KUrl &url,
00124                        const QMap<QString, QString> &metaData = KIO::MetaData(),
00125                        const QString &filter = QString(), long cacheId = 0,
00126                        const QString &suggestedFilename = QString() );
00127 
00128   static void saveURL( QWidget* parent, const KUrl &url, const KUrl &destination,
00129                        const QMap<QString, QString> &metaData = KIO::MetaData(),
00130                        long cacheId = 0 );
00131 private Q_SLOTS:
00132   void slotSaveLinkAs();
00133   void slotSaveImageAs();
00134   void slotCopyLinkLocation();
00135   void slotSendImage();
00136   void slotStopAnimations();
00137   void slotCopyImageLocation();
00138   void slotCopyImage();
00139   void slotViewImage();
00140   void slotReloadFrame();
00141   void slotFrameInWindow();
00142   void slotFrameInTop();
00143   void slotFrameInTab();
00144   void slotBlockImage();
00145   void slotBlockHost();
00146   void slotBlockIFrame();
00147     void openSelection();
00148 
00149 private:
00150     QString selectedTextAsOneLine() const;
00151     void addSearchActions(QList<QAction *>& editActions);
00152 
00153   class KHTMLPopupGUIClientPrivate;
00154   KHTMLPopupGUIClientPrivate* const d;
00155 };
00156 
00157 class KHTMLZoomFactorAction : public KSelectAction
00158 {
00159     Q_OBJECT
00160 public:
00161     KHTMLZoomFactorAction(KHTMLPart *part, bool direction, const QString& iconName, const QString& text, QObject *parent);
00162     virtual ~KHTMLZoomFactorAction();
00163 
00164 protected Q_SLOTS:
00165     void slotTriggered(QAction* action);
00166 private:
00167     void init(KHTMLPart *part, bool direction);
00168 private:
00169     bool m_direction;
00170     KHTMLPart *m_part;
00171 };
00172 
00173 #endif

KHTML

Skip menu "KHTML"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal