kget
abstractmetalink.cpp
Go to the documentation of this file.
167 //one file that has been downloaded now is finished//FIXME ignore downloads that were finished in the previous download!!!!
219 i18n("The download could not be verified, do you want to repair (if repairing does not work the download would be restarted) it?"),
237 QModelIndex signatureVerified = m_fileModel->index(factory->dest(), FileItem::SignatureVerified);
395 void AbstractMetalink::setAvailableMirrors(const KUrl &file, const QHash<KUrl, QPair<bool, int> > &mirrors)
409 if (file->doDownload()) {//FIXME when a download did not start yet it should be moveable!!//FIXME why not working, when only two connections?
475 //check if the file at dest exists already and ask the user what to do in this case, ignore already running transfers
483 KIO::RenameDialog dlg(0, i18n("File already exists"), index.data().toString(), dest, KIO::RenameDialog_Mode(KIO::M_MULTI | KIO::M_OVERWRITE | KIO::M_SKIP));
515 if (doDownload && (factory->status() != Finished) && (factory->status() != FinishedKeepAlive)) {
531 //some files have been selected that are not finished yet, set them to stop if the transfer is not running (checked in slotStatus)
void fileDlgFinished(int result)
Definition: abstractmetalink.cpp:433
Definition: filemodel.h:45
Definition: transfer.h:52
The job is stopped, but this also indicates that it stopped because an error occurred.
Definition: job.h:47
Capabilities capabilities() const
Returns the capabilities this Transfer supports.
Definition: transfer.h:111
QObject * sender() const
virtual Signature * signature(const KUrl &file)
Definition: abstractmetalink.cpp:299
virtual bool setDirectory(const KUrl &newDirectory)
Move the download to the new destination.
Definition: abstractmetalink.cpp:354
This class manages multiple DataSources and saves the received data to the file.
Definition: datasourcefactory.h:38
void slotUpdateCapabilities()
Definition: abstractmetalink.cpp:404
void setAvailableMirrors(const KUrl &file, const QHash< KUrl, QPair< bool, int > > &mirrors)
Set the mirrors, int the number of paralell connections to the mirror bool if the mirror should be us...
Definition: abstractmetalink.cpp:395
bool exists() const
QModelIndexList fileIndexes(int column) const
Returns a list of pointers to all files of this model.
Definition: filemodel.cpp:475
void repair()
Tries to repair a broken download, via completely redownloading it or only the borken parts...
Definition: datasourcefactory.cpp:889
AbstractMetalink(TransferGroup *parent, TransferFactory *factory, Scheduler *scheduler, const KUrl &src, const KUrl &dest, const QDomElement *e=0)
Definition: abstractmetalink.cpp:38
Transfer::Capabilities capabilities() const
The capabilities the DataSourceFactory supports.
Definition: datasourcefactory.h:55
virtual Verifier * verifier(const KUrl &file)
Definition: abstractmetalink.cpp:290
Definition: transfer.h:53
void updateStatus(DataSourceFactory *sender, bool *changeStatus)
Definition: abstractmetalink.cpp:144
bool isValid() const
void slotRename(const KUrl &oldUrl, const KUrl &newUrl)
Definition: abstractmetalink.cpp:341
int count(const T &value) const
void append(const T &value)
KIO::filesize_t downloadedSize() const
Definition: datasourcefactory.h:72
int rowCount(const QModelIndex &parent=QModelIndex()) const
Definition: filemodel.cpp:506
Definition: job.h:43
void setDoDownload(bool doDownload)
Set if the datasourcefactory should download the file or not, if set to false the download will be st...
Definition: datasourcefactory.cpp:350
void recalculateProcessedSize()
Definition: abstractmetalink.cpp:98
void setDirectory(const KUrl &newDirectory)
Set the url to the directory the files are stored in, the filemodel stores its entries as relative pa...
Definition: filemodel.cpp:538
int remove(const Key &key)
void slotDataSourceFactoryChange(Transfer::ChangesFlags change)
Definition: abstractmetalink.cpp:55
virtual void slotSignatureVerified()
Definition: abstractmetalink.cpp:229
QList< Key > keys() const
QHash< KUrl, QPair< bool, int > > availableMirrors(const KUrl &file) const
The mirrors that are available bool if it is used, int how many paralell connections are allowed to t...
Definition: abstractmetalink.cpp:383
Definition: transfer.h:56
virtual void setTransferChange(ChangesFlags change, bool postEvent=false)
Makes the TransferHandler associated with this transfer know that a change in this transfer has occur...
Definition: transfer.cpp:338
Definition: filemodel.h:48
QHash< KUrl, DataSourceFactory * > m_dataSourceFactory
Definition: abstractmetalink.h:103
Definition: verifier.h:68
QVariant data(int role) const
void recalculateTotalSize(DataSourceFactory *sender)
Definition: abstractmetalink.cpp:81
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
Definition: filemodel.cpp:390
bool setNewDestination(const KUrl &newDest)
Definition: datasourcefactory.cpp:823
Definition: filemodel.h:46
void setStatus(Job::Status jobStatus, const QString &text=QString(), const QPixmap &pix=QPixmap())
Sets the Job status to jobStatus, the status text to text and the status pixmap to pix...
Definition: transfer.cpp:292
Definition: transfer.h:54
Definition: filemodel.h:49
void slotVerified(bool isVerified)
Definition: abstractmetalink.cpp:198
bool toBool() const
Definition: transfer.h:55
bool contains(const Key &key) const
Definition: transfer.h:63
bool doDownload() const
Returns whether the datasourcefactory should download the file or not, true by default.
Definition: datasourcefactory.h:141
Definition: filemodel.h:47
void filesSelected()
Checks if the ticked (not started yet) files exist already on the hd and asks the user how to proceed...
Definition: abstractmetalink.cpp:453
KUrl getUrl(const QModelIndex &index)
The url on the filesystem (no check if the file exists yet!) of index, it can be a folder or file...
Definition: filemodel.cpp:544
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
void setCapabilities(Capabilities capabilities)
Sets the capabilities and automatically emits capabilitiesChanged.
Definition: transfer.cpp:68
QString toString() const
Definition: verifier.h:79
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const
Definition: filemodel.cpp:436
Definition: transfer.h:36
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:28:43 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:28:43 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.