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

KHTML

  • sources
  • kde-4.12
  • kdelibs
  • khtml
khtmlimage.h
Go to the documentation of this file.
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 <kpluginfactory.h>
25 #include <kparts/browserextension.h>
26 #include <kparts/statusbarextension.h>
27 
28 #include "misc/loader_client.h"
29 
30 class KHTMLPart;
31 class KComponentData;
32 
33 namespace khtml
34 {
35  class CachedImage;
36 }
37 
42 class KHTML_EXPORT KHTMLImageFactory : public KPluginFactory
43 {
44  Q_OBJECT
45 public:
46  KHTMLImageFactory();
47  virtual ~KHTMLImageFactory();
48 
49  virtual QObject *create(const char* iface,
50  QWidget *parentWidget,
51  QObject *parent,
52  const QVariantList& args,
53  const QString &keyword);
54 
55  static const KComponentData &componentData() { return *s_componentData; }
56 
57 private:
58  static KComponentData *s_componentData;
59 };
60 
64 class KHTMLImage : public KParts::ReadOnlyPart, public khtml::CachedObjectClient
65 {
66  Q_OBJECT
67 public:
68  KHTMLImage( QWidget *parentWidget,
69  QObject *parent, KHTMLPart::GUIProfile prof );
70  virtual ~KHTMLImage();
71 
72  virtual bool openFile() { return true; } // grmbl, should be non-pure in part.h, IMHO
73 
74  virtual bool openUrl( const KUrl &url );
75 
76  virtual bool closeUrl();
77 
78  KHTMLPart *doc() const { return m_khtml; }
79 
80  virtual void notifyFinished( khtml::CachedObject *o );
81 
82 protected:
83  virtual void guiActivateEvent( KParts::GUIActivateEvent *e );
84 
85 private Q_SLOTS:
86  void restoreScrollPosition();
87 
88  void slotPopupMenu( const QPoint &global, const KUrl &url, mode_t mode,
89  const KParts::OpenUrlArguments &args,
90  const KParts::BrowserArguments &browserArgs,
91  KParts::BrowserExtension::PopupFlags flags,
92  const KParts::BrowserExtension::ActionGroupMap& actionGroups );
93 
94 // void slotImageJobFinished( KIO::Job *job );
95 
96 // void updateWindowCaption();
97 
98 private:
99  void disposeImage();
100 
101  QPointer<KHTMLPart> m_khtml;
102  KParts::BrowserExtension *m_ext;
103  KParts::StatusBarExtension *m_sbExt;
104  QString m_mimeType;
105  khtml::CachedImage *m_image;
106  int m_xOffset, m_yOffset;
107 };
108 
112 class KHTMLImageBrowserExtension : public KParts::BrowserExtension
113 {
114  Q_OBJECT
115 public:
116  KHTMLImageBrowserExtension( KHTMLImage *parent );
117 
118  virtual int xOffset();
119  virtual int yOffset();
120 
121 protected Q_SLOTS:
122  void print();
123  void reparseConfiguration();
124  void disableScrolling();
125 
126 private:
127  KHTMLImage *m_imgPart;
128 };
129 
130 #endif
KParts::BrowserExtension
KHTMLImage::openUrl
virtual bool openUrl(const KUrl &url)
Definition: khtmlimage.cpp:135
KHTMLImageFactory::componentData
static const KComponentData & componentData()
Definition: khtmlimage.h:55
KHTMLPart::GUIProfile
GUIProfile
Definition: khtml_part.h:272
KHTMLImageBrowserExtension::KHTMLImageBrowserExtension
KHTMLImageBrowserExtension(KHTMLImage *parent)
Definition: khtmlimage.cpp:302
KHTMLImage::doc
KHTMLPart * doc() const
Definition: khtmlimage.h:78
KHTMLImage::KHTMLImage
KHTMLImage(QWidget *parentWidget, QObject *parent, KHTMLPart::GUIProfile prof)
Definition: khtmlimage.cpp:67
khtml_part.h
KHTMLImageBrowserExtension::disableScrolling
void disableScrolling()
Definition: khtmlimage.cpp:330
KParts::BrowserArguments
QWidget
KHTMLImageBrowserExtension::reparseConfiguration
void reparseConfiguration()
Definition: khtmlimage.cpp:323
KHTMLPart
This class is khtml's main class.
Definition: khtml_part.h:206
QString
QObject
KUrl
KHTMLImageBrowserExtension
Definition: khtmlimage.h:112
KHTMLImageBrowserExtension::print
void print()
Definition: khtmlimage.cpp:318
KHTMLImageBrowserExtension::xOffset
virtual int xOffset()
Definition: khtmlimage.cpp:308
KParts::ReadOnlyPart::url
KUrl url() const
KParts::GUIActivateEvent
KHTMLImage::guiActivateEvent
virtual void guiActivateEvent(KParts::GUIActivateEvent *e)
Definition: khtmlimage.cpp:227
KParts::StatusBarExtension
KHTMLImage::openFile
virtual bool openFile()
Definition: khtmlimage.h:72
KHTMLImage::closeUrl
virtual bool closeUrl()
Definition: khtmlimage.cpp:181
QPoint
kpluginfactory.h
KHTMLImageFactory
Definition: khtmlimage.h:42
KHTMLImageBrowserExtension::yOffset
virtual int yOffset()
Definition: khtmlimage.cpp:313
create
KAction * create(StandardAction id, const QObject *recvr, const char *slot, QObject *parent)
KHTMLImage
Definition: khtmlimage.h:64
KHTMLImage::~KHTMLImage
virtual ~KHTMLImage()
Definition: khtmlimage.cpp:120
statusbarextension.h
browserextension.h
KPluginFactory
KComponentData
QMap
KParts::OpenUrlArguments
KParts::ReadOnlyPart
KHTMLImage::notifyFinished
virtual void notifyFinished(khtml::CachedObject *o)
Definition: khtmlimage.cpp:188
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:51:21 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KHTML

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal