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

khtml

  • khtml
khtmlimage.h
1 /* This file is part of the KDE project
2  Copyright (C) 2000 Simon Hausmann <hausmann@kde.org>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License as published by the Free Software Foundation; either
7  version 2 of the License, or (at your option) any later version.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
19 
20 #ifndef __khtmlimage_h__
21 #define __khtmlimage_h__
22 
23 #include "khtml_part.h"
24 #include <kparts/factory.h>
25 #include <kparts/browserextension.h>
26 
27 #include "misc/loader_client.h"
28 
29 class KHTMLPart;
30 class KInstance;
31 
32 namespace khtml
33 {
34  class CachedImage;
35 }
36 
40 class KHTMLImageFactory : public KParts::Factory
41 {
42  Q_OBJECT
43 public:
44  KHTMLImageFactory();
45  virtual ~KHTMLImageFactory();
46 
47  virtual KParts::Part *createPartObject( TQWidget *parentWidget, const char *widgetName,
48  TQObject *parent, const char *name,
49  const char *className, const TQStringList &args );
50 
51  static KInstance *instance() { return s_instance; }
52 
53 private:
54  static KInstance *s_instance;
55 };
56 
60 class KHTMLImage : public KParts::ReadOnlyPart, public khtml::CachedObjectClient
61 {
62  Q_OBJECT
63 public:
64  KHTMLImage( TQWidget *parentWidget, const char *widgetName,
65  TQObject *parent, const char *name, KHTMLPart::GUIProfile prof );
66  virtual ~KHTMLImage();
67 
68  virtual bool openFile() { return true; } // grmbl, should be non-pure in part.h, IMHO
69 
70  virtual bool openURL( const KURL &url );
71 
72  virtual bool closeURL();
73 
74  KHTMLPart *doc() const { return m_khtml; }
75 
76  virtual void notifyFinished( khtml::CachedObject *o );
77 
78 protected:
79  virtual void guiActivateEvent( KParts::GUIActivateEvent *e );
80  virtual bool eventFilter( TQObject *filterTarget, TQEvent *e );
81 
82 private slots:
83  void restoreScrollPosition();
84 // void slotImageJobFinished( KIO::Job *job );
85 
86 // void updateWindowCaption();
87 
88 private:
89  void disposeImage();
90 
91  TQGuardedPtr<KHTMLPart> m_khtml;
92  KParts::BrowserExtension *m_ext;
93  TQString m_mimeType;
94  khtml::CachedImage *m_image;
95  int m_xOffset, m_yOffset;
96 };
97 
101 class KHTMLImageBrowserExtension : public KParts::BrowserExtension
102 {
103  Q_OBJECT
104 public:
105  KHTMLImageBrowserExtension( KHTMLImage *parent, const char *name = 0 );
106 
107  virtual int xOffset();
108  virtual int yOffset();
109 
110 protected slots:
111  void print();
112  void reparseConfiguration();
113  void disableScrolling();
114 
115 private:
116  KHTMLImage *m_imgPart;
117 };
118 
119 #endif
KParts::BrowserExtension
KURL
KParts::ReadOnlyPart::openFile
virtual bool openFile()=0
khtml
Definition: khtml_caret.cpp:26
KHTMLPart
This class is khtml's main class.
Definition: khtml_part.h:184
KParts::Part
KParts::Factory::createPartObject
virtual Part * createPartObject(TQWidget *parentWidget=0, const char *widgetName=0, TQObject *parent=0, const char *name=0, const char *classname="KParts::Part", const TQStringList &args=TQStringList())=0
KInstance
KParts::Factory
KParts::GUIActivateEvent
KParts::BrowserExtension::yOffset
virtual int yOffset()
KNotifyClient::instance
KInstance * instance()
KParts::ReadOnlyPart::closeURL
virtual bool closeURL()
KStdAccel::print
const KShortcut & print()
KParts::ReadOnlyPart::guiActivateEvent
virtual void guiActivateEvent(GUIActivateEvent *event)
KParts::BrowserExtension::xOffset
virtual int xOffset()
KParts::ReadOnlyPart::openURL
virtual bool openURL(const KURL &url)
KParts::ReadOnlyPart

khtml

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

khtml

Skip menu "khtml"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for khtml by doxygen 1.8.8
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |