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

KHTML

  • sources
  • kde-4.12
  • kdelibs
  • khtml
  • kmultipart
kmultipart.h
Go to the documentation of this file.
1 /* This file is part of the KDE project
2  Copyright (C) 2002 David Faure <david@mandrakesoft.com>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License as published by the Free Software Foundation; either
7  version 2 of the License, or (at your option) any later version.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
19 
20 #ifndef __kmultipart_h__
21 #define __kmultipart_h__
22 
23 #include <httpfilter/httpfilter.h>
24 
25 #include <kparts/part.h>
26 #include <kparts/browserextension.h>
27 #include <kaboutdata.h>
28 #include <QtCore/QDate>
29 
30 class KTemporaryFile;
31 class KLineParser;
32 
36 class KMultiPart : public KParts::ReadOnlyPart
37 {
38  Q_OBJECT
39 public:
40  KMultiPart( QWidget *parentWidget,
41  QObject *parent, const QVariantList& );
42  virtual ~KMultiPart();
43 
44  virtual bool openFile() { return false; }
45  virtual bool openUrl( const KUrl &url );
46 
47  virtual bool closeUrl();
48 
49 protected:
50  virtual void guiActivateEvent( KParts::GUIActivateEvent *e );
51  void setPart( const QString& mimeType );
52 
53  void startOfData();
54  void sendData( const QByteArray& line );
55  void endOfData();
56 
57 private Q_SLOTS:
58  void reallySendData( const QByteArray& line );
59  //void slotPopupMenu( KXMLGUIClient *cl, const QPoint &pos, const KUrl &u, const QString &mime, mode_t mode );
60  void slotJobFinished( KJob *job );
61  void slotData( KIO::Job *, const QByteArray & );
62  //void updateWindowCaption();
63 
64  void slotPartCompleted();
65 
66  void startHeader();
67 
68  void slotProgressInfo();
69 
70 private:
71  KParts::BrowserExtension* m_extension;
72  QPointer<KParts::ReadOnlyPart> m_part;
73  bool m_isHTMLPart;
74  bool m_partIsLoading;
75  KIO::Job* m_job;
76  QByteArray m_boundary;
77  int m_boundaryLength;
78  QString m_mimeType; // the one handled by m_part - store the kservice instead?
79  QString m_nextMimeType; // while parsing headers
80  KTemporaryFile* m_tempFile;
81  KLineParser* m_lineParser;
82  bool m_bParsingHeader;
83  bool m_bGotAnyHeader;
84  bool m_gzip;
85  HTTPFilterBase *m_filter;
86  // Speed measurements
87  long m_totalNumberOfFrames;
88  long m_numberOfFrames;
89  long m_numberOfFramesSkipped;
90  QTime m_qtime;
91  QTimer* m_timer;
92 };
93 
94 #if 0
95 class KMultiPartBrowserExtension : public KParts::BrowserExtension
96 {
97  //Q_OBJECT
98 public:
99  KMultiPartBrowserExtension( KMultiPart *parent, const char *name = 0 );
100 
101  virtual int xOffset();
102  virtual int yOffset();
103 
104 //protected Q_SLOTS:
105  void print();
106  void reparseConfiguration();
107 
108 private:
109  KMultiPart *m_imgPart;
110 };
111 #endif
112 
113 #endif
KParts::BrowserExtension
print
KAction * print(const QObject *recvr, const char *slot, QObject *parent)
KMultiPart::guiActivateEvent
virtual void guiActivateEvent(KParts::GUIActivateEvent *e)
Definition: kmultipart.cpp:543
QWidget
KMultiPart::startOfData
void startOfData()
Definition: kmultipart.cpp:416
KMultiPart::endOfData
void endOfData()
Definition: kmultipart.cpp:489
QString
KTemporaryFile
QObject
KUrl
KMultiPart::KMultiPart
KMultiPart(QWidget *parentWidget, QObject *parent, const QVariantList &)
Definition: kmultipart.cpp:108
KMultiPart
http://wp.netscape.com/assist/net_sites/pushpull.html
Definition: kmultipart.h:36
KMultiPart::sendData
void sendData(const QByteArray &line)
Definition: kmultipart.cpp:464
httpfilter.h
KParts::ReadOnlyPart::url
KUrl url() const
KParts::GUIActivateEvent
KParts::BrowserExtension::yOffset
virtual int yOffset()
KMultiPart::setPart
void setPart(const QString &mimeType)
Definition: kmultipart.cpp:326
KMultiPart::openUrl
virtual bool openUrl(const KUrl &url)
Definition: kmultipart.cpp:164
KIO::Job
browserextension.h
KMultiPart::openFile
virtual bool openFile()
Definition: kmultipart.h:44
kaboutdata.h
KMultiPart::~KMultiPart
virtual ~KMultiPart()
Definition: kmultipart.cpp:131
KMultiPart::closeUrl
virtual bool closeUrl()
Definition: kmultipart.cpp:535
KJob
KParts::BrowserExtension::xOffset
virtual int xOffset()
HTTPFilterBase
part.h
KParts::ReadOnlyPart
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:51:22 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

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 API Reference

Skip menu "kdelibs API Reference"
  • 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
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal