kmultipart.h Source File (khtml Library)

| # khtml Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# kmultipart.h

    00001 /* This file is part of the KDE project
    00002    Copyright (C) 2002 David Faure <david@mandrakesoft.com>
    00003
    00004    This library is free software; you can redistribute it and/or
    00005    modify it under the terms of the GNU Library General Public
    00006    License as published by the Free Software Foundation; either
    00007    version 2 of the License, or (at your option) any later version.
    00008
    00009    This library is distributed in the hope that it will be useful,
    00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
    00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00012    Library General Public License for more details.
    00013
    00014    You should have received a copy of the GNU Library General Public License
    00015    along with this library; see the file COPYING.LIB.  If not, write to
    00016    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00017    Boston, MA 02111-1307, USA.
    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     //void slotPopupMenu( KXMLGUIClient *cl, const QPoint &pos, const KURL &u, const QString &mime, mode_t mode );
    00060     void slotJobFinished( KIO::Job *job );
    00061     void slotData( KIO::Job *, const QByteArray & );
    00062     //void updateWindowCaption();
    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; // the one handled by m_part - store the kservice instead?
    00074     QString m_nextMimeType; // while parsing headers
    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     //Q_OBJECT
    00085 public:
    00086     KMultiPartBrowserExtension( KMultiPart *parent, const char *name = 0 );
    00087
    00088     virtual int xOffset();
    00089     virtual int yOffset();
    00090
    00091 //protected slots:
    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.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:34:28 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001