#ifndef _USERFILEDLG_H_ #define _USERFILEDLG_H_ #include "filetree.h" #include "util.h" #include #include class UserFileDlg : public QDialog { Q_OBJECT public: UserFileDlg( const QString& user, QWidget* parent = 0, const char* name = 0 ) : QDialog( parent, name ) { setCaption("Files at " + user); QGridLayout *layout = new QGridLayout(this); this->userName = user; this->tree = new FileTree( this, "User file dlg",false ); layout->addWidget(this->tree,0,0); // connect( this, SIGNAL(done(int)), // this, SLOT(killed(int))); connect( tree, SIGNAL(downloadFile(const QString&, const QString&, const QString&, unsigned long int)), this, SIGNAL(downloadFile(const QString&, const QString&, const QString&, unsigned long int)) ); resize(300,200); } QString getUserName(){ return userName; } public slots: void addFile( const QString& fileName, const QString& size ) { tree->addItemToTree( userName, fileName, size, "n/a" ); } void killed(int r){ emit killed( userName ); } signals: void killed( const QString& user ); void downloadFile( const QString& nick, const QString& file, const QString&,unsigned long int size ); private: FileTree* tree; QString userName; }; #endif /* * * $Log: userfiledlg.h,v $ * Revision 1.3 2003/08/20 15:56:26 estrato * Minor changes to transfer widget, fixed a bug with downloads from user file list. * * Revision 1.2 2003/08/18 12:19:43 estrato * Old transfer dialog now completely replaced, but some functionality is gone. Will add complete functionality in next commit. * * Revision 1.1.1.1 2003/06/24 10:16:17 olof * remake of cvs tree * * Revision 1.5 2003/06/16 12:18:12 olof * loads * * Revision 1.4 2003/06/11 22:14:21 olof * transfers ok again * * Revision 1.3 2003/05/07 00:11:54 olof * massa mandelmassa * * Revision 1.2 2003/04/16 20:54:47 olof * user file list fixed * * Revision 1.1 2003/03/18 14:28:40 mickeg * Think this works. Don't know if we hadle dctc commands correctly * when receiving list results * * */