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