kmultipart.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __kmultipart_h__
00021 #define __kmultipart_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 class KTempFile;
00030 class KLineParser;
00031
00035 class KMultiPart : public KParts::ReadOnlyPart
00036 {
00037 Q_OBJECT
00038 public:
00039 KMultiPart( QWidget *parentWidget, const char *widgetName,
00040 QObject *parent, const char *name, const QStringList& );
00041 virtual ~KMultiPart();
00042
00043 virtual bool openFile() { return false; }
00044 virtual bool openURL( const KURL &url );
00045
00046 virtual bool closeURL();
00047
00048 static KAboutData* createAboutData();
00049
00050 protected:
00051 virtual void guiActivateEvent( KParts::GUIActivateEvent *e );
00052 void setPart( const QString& mimeType );
00053
00054 void startOfData();
00055 void sendData( const QByteArray& line );
00056 void endOfData();
00057
00058 private slots:
00059
00060 void slotJobFinished( KIO::Job *job );
00061 void slotData( KIO::Job *, const QByteArray & );
00062
00063
00064 void slotPartCompleted();
00065
00066 private:
00067 KParts::BrowserExtension* m_extension;
00068 QGuardedPtr<KParts::ReadOnlyPart> m_part;
00069 bool m_isHTMLPart;
00070 KIO::Job* m_job;
00071 QCString m_boundary;
00072 int m_boundaryLength;
00073 QString m_mimeType;
00074 QString m_nextMimeType;
00075 KTempFile* m_tempFile;
00076 KLineParser* m_lineParser;
00077 bool m_bParsingHeader;
00078 bool m_bGotAnyHeader;
00079 };
00080
00081 #if 0
00082 class KMultiPartBrowserExtension : public KParts::BrowserExtension
00083 {
00084
00085 public:
00086 KMultiPartBrowserExtension( KMultiPart *parent, const char *name = 0 );
00087
00088 virtual int xOffset();
00089 virtual int yOffset();
00090
00091
00092 void print();
00093 void reparseConfiguration();
00094
00095 private:
00096 KMultiPart *m_imgPart;
00097 };
00098 #endif
00099
00100 #endif
This file is part of the documentation for kdelibs Version 3.1.0.