KIO
Go to the documentation of this file.
36 FileJobPrivate(
const KUrl& url,
const QByteArray &packedArgs)
44 void slotRedirection(
const KUrl &url );
45 void slotData(
const QByteArray &data );
46 void slotMimetype(
const QString &
mimetype );
85 if (!d->m_open)
return;
88 d->m_slave->send(
CMD_READ, packedArgs );
95 if (!d->m_open)
return;
103 if (!d->m_open)
return;
106 d->m_slave->send(
CMD_SEEK, packedArgs) ;
112 if (!d->m_open)
return;
121 if (!d->m_open)
return 0;
127 void FileJobPrivate::slotData(
const QByteArray &_data)
130 emit q_func()->data(q, _data);
133 void FileJobPrivate::slotRedirection(
const KUrl &url)
137 emit q->redirection(q, url);
140 void FileJobPrivate::slotMimetype(
const QString& type )
144 emit q->mimetype(q, m_mimetype);
150 emit q->position(q, pos);
160 void FileJobPrivate::slotOpen( )
170 emit q->written(q, t_written);
173 void FileJobPrivate::slotFinished()
176 kDebug(7007) <<
this << m_url;
187 q->connect( slave, SIGNAL(data(QByteArray)),
188 SLOT(slotData(QByteArray)) );
190 q->connect( slave, SIGNAL(redirection(
KUrl)),
191 SLOT(slotRedirection(
KUrl)) );
193 q->connect( slave, SIGNAL(mimeType(QString)),
194 SLOT(slotMimetype(QString)) );
196 q->connect( slave, SIGNAL(
open()),
218 #include "filejob.moc"
A UI delegate tuned to be used with KIO Jobs.
qulonglong filesize_t
64-bit file size
KIO::filesize_t size()
Size.
A simple job (one url and one command).
void seek(KIO::filesize_t offset)
Seek.
void write(const QByteArray &data)
Write block.
static SimpleJob * newJob(const KUrl &url, int command, const QByteArray &packedArgs, JobFlags flags=HideProgressInfo)
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
The file-job is an asynchronious version of normal file handling.
void read(KIO::filesize_t size)
Read block.
void slotTotalSize(KIO::filesize_t data_size)
Forward signal from the slave Can also be called by the parent job, when it knows the size.
MimetypeJob * mimetype(const KUrl &url, JobFlags flags=DefaultFlags)
Find mimetype for one file or directory.
void setUiDelegate(KJobUiDelegate *delegate)
A namespace for KIO globals.
virtual void start(KIO::Slave *slave)
FileJob(FileJobPrivate &dd)
FileJob * open(const KUrl &url, QIODevice::OpenMode mode)
Open ( random access I/O )
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Aug 27 2020 00:00:00 by
doxygen 1.8.20 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.