khtmlimage.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __khtmlimage_h__
00021 #define __khtmlimage_h__
00022
00023 #include <kparts/factory.h>
00024 #include <kparts/browserextension.h>
00025
00026 class KHTMLPart;
00027 class KInstance;
00028
00029 class KHTMLImageFactory : public KParts::Factory
00030 {
00031 Q_OBJECT
00032 public:
00033 KHTMLImageFactory();
00034 virtual ~KHTMLImageFactory();
00035
00036 virtual KParts::Part *createPartObject( QWidget *parentWidget, const char *widgetName,
00037 QObject *parent, const char *name,
00038 const char *className, const QStringList &args );
00039
00040 static KInstance *instance() { return s_instance; }
00041
00042 private:
00043 static KInstance *s_instance;
00044 };
00045
00046 class KHTMLImage : public KParts::ReadOnlyPart
00047 {
00048 Q_OBJECT
00049 public:
00050 KHTMLImage( QWidget *parentWidget, const char *widgetName,
00051 QObject *parent, const char *name );
00052 virtual ~KHTMLImage();
00053
00054 virtual bool openFile() { return true; }
00055
00056 virtual bool openURL( const KURL &url );
00057
00058 virtual bool closeURL();
00059
00060 KHTMLPart *doc() const { return m_khtml; }
00061
00062 protected:
00063 virtual void guiActivateEvent( KParts::GUIActivateEvent *e );
00064
00065 private slots:
00066 void slotPopupMenu( KXMLGUIClient *cl, const QPoint &pos, const KURL &u, const QString &mime, mode_t mode );
00067 void slotImageJobFinished( KIO::Job *job );
00068
00069 void updateWindowCaption();
00070
00071 private:
00072 QGuardedPtr<KHTMLPart> m_khtml;
00073 KParts::BrowserExtension *m_ext;
00074 QString m_mimeType;
00075 };
00076
00077 class KHTMLImageBrowserExtension : public KParts::BrowserExtension
00078 {
00079 Q_OBJECT
00080 public:
00081 KHTMLImageBrowserExtension( KHTMLImage *parent, const char *name = 0 );
00082
00083 virtual int xOffset();
00084 virtual int yOffset();
00085
00086 protected slots:
00087 void print();
00088 void reparseConfiguration();
00089
00090 private:
00091 KHTMLImage *m_imgPart;
00092 };
00093
00094 #endif
This file is part of the documentation for kdelibs Version 3.1.4.