• Skip to content
  • Skip to link menu
KDE 4.7 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 protected:
00050     virtual void guiActivateEvent( KParts::GUIActivateEvent *e );
00051     void setPart( const QString& mimeType );
00052 
00053     void startOfData();
00054     void sendData( const QByteArray& line );
00055     void endOfData();
00056 
00057 private Q_SLOTS:
00058     void reallySendData( const QByteArray& line );
00059     //void slotPopupMenu( KXMLGUIClient *cl, const QPoint &pos, const KUrl &u, const QString &mime, mode_t mode );
00060     void slotJobFinished( KJob *job );
00061     void slotData( KIO::Job *, const QByteArray & );
00062     //void updateWindowCaption();
00063 
00064     void slotPartCompleted();
00065 
00066     void startHeader();
00067 
00068     void slotProgressInfo();
00069 
00070 private:
00071     KParts::BrowserExtension* m_extension;
00072     QPointer<KParts::ReadOnlyPart> m_part;
00073     bool m_isHTMLPart;
00074     bool m_partIsLoading;
00075     KIO::Job* m_job;
00076     QByteArray m_boundary;
00077     int m_boundaryLength;
00078     QString m_mimeType; // the one handled by m_part - store the kservice instead?
00079     QString m_nextMimeType; // while parsing headers
00080     KTemporaryFile* m_tempFile;
00081     KLineParser* m_lineParser;
00082     bool m_bParsingHeader;
00083     bool m_bGotAnyHeader;
00084     bool m_gzip;
00085     HTTPFilterBase *m_filter;
00086     // Speed measurements
00087     long m_totalNumberOfFrames;
00088     long m_numberOfFrames;
00089     long m_numberOfFramesSkipped;
00090     QTime m_qtime;
00091     QTimer* m_timer;
00092 };
00093 
00094 #if 0
00095 class KMultiPartBrowserExtension : public KParts::BrowserExtension
00096 {
00097     //Q_OBJECT
00098 public:
00099     KMultiPartBrowserExtension( KMultiPart *parent, const char *name = 0 );
00100 
00101     virtual int xOffset();
00102     virtual int yOffset();
00103 
00104 //protected Q_SLOTS:
00105     void print();
00106     void reparseConfiguration();
00107 
00108 private:
00109     KMultiPart *m_imgPart;
00110 };
00111 #endif
00112 
00113 #endif

KHTML

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • 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.5
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