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

KHTML

  • khtml
  • kmultipart
kmultipart.cpp
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#include "kmultipart.h"
21
22
23#include <kcomponentdata.h>
24#include <kmimetype.h>
25#include <klocale.h>
26#include <kjobuidelegate.h>
27#include <kio/job.h>
28#include <QtCore/QFile>
29#include <ktemporaryfile.h>
30#include <kmessagebox.h>
31#include <kmimetypetrader.h>
32#include <kpluginfactory.h>
33#include <khtml_part.h>
34#include <unistd.h>
35#include <kxmlguifactory.h>
36#include <QtCore/QTimer>
37#include <kvbox.h>
38
39static KAboutData kmultipartAboutData()
40{
41 KAboutData aboutData( "kmultipart", 0, ki18n("KMultiPart"),
42 "0.1",
43 ki18n( "Embeddable component for multipart/mixed" ),
44 KAboutData::License_GPL,
45 ki18n("Copyright 2001-2011, David Faure <email>faure@kde.org</email>"));
46 return aboutData;
47}
48
49K_PLUGIN_FACTORY(KMultiPartFactory, registerPlugin<KMultiPart>();)
50K_EXPORT_PLUGIN(KMultiPartFactory(kmultipartAboutData()))
51
52//#define DEBUG_PARSING
53
54class KLineParser
55{
56public:
57 KLineParser() {
58 m_lineComplete = false;
59 }
60 void addChar( char c, bool storeNewline ) {
61 if ( !storeNewline && c == '\r' )
62 return;
63 Q_ASSERT( !m_lineComplete );
64 if ( storeNewline || c != '\n' ) {
65 int sz = m_currentLine.size();
66 m_currentLine.resize( sz+1 );
67 m_currentLine[sz] = c;
68 }
69 if ( c == '\n' )
70 m_lineComplete = true;
71 }
72 bool isLineComplete() const {
73 return m_lineComplete;
74 }
75 QByteArray currentLine() const {
76 return m_currentLine;
77 }
78 void clearLine() {
79 Q_ASSERT( m_lineComplete );
80 reset();
81 }
82 void reset() {
83 m_currentLine.resize( 0 );
84 m_lineComplete = false;
85 }
86private:
87 QByteArray m_currentLine;
88 bool m_lineComplete; // true when ending with '\n'
89};
90
91/* testcase:
92 Content-type: multipart/mixed;boundary=ThisRandomString
93
94--ThisRandomString
95Content-type: text/plain
96
97Data for the first object.
98
99--ThisRandomString
100Content-type: text/plain
101
102Data for the second and last object.
103
104--ThisRandomString--
105*/
106
107
108KMultiPart::KMultiPart( QWidget *parentWidget,
109 QObject *parent, const QVariantList& )
110 : KParts::ReadOnlyPart( parent )
111{
112 m_filter = 0L;
113
114 setComponentData( KMultiPartFactory::componentData() );
115
116 KVBox *box = new KVBox( parentWidget );
117 setWidget( box );
118
119 m_extension = new KParts::BrowserExtension( this );
120
121 m_part = 0L;
122 m_isHTMLPart = false;
123 m_job = 0L;
124 m_lineParser = new KLineParser;
125 m_tempFile = 0;
126
127 m_timer = new QTimer( this );
128 connect( m_timer, SIGNAL(timeout()), this, SLOT(slotProgressInfo()) );
129}
130
131KMultiPart::~KMultiPart()
132{
133 // important: delete the nested part before the part or qobject destructor runs.
134 // we now delete the nested part which deletes the part's widget which makes
135 // _OUR_ m_widget 0 which in turn avoids our part destructor to delete the
136 // widget ;-)
137 // ### additional note: it _can_ be that the part has been deleted before:
138 // when we're in a html frameset and the view dies first, then it will also
139 // kill the htmlpart
140 if ( m_part )
141 delete static_cast<KParts::ReadOnlyPart *>( m_part );
142 delete m_job;
143 delete m_lineParser;
144 if ( m_tempFile ) {
145 m_tempFile->setAutoRemove( true );
146 delete m_tempFile;
147 }
148 delete m_filter;
149 m_filter = 0L;
150}
151
152
153void KMultiPart::startHeader()
154{
155 m_bParsingHeader = true; // we expect a header to come first
156 m_bGotAnyHeader = false;
157 m_gzip = false;
158 // just to be sure for now
159 delete m_filter;
160 m_filter = 0L;
161}
162
163
164bool KMultiPart::openUrl( const KUrl &url )
165{
166 setUrl(url);
167 m_lineParser->reset();
168 startHeader();
169
170 //m_mimeType = arguments().mimeType();
171
172 // Hmm, args.reload is set to true when reloading, but this doesn't seem to be enough...
173 // I get "HOLD: Reusing held slave for <url>", and the old data
174
175 m_job = KIO::get( url,
176 arguments().reload() ? KIO::Reload : KIO::NoReload,
177 KIO::HideProgressInfo );
178
179 emit started( 0 /*m_job*/ ); // don't pass the job, it would interfere with our own infoMessage
180
181 connect( m_job, SIGNAL(result(KJob*)),
182 this, SLOT(slotJobFinished(KJob*)) );
183 connect( m_job, SIGNAL(data(KIO::Job*,QByteArray)),
184 this, SLOT(slotData(KIO::Job*,QByteArray)) );
185
186 m_numberOfFrames = 0;
187 m_numberOfFramesSkipped = 0;
188 m_totalNumberOfFrames = 0;
189 m_qtime.start();
190 m_timer->start( 1000 ); //1s
191
192 return true;
193}
194
195// Yes, libkdenetwork's has such a parser already (MultiPart),
196// but it works on the complete string, expecting the whole data to be available....
197// The version here is asynchronous.
198void KMultiPart::slotData( KIO::Job *job, const QByteArray &data )
199{
200 if (m_boundary.isNull())
201 {
202 QString tmp = job->queryMetaData("media-boundary");
203 kDebug() << "Got Boundary from kio-http '" << tmp << "'";
204 if ( !tmp.isEmpty() ) {
205 // as per r437578, sometimes we se something like this:
206 // Content-Type: multipart/x-mixed-replace; boundary=--myboundary
207 // ..
208 // --myboundary
209 // e.g. the hashes specified in the header are extra. However,
210 // we also see the following on the w3c bugzilla:
211 // boundary="------- =_aaaaaaaaaa0"
212 // ..
213 //--------- =_aaaaaaaaaa0
214 // e.g. the hashes are accurate. For now, we consider the quoted
215 // case to be quirk-free, and only apply the -- stripping quirk
216 // when we're unquoted.
217 if (tmp.startsWith(QLatin1String("--")) &&
218 job->queryMetaData("media-boundary-kio-quoted") != "true")
219 m_boundary = tmp.toLatin1();
220 else
221 m_boundary = QByteArray("--")+tmp.toLatin1();
222 m_boundaryLength = m_boundary.length();
223 }
224 }
225 // Append to m_currentLine until eol
226 for ( int i = 0; i < data.size() ; ++i )
227 {
228 // Store char. Skip if '\n' and currently parsing a header.
229 m_lineParser->addChar( data[i], !m_bParsingHeader );
230 if ( m_lineParser->isLineComplete() )
231 {
232 QByteArray line = m_lineParser->currentLine();
233#ifdef DEBUG_PARSING
234 kDebug() << "line.size()=" << line.size();
235#endif
236#ifdef DEBUG_PARSING
237 kDebug() << "[" << m_bParsingHeader << "] line='" << line << "'";
238#endif
239 if ( m_bParsingHeader )
240 {
241 if ( !line.isEmpty() )
242 m_bGotAnyHeader = true;
243 if ( m_boundary.isNull() )
244 {
245 if ( !line.isEmpty() ) {
246#ifdef DEBUG_PARSING
247 kDebug() << "Boundary is " << line;
248#endif
249 m_boundary = line;
250 m_boundaryLength = m_boundary.length();
251 }
252 }
253 else if ( !qstrnicmp( line.data(), "Content-Encoding:", 17 ) )
254 {
255 QString encoding = QString::fromLatin1(line.data()+17).trimmed().toLower();
256 if (encoding == "gzip" || encoding == "x-gzip") {
257 m_gzip = true;
258 } else {
259 kDebug() << "FIXME: unhandled encoding type in KMultiPart: " << encoding;
260 }
261 }
262 // parse Content-Type
263 else if ( !qstrnicmp( line.data(), "Content-Type:", 13 ) )
264 {
265 Q_ASSERT( m_nextMimeType.isNull() );
266 m_nextMimeType = QString::fromLatin1( line.data() + 14 ).trimmed();
267 int semicolon = m_nextMimeType.indexOf( ';' );
268 if ( semicolon != -1 )
269 m_nextMimeType = m_nextMimeType.left( semicolon );
270 kDebug() << "m_nextMimeType=" << m_nextMimeType;
271 }
272 // Empty line, end of headers (if we had any header line before)
273 else if ( line.isEmpty() && m_bGotAnyHeader )
274 {
275 m_bParsingHeader = false;
276#ifdef DEBUG_PARSING
277 kDebug() << "end of headers";
278#endif
279 startOfData();
280 }
281 // First header (when we know it from kio_http)
282 else if ( line == m_boundary )
283 ; // nothing to do
284 else if ( !line.isEmpty() ) // this happens with e.g. Set-Cookie:
285 kDebug() << "Ignoring header " << line;
286 } else {
287 if ( !qstrncmp( line, m_boundary, m_boundaryLength ) )
288 {
289#ifdef DEBUG_PARSING
290 kDebug() << "boundary found!";
291 kDebug() << "after it is " << line.data() + m_boundaryLength;
292#endif
293 // Was it the very last boundary ?
294 if ( !qstrncmp( line.data() + m_boundaryLength, "--", 2 ) )
295 {
296#ifdef DEBUG_PARSING
297 kDebug() << "Completed!";
298#endif
299 endOfData();
300 emit completed();
301 } else
302 {
303 char nextChar = *(line.data() + m_boundaryLength);
304#ifdef DEBUG_PARSING
305 kDebug() << "KMultiPart::slotData nextChar='" << nextChar << "'";
306#endif
307 if ( nextChar == '\n' || nextChar == '\r' ) {
308 endOfData();
309 startHeader();
310 }
311 else {
312 // otherwise, false hit, it has trailing stuff
313 sendData(line);
314 }
315 }
316 } else {
317 // send to part
318 sendData(line);
319 }
320 }
321 m_lineParser->clearLine();
322 }
323 }
324}
325
326void KMultiPart::setPart( const QString& mimeType )
327{
328 KXMLGUIFactory *guiFactory = factory();
329 if ( guiFactory ) // seems to be 0 when restoring from SM
330 guiFactory->removeClient( this );
331 kDebug() << "KMultiPart::setPart " << mimeType;
332 delete m_part;
333 // Try to find an appropriate viewer component
334 m_part = KMimeTypeTrader::createPartInstanceFromQuery<KParts::ReadOnlyPart>
335 ( m_mimeType, widget(), this );
336 if ( !m_part ) {
337 // TODO launch external app
338 KMessageBox::error( widget(), i18n("No handler found for %1.", m_mimeType) );
339 return;
340 }
341 // By making the part a child XMLGUIClient of ours, we get its GUI merged in.
342 insertChildClient( m_part );
343 m_part->widget()->show();
344
345 connect( m_part, SIGNAL(completed()),
346 this, SLOT(slotPartCompleted()) );
347 connect( m_part, SIGNAL(completed(bool)),
348 this, SLOT(slotPartCompleted()) );
349
350 m_isHTMLPart = ( mimeType == "text/html" );
351 KParts::BrowserExtension* childExtension = KParts::BrowserExtension::childObject( m_part );
352
353 if ( childExtension )
354 {
355
356 // Forward signals from the part's browser extension
357 // this is very related (but not exactly like) KHTMLPart::processObjectRequest
358
359 connect( childExtension, SIGNAL(openUrlNotify()),
360 m_extension, SIGNAL(openUrlNotify()) );
361
362 connect( childExtension, SIGNAL(openUrlRequestDelayed(KUrl,KParts::OpenUrlArguments,KParts::BrowserArguments)),
363 m_extension, SIGNAL(openUrlRequest(KUrl,KParts::OpenUrlArguments,KParts::BrowserArguments)) );
364
365 connect( childExtension, SIGNAL(createNewWindow(KUrl,KParts::OpenUrlArguments,KParts::BrowserArguments,KParts::WindowArgs,KParts::ReadOnlyPart**)),
366 m_extension, SIGNAL(createNewWindow(KUrl,KParts::OpenUrlArguments,KParts::BrowserArguments,KParts::WindowArgs,KParts::ReadOnlyPart**)) );
367
368 // Keep in sync with khtml_part.cpp
369 connect( childExtension, SIGNAL(popupMenu(QPoint,KFileItemList,KParts::OpenUrlArguments,KParts::BrowserArguments,KParts::BrowserExtension::PopupFlags,KParts::BrowserExtension::ActionGroupMap)),
370 m_extension, SIGNAL(popupMenu(QPoint,KFileItemList,KParts::OpenUrlArguments,KParts::BrowserArguments,KParts::BrowserExtension::PopupFlags,KParts::BrowserExtension::ActionGroupMap)) );
371 connect( childExtension, SIGNAL(popupMenu(QPoint,KUrl,mode_t,KParts::OpenUrlArguments,KParts::BrowserArguments,KParts::BrowserExtension::PopupFlags,KParts::BrowserExtension::ActionGroupMap)),
372 m_extension, SIGNAL(popupMenu(QPoint,KUrl,mode_t,KParts::OpenUrlArguments,KParts::BrowserArguments,KParts::BrowserExtension::PopupFlags,KParts::BrowserExtension::ActionGroupMap)) );
373
374 if ( m_isHTMLPart )
375 connect( childExtension, SIGNAL(infoMessage(QString)),
376 m_extension, SIGNAL(infoMessage(QString)) );
377 // For non-HTML we prefer to show our infoMessage ourselves.
378
379 childExtension->setBrowserInterface( m_extension->browserInterface() );
380
381 connect( childExtension, SIGNAL(enableAction(const char*,bool)),
382 m_extension, SIGNAL(enableAction(const char*,bool)) );
383 connect( childExtension, SIGNAL(setLocationBarUrl(QString)),
384 m_extension, SIGNAL(setLocationBarUrl(QString)) );
385 connect( childExtension, SIGNAL(setIconUrl(KUrl)),
386 m_extension, SIGNAL(setIconUrl(KUrl)) );
387 connect( childExtension, SIGNAL(loadingProgress(int)),
388 m_extension, SIGNAL(loadingProgress(int)) );
389 if ( m_isHTMLPart ) // for non-HTML we have our own
390 connect( childExtension, SIGNAL(speedProgress(int)),
391 m_extension, SIGNAL(speedProgress(int)) );
392 connect( childExtension, SIGNAL(selectionInfo(KFileItemList)),
393 m_extension, SIGNAL(selectionInfo(KFileItemList)) );
394 connect( childExtension, SIGNAL(selectionInfo(QString)),
395 m_extension, SIGNAL(selectionInfo(QString)) );
396 connect( childExtension, SIGNAL(selectionInfo(KUrl::List)),
397 m_extension, SIGNAL(selectionInfo(KUrl::List)) );
398 connect( childExtension, SIGNAL(mouseOverInfo(KFileItem)),
399 m_extension, SIGNAL(mouseOverInfo(KFileItem)) );
400 connect( childExtension, SIGNAL(moveTopLevelWidget(int,int)),
401 m_extension, SIGNAL(moveTopLevelWidget(int,int)) );
402 connect( childExtension, SIGNAL(resizeTopLevelWidget(int,int)),
403 m_extension, SIGNAL(resizeTopLevelWidget(int,int)) );
404 }
405
406 m_partIsLoading = false;
407 // Load the part's plugins too.
408 // ###### This is a hack. The bug is that KHTMLPart doesn't load its plugins
409 // if className != "Browser/View".
410 loadPlugins( this, m_part, m_part->componentData() );
411 // Get the part's GUI to appear
412 if ( guiFactory )
413 guiFactory->addClient( this );
414}
415
416void KMultiPart::startOfData()
417{
418 kDebug() << "KMultiPart::startOfData";
419 Q_ASSERT( !m_nextMimeType.isNull() );
420 if( m_nextMimeType.isNull() )
421 return;
422
423 if ( m_gzip )
424 {
425 // We can't use KFilterDev because it assumes it can read as much data as necessary
426 // from the underlying device. It's a pull strategy, while KMultiPart has to do
427 // a push strategy.
428 m_filter = new HTTPFilterGZip;
429 connect(m_filter, SIGNAL(output(QByteArray)), this, SLOT(reallySendData(QByteArray)));
430 }
431
432 if ( m_mimeType != m_nextMimeType )
433 {
434 // Need to switch parts (or create the initial one)
435 m_mimeType = m_nextMimeType;
436 setPart( m_mimeType );
437 }
438 Q_ASSERT( m_part );
439 // Pass args (e.g. reload)
440 m_part->setArguments( arguments() );
441 KParts::BrowserExtension* childExtension = KParts::BrowserExtension::childObject( m_part );
442 if ( childExtension )
443 childExtension->setBrowserArguments( m_extension->browserArguments() );
444
445 m_nextMimeType.clear();
446 if ( m_tempFile ) {
447 m_tempFile->setAutoRemove( true );
448 delete m_tempFile;
449 m_tempFile = 0;
450 }
451 if ( m_isHTMLPart )
452 {
453 KHTMLPart* htmlPart = static_cast<KHTMLPart *>( static_cast<KParts::ReadOnlyPart *>( m_part ) );
454 htmlPart->begin( url() );
455 }
456 else
457 {
458 // ###### TODO use a QByteArray and a data: URL instead
459 m_tempFile = new KTemporaryFile;
460 m_tempFile->open();
461 }
462}
463
464void KMultiPart::sendData( const QByteArray& line )
465{
466 if ( m_filter )
467 {
468 m_filter->slotInput( line );
469 }
470 else
471 {
472 reallySendData( line );
473 }
474}
475
476void KMultiPart::reallySendData( const QByteArray& line )
477{
478 if ( m_isHTMLPart )
479 {
480 KHTMLPart* htmlPart = static_cast<KHTMLPart *>( static_cast<KParts::ReadOnlyPart *>( m_part ) );
481 htmlPart->write( line.data(), line.size() );
482 }
483 else if ( m_tempFile )
484 {
485 m_tempFile->write( line.data(), line.size() );
486 }
487}
488
489void KMultiPart::endOfData()
490{
491 Q_ASSERT( m_part );
492 if ( m_isHTMLPart )
493 {
494 KHTMLPart* htmlPart = static_cast<KHTMLPart *>( static_cast<KParts::ReadOnlyPart *>( m_part ) );
495 htmlPart->end();
496 } else if ( m_tempFile )
497 {
498 const QString tempFileName = m_tempFile->fileName();
499 m_tempFile->close();
500 if ( m_partIsLoading )
501 {
502 // The part is still loading the last data! Let it proceed then
503 // Otherwise we'd keep canceling it, and nothing would ever show up...
504 kDebug() << "KMultiPart::endOfData part isn't ready, skipping frame";
505 ++m_numberOfFramesSkipped;
506 m_tempFile->setAutoRemove( true );
507 }
508 else
509 {
510 kDebug() << "KMultiPart::endOfData opening " << tempFileName;
511 KUrl url(tempFileName);
512 m_partIsLoading = true;
513 (void) m_part->openUrl( url );
514 }
515 delete m_tempFile;
516 m_tempFile = 0L;
517 }
518}
519
520void KMultiPart::slotPartCompleted()
521{
522 if ( !m_isHTMLPart )
523 {
524 Q_ASSERT( m_part );
525 // Delete temp file used by the part
526 Q_ASSERT( m_part->url().isLocalFile() );
527 kDebug() << "slotPartCompleted deleting " << m_part->url().toLocalFile();
528 (void) unlink( QFile::encodeName( m_part->url().toLocalFile() ) );
529 m_partIsLoading = false;
530 ++m_numberOfFrames;
531 // Do not emit completed from here.
532 }
533}
534
535bool KMultiPart::closeUrl()
536{
537 m_timer->stop();
538 if ( m_part )
539 return m_part->closeUrl();
540 return true;
541}
542
543void KMultiPart::guiActivateEvent( KParts::GUIActivateEvent * )
544{
545 // Not public!
546 //if ( m_part )
547 // m_part->guiActivateEvent( e );
548}
549
550void KMultiPart::slotJobFinished( KJob *job )
551{
552 if ( job->error() )
553 {
554 // TODO use khtml's error:// scheme
555 job->uiDelegate()->showErrorMessage();
556 emit canceled( job->errorString() );
557 }
558 else
559 {
560 /*if ( m_khtml->view()->contentsY() == 0 )
561 {
562 const KParts::OpenUrlArguments args = arguments();
563 m_khtml->view()->setContentsPos( args.xOffset(), args.yOffset() );
564 }*/
565
566 emit completed();
567
568 //QTimer::singleShot( 0, this, SLOT(updateWindowCaption()) );
569 }
570 m_job = 0L;
571}
572
573void KMultiPart::slotProgressInfo()
574{
575 int time = m_qtime.elapsed();
576 if ( !time ) return;
577 if ( m_totalNumberOfFrames == m_numberOfFrames + m_numberOfFramesSkipped )
578 return; // No change, don't overwrite statusbar messages if any
579 //kDebug() << m_numberOfFrames << " in " << time << " milliseconds";
580 QString str( "%1 frames per second, %2 frames skipped per second" );
581 str = str.arg( 1000.0 * (double)m_numberOfFrames / (double)time );
582 str = str.arg( 1000.0 * (double)m_numberOfFramesSkipped / (double)time );
583 m_totalNumberOfFrames = m_numberOfFrames + m_numberOfFramesSkipped;
584 //kDebug() << str;
585 emit m_extension->infoMessage( str );
586}
587
588
589#if 0
590KMultiPartBrowserExtension::KMultiPartBrowserExtension( KMultiPart *parent, const char *name )
591 : KParts::BrowserExtension( parent, name )
592{
593 m_imgPart = parent;
594}
595
596int KMultiPartBrowserExtension::xOffset()
597{
598 return m_imgPart->doc()->view()->contentsX();
599}
600
601int KMultiPartBrowserExtension::yOffset()
602{
603 return m_imgPart->doc()->view()->contentsY();
604}
605
606void KMultiPartBrowserExtension::print()
607{
608 static_cast<KHTMLPartBrowserExtension *>( m_imgPart->doc()->browserExtension() )->print();
609}
610
611void KMultiPartBrowserExtension::reparseConfiguration()
612{
613 static_cast<KHTMLPartBrowserExtension *>( m_imgPart->doc()->browserExtension() )->reparseConfiguration();
614 m_imgPart->doc()->setAutoloadImages( true );
615}
616#endif
617
618#include "kmultipart.moc"
HTTPFilterBase::slotInput
virtual void slotInput(const QByteArray &d)=0
HTTPFilterGZip
KAboutData
KAboutData::License_GPL
License_GPL
KFileItemList
KFileItem
KHTMLPartBrowserExtension
This is the BrowserExtension for a KHTMLPart document.
Definition: khtml_ext.h:44
KHTMLPart
This class is khtml's main class.
Definition: khtml_part.h:207
KHTMLPart::write
virtual void write(const char *str, int len=-1)
Writes another part of the HTML code to the widget.
Definition: khtml_part.cpp:2089
KHTMLPart::end
virtual void end()
Call this after your last call to write().
Definition: khtml_part.cpp:2138
KHTMLPart::begin
virtual void begin(const KUrl &url=KUrl(), int xOffset=0, int yOffset=0)
Clears the widget and prepares it for new content.
Definition: khtml_part.cpp:1993
KIO::Job
KIO::Job::queryMetaData
QString queryMetaData(const QString &key)
KJobUiDelegate::showErrorMessage
virtual void showErrorMessage()
KJob
KJob::errorString
virtual QString errorString() const
KJob::error
int error() const
KJob::uiDelegate
KJobUiDelegate * uiDelegate() const
KMessageBox::error
static void error(QWidget *parent, const QString &text, const QString &caption=QString(), Options options=Notify)
KMultiPart
http://wp.netscape.com/assist/net_sites/pushpull.html
Definition: kmultipart.h:37
KMultiPart::~KMultiPart
virtual ~KMultiPart()
Definition: kmultipart.cpp:131
KMultiPart::guiActivateEvent
virtual void guiActivateEvent(KParts::GUIActivateEvent *e)
Definition: kmultipart.cpp:543
KMultiPart::sendData
void sendData(const QByteArray &line)
Definition: kmultipart.cpp:464
KMultiPart::setPart
void setPart(const QString &mimeType)
Definition: kmultipart.cpp:326
KMultiPart::KMultiPart
KMultiPart(QWidget *parentWidget, QObject *parent, const QVariantList &)
Definition: kmultipart.cpp:108
KMultiPart::endOfData
void endOfData()
Definition: kmultipart.cpp:489
KMultiPart::closeUrl
virtual bool closeUrl()
Definition: kmultipart.cpp:535
KMultiPart::startOfData
void startOfData()
Definition: kmultipart.cpp:416
KParts::BrowserExtension
KParts::BrowserExtension::browserInterface
BrowserInterface * browserInterface() const
KParts::BrowserExtension::setBrowserArguments
virtual void setBrowserArguments(const BrowserArguments &args)
KParts::BrowserExtension::childObject
static BrowserExtension * childObject(QObject *obj)
KParts::BrowserExtension::browserArguments
BrowserArguments browserArguments() const
KParts::BrowserExtension::infoMessage
void infoMessage(const QString &)
KParts::BrowserExtension::setBrowserInterface
void setBrowserInterface(BrowserInterface *impl)
KParts::GUIActivateEvent
KParts::OpenUrlArguments
KParts::PartBase::setComponentData
virtual void setComponentData(const KComponentData &componentData)
KParts::Part::widget
virtual QWidget * widget()
KParts::Part::setWidget
virtual void setWidget(QWidget *widget)
KParts::Part::loadPlugins
void loadPlugins()
KParts::ReadOnlyPart
KParts::ReadOnlyPart::started
void started(KIO::Job *)
KParts::ReadOnlyPart::arguments
OpenUrlArguments arguments() const
KParts::ReadOnlyPart::url
KUrl url
KParts::ReadOnlyPart::completed
void completed()
KParts::ReadOnlyPart::canceled
void canceled(const QString &errMsg)
KParts::ReadOnlyPart::openUrl
virtual bool openUrl(const KUrl &url)
KParts::ReadOnlyPart::setUrl
void setUrl(const KUrl &url)
KParts::WindowArgs
KTemporaryFile
KUrl::List
KUrl
KVBox
KXMLGUIClient::factory
KXMLGUIFactory * factory() const
KXMLGUIClient::insertChildClient
void insertChildClient(KXMLGUIClient *child)
KXMLGUIFactory
KXMLGUIFactory::removeClient
void removeClient(KXMLGUIClient *client)
KXMLGUIFactory::addClient
void addClient(KXMLGUIClient *client)
QMap
QObject
QWidget
output
void output(QList< Action > actions, QHash< QString, QString > domain)
kDebug
#define kDebug
job.h
kcomponentdata.h
khtml_part.h
kjobuidelegate.h
timeout
int timeout
klocale.h
ki18n
KLocalizedString ki18n(const char *msg)
i18n
QString i18n(const char *text)
kmessagebox.h
kmimetype.h
kmimetypetrader.h
kmultipartAboutData
static KAboutData kmultipartAboutData()
Definition: kmultipart.cpp:39
K_EXPORT_PLUGIN
K_EXPORT_PLUGIN(KMultiPartFactory(kmultipartAboutData())) class KLineParser
Definition: kmultipart.cpp:50
kmultipart.h
kpluginfactory.h
ktemporaryfile.h
kvbox.h
kxmlguifactory.h
KIO::get
TransferJob * get(const KUrl &url, LoadType reload=NoReload, JobFlags flags=DefaultFlags)
KIO::NoReload
NoReload
KIO::Reload
Reload
KIO::HideProgressInfo
HideProgressInfo
KParts
print
KAction * print(const QObject *recvr, const char *slot, QObject *parent)
name
const char * name(StandardAction id)
reset
KGuiItem reset()
reload
const KShortcut & reload()
K_PLUGIN_FACTORY
K_PLUGIN_FACTORY(ProxyScoutFactory, registerPlugin< KPAC::ProxyScout >();) namespace KPAC
KParts::BrowserArguments
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 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-4.14.38 API Reference

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