• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdehtml
 

tdehtml

  • tdehtml
tdehtml_ext.h
1 /* This file is part of the KDE project
2  *
3  * Copyright (C) 2000-2003 Simon Hausmann <hausmann@kde.org>
4  * 2001-2003 George Staikos <staikos@kde.org>
5  * 2001-2003 Laurent Montel <montel@kde.org>
6  * 2001-2003 Dirk Mueller <mueller@kde.org>
7  * 2001-2003 Waldo Bastian <bastian@kde.org>
8  * 2001-2003 David Faure <faure@kde.org>
9  * 2001-2003 Daniel Naber <dnaber@kde.org>
10  *
11  * This library is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Library General Public
13  * License as published by the Free Software Foundation; either
14  * version 2 of the License, or (at your option) any later version.
15  *
16  * This library is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  * Library General Public License for more details.
20  *
21  * You should have received a copy of the GNU Library General Public License
22  * along with this library; see the file COPYING.LIB. If not, write to
23  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24  * Boston, MA 02110-1301, USA.
25  */
26 
27 #ifndef __tdehtml_ext_h__
28 #define __tdehtml_ext_h__
29 
30 #include "tdehtml_part.h"
31 
32 #include <tqguardedptr.h>
33 
34 #include <tdeaction.h>
35 #include <tdeio/global.h>
36 
41 class TDEHTMLPartBrowserExtension : public KParts::BrowserExtension
42 {
43  TQ_OBJECT
44  friend class TDEHTMLPart;
45  friend class TDEHTMLView;
46 public:
47  TDEHTMLPartBrowserExtension( TDEHTMLPart *parent, const char *name = 0L );
48 
49  virtual int xOffset();
50  virtual int yOffset();
51 
52  virtual void saveState( TQDataStream &stream );
53  virtual void restoreState( TQDataStream &stream );
54 
55  // internal
56  void editableWidgetFocused( TQWidget *widget );
57  void editableWidgetBlurred( TQWidget *widget );
58 
59  void setExtensionProxy( KParts::BrowserExtension *proxyExtension );
60 
61 public slots:
62  void cut();
63  void copy();
64  void paste();
65  void searchProvider();
66  void openSelection();
67  void reparseConfiguration();
68  void print();
69  void disableScrolling();
70 
71  // internal . updates the state of the cut/copt/paste action based
72  // on whether data is available in the clipboard
73  void updateEditActions();
74 
75 private slots:
76  // connected to a frame's browserextensions enableAction signal
77  void extensionProxyActionEnabled( const char *action, bool enable );
78  void extensionProxyEditableWidgetFocused();
79  void extensionProxyEditableWidgetBlurred();
80 
81 signals:
82  void editableWidgetFocused();
83  void editableWidgetBlurred();
84 private:
85  void callExtensionProxyMethod( const char *method );
86 
87  TDEHTMLPart *m_part;
88  TQGuardedPtr<TQWidget> m_editableFormWidget;
89  TQGuardedPtr<KParts::BrowserExtension> m_extensionProxy;
90  bool m_connectedToClipboard;
91 };
92 
93 class TDEHTMLPartBrowserHostExtension : public KParts::BrowserHostExtension
94 {
95 public:
96  TDEHTMLPartBrowserHostExtension( TDEHTMLPart *part );
97  virtual ~TDEHTMLPartBrowserHostExtension();
98 
99  virtual TQStringList frameNames() const;
100 
101  virtual const TQPtrList<KParts::ReadOnlyPart> frames() const;
102 
103  virtual bool openURLInFrame( const KURL &url, const KParts::URLArgs &urlArgs );
104 
105 protected:
106  virtual void virtual_hook( int id, void* data );
107 private:
108  TDEHTMLPart *m_part;
109 };
110 
115 class TDEHTMLPopupGUIClient : public TQObject, public KXMLGUIClient
116 {
117  TQ_OBJECT
118 public:
119  TDEHTMLPopupGUIClient( TDEHTMLPart *tdehtml, const TQString &doc, const KURL &url );
120  virtual ~TDEHTMLPopupGUIClient();
121 
122  static void saveURL( TQWidget *parent, const TQString &caption, const KURL &url,
123  const TQMap<TQString, TQString> &metaData = TDEIO::MetaData(),
124  const TQString &filter = TQString::null, long cacheId = 0,
125  const TQString &suggestedFilename = TQString::null );
126 
127  static void saveURL( const KURL &url, const KURL &destination,
128  const TQMap<TQString, TQString> &metaData = TDEIO::MetaData(),
129  long cacheId = 0 );
130 private slots:
131  void slotSaveLinkAs();
132  void slotSaveImageAs();
133  void slotCopyLinkLocation();
134  void slotSendImage();
135  void slotStopAnimations();
136  void slotCopyImageLocation();
137  void slotCopyImage();
138  void slotViewImage();
139  void slotReloadFrame();
140  void slotFrameInWindow();
141  void slotFrameInTop();
142  void slotFrameInTab();
143  void slotBlockImage();
144  void slotBlockHost();
145  void slotBlockIFrame();
146 
147 private:
148  class TDEHTMLPopupGUIClientPrivate;
149  TDEHTMLPopupGUIClientPrivate *d;
150 };
151 
152 class TDEHTMLZoomFactorAction : public TDEAction
153 {
154  TQ_OBJECT
155 public:
156  //BCI: remove in KDE 4
157  TDEHTMLZoomFactorAction( TDEHTMLPart *part, bool direction, const TQString &text, const TQString &icon, const TQObject *receiver, const char *slot, TQObject *parent, const char *name );
158  TDEHTMLZoomFactorAction( TDEHTMLPart *part, bool direction, const TQString &text,
159  const TQString &icon, const TDEShortcut& cut, const TQObject *receiver,
160  const char *slot, TQObject *parent, const char *name );
161  virtual ~TDEHTMLZoomFactorAction();
162 
163  virtual int plug( TQWidget *widget, int index );
164 
165 private slots:
166  void slotActivated( int );
167 protected slots:
168  void slotActivated() { TDEAction::slotActivated(); }
169 private:
170  void init(TDEHTMLPart *part, bool direction);
171 private:
172  TQPopupMenu *m_popup;
173  bool m_direction;
174  TDEHTMLPart *m_part;
175 };
176 
177 #endif
KParts::BrowserExtension
KParts::BrowserHostExtension
KParts::BrowserHostExtension::openURLInFrame
virtual bool openURLInFrame(const KURL &url, const KParts::URLArgs &urlArgs)
KParts::BrowserHostExtension::frames
virtual const TQPtrList< KParts::ReadOnlyPart > frames() const
KParts::BrowserHostExtension::frameNames
virtual TQStringList frameNames() const
KURL
KXMLGUIClient
TDEAction
TDEAction::plug
virtual int plug(TQWidget *widget, int index=-1)
TDEHTMLPartBrowserExtension
This is the BrowserExtension for a TDEHTMLPart document.
Definition: tdehtml_ext.h:42
TDEHTMLPart
This class is tdehtml's main class.
Definition: tdehtml_part.h:184
TDEHTMLView
Renders and displays HTML in a TQScrollView.
Definition: tdehtmlview.h:79
TDEHTMLView::print
void print()
Prints the HTML document.
Definition: tdehtmlview.cpp:2767
TDEShortcut
KParts::URLArgs

tdehtml

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

tdehtml

Skip menu "tdehtml"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdehtml by doxygen 1.9.1
This website is maintained by Timothy Pearson.