kopete/libkopete
kopetetransfermanager.cpp
Go to the documentation of this file.
51 Kopete::FileTransferInfo::FileTransferInfo( Kopete::Contact *contact, const QStringList& files, const unsigned long size, const QString &recipient, KopeteTransferDirection di, const unsigned int id, QString internalId, const QPixmap &preview, bool saveToDirectory )
90 Kopete::Transfer::Transfer( const Kopete::FileTransferInfo &kfti, const QString &localFile, bool showProgressInfo)
162 void Kopete::Transfer::slotNextFile( const QString &sourceFile, const QString &destinationFile )
287 // If cancel button was pressed suppress notification because it was show already in slotResultEmitted()
322 return QString( "<a href=\"%1\">%2</a>" ).arg( d->localUrl.url(), Qt::escape( d->localUrl.toLocalFile() ) );
356 Kopete::Transfer* Kopete::TransferManager::addTransfer( Kopete::Contact *contact, const QString& file, const unsigned long size, const QString &recipient, Kopete::FileTransferInfo::KopeteTransferDirection di)
361 Kopete::Transfer* Kopete::TransferManager::addTransfer( Kopete::Contact *contact, const QStringList& files, const unsigned long size, const QString &recipient, Kopete::FileTransferInfo::KopeteTransferDirection di)
363 // Use message id to make file transfer id unique because we already use it for incoming file transfer.
372 unsigned int Kopete::TransferManager::askIncomingTransfer( Kopete::Contact *contact, const QString& file, const unsigned long size, const QString& description, QString internalId, const QPixmap &preview )
374 return askIncomingTransfer( contact, QStringList( file ), size, description, internalId, preview );
377 unsigned int Kopete::TransferManager::askIncomingTransfer( Kopete::Contact *contact, const QStringList& files, const unsigned long size, const QString& description, QString internalId, const QPixmap &preview )
383 const QString dn = contact->metaContact() ? contact->metaContact()->displayName() : contact->contactId();
479 void Kopete::TransferManager::sendFile( const KUrl &file, const QString &fname, unsigned long sz,
488 url = KFileDialog::getOpenUrl( KUrl(), QString::fromLatin1("*"), 0l, i18n( "Kopete File Transfer" ));
509 i18n( "Sorry, sending files which are not stored locally is not yet supported by this protocol.\n"
538 KMessageBox::messageBox( 0, KMessageBox::Sorry, i18n( "You must provide a valid local filename" ) );
547 KMessageBox::messageBox( 0, KMessageBox::Sorry, i18n( "You do not have permission to write to selected file" ) );
551 int ret = KMessageBox::warningContinueCancel( 0, i18n( "The file '%1' already exists.\nDo you want to overwrite it ?", url.toLocalFile() ),
561 KMessageBox::messageBox( 0, KMessageBox::Sorry, i18n( "The directory %1 does not exist", dirInfo.fileName() ) );
566 KMessageBox::messageBox( 0, KMessageBox::Sorry, i18n( "You do not have permission to write to selected directory" ) );
587 KMessageBox::messageBox( 0, KMessageBox::Sorry, i18n( "You must provide a valid local directory" ) );
594 KMessageBox::messageBox( 0, KMessageBox::Sorry, i18n( "The directory %1 does not exist", dirInfo.filePath() ) );
599 KMessageBox::messageBox( 0, KMessageBox::Sorry, i18n( "You do not have permission to write to selected directory" ) );
void cancelIncomingTransfer(unsigned int id)
Cancels incoming file transfer request.
Definition: kopetetransfermanager.cpp:449
void slotProcessed(unsigned int)
Set the file size processed so far.
Definition: kopetetransfermanager.cpp:212
void setHtmlBody(const QString &body)
Sets the body of the message.
Definition: kopetemessage.cpp:238
void setFileName(const QString &fileName)
Set file name of incoming file transfer.
Definition: kopetemessage.cpp:670
A incoming file transfer request message.
Definition: kopetemessage.h:102
KUrl destinationURL()
Retrieve a URL indicating where the file is being copied to.
Definition: kopetetransfermanager.cpp:200
static const int TransferRateTimerDelay
Definition: kopetetransfermanager.cpp:69
void sendFile(const KUrl &file, const QString &localFile, unsigned long fileSize, bool mustBeLocal, QObject *sendTo, const char *slot)
Ask the user which file to send when they click Send File.
Definition: kopetetransfermanager.cpp:479
Definition: kopetechatsession.h:74
void slotComplete()
Indicate that the transfer is complete.
Definition: kopetetransfermanager.cpp:249
bool saveToDirectory() const
Definition: kopetetransfermanager.h:62
void appendMessage(Kopete::Message &msg)
Show a message to the chatwindow, or append it to the queue.
Definition: kopetechatsession.cpp:310
void setDirection(MessageDirection direction)
Set the message direction.
Definition: kopetemessage.cpp:584
void slotNextFile(const QString &sourceFile, const QString &destinationFile)
Set the source and destination file names of currently processed file.
Definition: kopetetransfermanager.cpp:162
virtual void timerEvent(QTimerEvent *event)
Definition: kopetetransfermanager.cpp:223
virtual ChatSession * manager(CanCreateFlags canCreate=CannotCreate)=0
Returns the primary message manager affiliated with this contact Although a contact can have more tha...
Transfer * addTransfer(Contact *contact, const QString &file, const unsigned long size, const QString &recipient, FileTransferInfo::KopeteTransferDirection di)
Adds a file transfer to the Kopete::TransferManager.
Definition: kopetetransfermanager.cpp:356
bool showMessage(QString text) const
something interesting happened; not an error / void slotInfo( int type, const QString &text ); ...
Definition: kopetetransfermanager.cpp:295
unsigned int transferId() const
Definition: kopetetransfermanager.h:53
void setPlainBody(const QString &body)
Sets the body of the message.
Definition: kopetemessage.cpp:233
Transfer(const FileTransferInfo &, const QString &localFile, bool showProgressInfo=true)
Constructor.
Definition: kopetetransfermanager.cpp:90
Definition: kopetecontact.h:58
void slotError(int error, const QString &errorText)
Inform the job that an error has occurred while transferring the file.
Definition: kopetetransfermanager.cpp:257
void slotCancelled()
transfer was cancelled (but not by our user)
Definition: kopetetransfermanager.cpp:283
KOPETE_EXPORT QWidget * mainWidget()
Returns the main widget - this is the widget that message boxes and KNotify stuff should use as a par...
Definition: kopeteuiglobal.cpp:37
static TransferManager * transferManager()
Retrieve the transfer manager instance.
Definition: kopetetransfermanager.cpp:346
FileTransferInfo()
Definition: kopetetransfermanager.cpp:43
KUrl sourceURL()
Retrieve a URL indicating where the file is being copied from.
Definition: kopetetransfermanager.cpp:189
MetaContact * metaContact() const
Get the metacontact for this contact.
Definition: kopetecontact.cpp:483
Creates and manages kopete file transfers.
Definition: kopetetransfermanager.h:79
const Contact * myself() const
Get the local user in the session.
Definition: kopetechatsession.cpp:215
KopeteTransferDirection
Definition: kopetetransfermanager.h:46
void saveIncomingTransfer(unsigned int id)
Shows save file dialog and accepts/rejects incoming file transfer request.
Definition: kopetetransfermanager.cpp:414
Definition: kopetecontact.h:283
void setFilePreview(const QPixmap &preview)
Set file preview icon for file transfer.
Definition: kopetemessage.cpp:696
static const int TransferRateWindowLength
Definition: kopetetransfermanager.cpp:68
void emitCopying(const KUrl &src, const KUrl &dest)
Definition: kopetetransfermanager.cpp:205
const FileTransferInfo & info() const
Get the info for this file transfer.
Definition: kopetetransfermanager.cpp:137
unsigned int askIncomingTransfer(Contact *contact, const QString &file, const unsigned long size, const QString &description=QString(), QString internalId=QString(), const QPixmap &preview=QPixmap())
Adds incoming file transfer request to the Kopete::TransferManager.
Definition: kopetetransfermanager.cpp:372
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:53:51 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:53:51 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.