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

KHTML

  • 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
30class KHTMLPart;
31class KComponentData;
32
33namespace khtml
34{
35 class CachedImage;
36}
37
42class KHTML_EXPORT KHTMLImageFactory : public KPluginFactory
43{
44 Q_OBJECT
45public:
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
57private:
58 static KComponentData *s_componentData;
59};
60
64class KHTMLImage : public KParts::ReadOnlyPart, public khtml::CachedObjectClient
65{
66 Q_OBJECT
67public:
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
82protected:
83 virtual void guiActivateEvent( KParts::GUIActivateEvent *e );
84
85private 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
98private:
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
112class KHTMLImageBrowserExtension : public KParts::BrowserExtension
113{
114 Q_OBJECT
115public:
116 KHTMLImageBrowserExtension( KHTMLImage *parent );
117
118 virtual int xOffset();
119 virtual int yOffset();
120
121protected Q_SLOTS:
122 void print();
123 void reparseConfiguration();
124 void disableScrolling();
125
126private:
127 KHTMLImage *m_imgPart;
128};
129
130#endif
browserextension.h
KComponentData
KHTMLImageBrowserExtension
Definition: khtmlimage.h:113
KHTMLImageBrowserExtension::xOffset
virtual int xOffset()
Definition: khtmlimage.cpp:308
KHTMLImageBrowserExtension::yOffset
virtual int yOffset()
Definition: khtmlimage.cpp:313
KHTMLImageBrowserExtension::print
void print()
Definition: khtmlimage.cpp:318
KHTMLImageBrowserExtension::disableScrolling
void disableScrolling()
Definition: khtmlimage.cpp:330
KHTMLImageBrowserExtension::reparseConfiguration
void reparseConfiguration()
Definition: khtmlimage.cpp:323
KHTMLImageFactory
Definition: khtmlimage.h:43
KHTMLImageFactory::componentData
static const KComponentData & componentData()
Definition: khtmlimage.h:55
KHTMLImage
Definition: khtmlimage.h:65
KHTMLImage::~KHTMLImage
virtual ~KHTMLImage()
Definition: khtmlimage.cpp:120
KHTMLImage::closeUrl
virtual bool closeUrl()
Definition: khtmlimage.cpp:181
KHTMLImage::guiActivateEvent
virtual void guiActivateEvent(KParts::GUIActivateEvent *e)
Definition: khtmlimage.cpp:227
KHTMLImage::notifyFinished
virtual void notifyFinished(khtml::CachedObject *o)
Definition: khtmlimage.cpp:188
KHTMLImage::doc
KHTMLPart * doc() const
Definition: khtmlimage.h:78
KHTMLImage::openFile
virtual bool openFile()
Definition: khtmlimage.h:72
KHTMLPart
This class is khtml's main class.
Definition: khtml_part.h:207
KHTMLPart::GUIProfile
GUIProfile
Definition: khtml_part.h:272
KParts::BrowserExtension
KParts::GUIActivateEvent
KParts::OpenUrlArguments
KParts::ReadOnlyPart
KParts::ReadOnlyPart::url
KUrl url
KParts::ReadOnlyPart::openUrl
virtual bool openUrl(const KUrl &url)
KParts::StatusBarExtension
KUrl
QMap
QObject
QWidget
khtml_part.h
kpluginfactory.h
create
KAction * create(StandardAction id, const QObject *recvr, const char *slot, QObject *parent)
khtml
statusbarextension.h
KParts::BrowserArguments
KPluginFactory
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 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-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 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
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
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