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

KHTML

kmultipart.h

Go to the documentation of this file.
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., 51 Franklin Street, Fifth Floor,
00017    Boston, MA 02110-1301, USA.
00018 */
00019 
00020 #ifndef __kmultipart_h__
00021 #define __kmultipart_h__
00022 
00023 #include <httpfilter/httpfilter.h>
00024 
00025 #include <kparts/part.h>
00026 #include <kparts/browserextension.h>
00027 #include <kaboutdata.h>
00028 #include <QtCore/QDate>
00029 
00030 class KTemporaryFile;
00031 class KLineParser;
00032 
00036 class KMultiPart : public KParts::ReadOnlyPart
00037 {
00038     Q_OBJECT
00039 public:
00040     KMultiPart( QWidget *parentWidget,
00041                 QObject *parent, const QVariantList& );
00042     virtual ~KMultiPart();
00043 
00044     virtual bool openFile() { return false; }
00045     virtual bool openUrl( const KUrl &url );
00046 
00047     virtual bool closeUrl();
00048 
00049     static KAboutData* createAboutData();
00050 
00051 protected:
00052     virtual void guiActivateEvent( KParts::GUIActivateEvent *e );
00053     void setPart( const QString& mimeType );
00054 
00055     void startOfData();
00056     void sendData( const QByteArray& line );
00057     void endOfData();
00058 
00059 private Q_SLOTS:
00060     void reallySendData( const QByteArray& line );
00061     //void slotPopupMenu( KXMLGUIClient *cl, const QPoint &pos, const KUrl &u, const QString &mime, mode_t mode );
00062     void slotJobFinished( KJob *job );
00063     void slotData( KIO::Job *, const QByteArray & );
00064     //void updateWindowCaption();
00065 
00066     void slotPartCompleted();
00067 
00068     void startHeader();
00069 
00070     void slotProgressInfo();
00071 
00072 private:
00073     KParts::BrowserExtension* m_extension;
00074     QPointer<KParts::ReadOnlyPart> m_part;
00075     bool m_isHTMLPart;
00076     bool m_partIsLoading;
00077     KIO::Job* m_job;
00078     QByteArray m_boundary;
00079     int m_boundaryLength;
00080     QString m_mimeType; // the one handled by m_part - store the kservice instead?
00081     QString m_nextMimeType; // while parsing headers
00082     KTemporaryFile* m_tempFile;
00083     KLineParser* m_lineParser;
00084     bool m_bParsingHeader;
00085     bool m_bGotAnyHeader;
00086     bool m_gzip;
00087     HTTPFilterBase *m_filter;
00088     // Speed measurements
00089     long m_totalNumberOfFrames;
00090     long m_numberOfFrames;
00091     long m_numberOfFramesSkipped;
00092     QTime m_qtime;
00093     QTimer* m_timer;
00094 };
00095 
00096 #if 0
00097 class KMultiPartBrowserExtension : public KParts::BrowserExtension
00098 {
00099     //Q_OBJECT
00100 public:
00101     KMultiPartBrowserExtension( KMultiPart *parent, const char *name = 0 );
00102 
00103     virtual int xOffset();
00104     virtual int yOffset();
00105 
00106 //protected Q_SLOTS:
00107     void print();
00108     void reparseConfiguration();
00109 
00110 private:
00111     KMultiPart *m_imgPart;
00112 };
00113 #endif
00114 
00115 #endif

KHTML

Skip menu "KHTML"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • 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
Generated for kdelibs by doxygen 1.7.3
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal