#ifndef _SEARCHDLG_H_ #define _SEARCHDLG_H_ #include #include #include #include #include #include using namespace std; class FileTree; class SearchWdgt; class SearchDlg : public QDialog { Q_OBJECT protected: virtual void closeEvent(QCloseEvent * e); public: /*! Fires up the dialog and creates the ListViews and search thingis \param parent Parent widget \param name Name of widget */ SearchDlg( QWidget* parent = 0, const char* name = 0 ); /// Returns true if the users last search was a multihub one. bool isMultiSearch() {return multiSearch;} public slots: /*! Adds a file to the two listviews \param user Nick if the user \param file File name \param size File size \param slot The free and total slots of the user */ void addSearchResult( const QString& user, const QString& file, const QString& size, const QString& slot ); /*! Slot for performing a new search */ void newSearch(const QString&, bool); /*! Slot for downloading a file when the user doubleclicks a file \param item The ListViewItem that contains the file we want to download */ void downloadFile( QListViewItem* item); /*! Slot for downloading when user has pressed download in the menu */ void downloadFile(); /*! Slot for downloading a whole directory */ void downloadDirectory(); /*! Slot for downloading file to non-default location */ void downloadFileTo(); /*! Slot for downloading a whole directory to non-default location */ void downloadDirectoryTo(); /*! When the user presses the right mouse button to display the popupmenu \param item The list view item clicked \param p The point on the screen the user clicked \param column The column in the list the user clicked */ void dispMenu( QListViewItem* item, const QPoint& p, int column ); /*! To download a users files */ void getUserFiles(); signals: /*! Signal emitted when the user wants to download a file \param nick User that shares this file \param file File name \param localName The name of the saved file \param size Size of file in bytes */ void downloadFile( const QString& nick, const QString& file, const QString& localName, unsigned long int size ); /*! Signal for performing a search in the hub this search Dialog belongs to \param searchStr Tring to search for \parma type File type */ void search( const QString&, bool ); /*! Signal emitted when the user wants to download the users filelist \param user The user we want to download from */ void getUserFiles( const QString& user ); private: QTabWidget* tabs; FileTree* tree; QListView* fileList; SearchWdgt *searchWdgt; QPopupMenu* menu; bool multiSearch; }; #endif /* * * $Log: searchdlg.h,v $ * Revision 1.8 2004/02/26 12:36:11 estrato * resuming aborted downloads, saving window pos and size * * Revision 1.7 2004/02/23 20:37:09 olof * Userinfo popup * * Revision 1.6 2004/02/18 07:58:42 estrato * download to dir, resume download, bugfixes * * Revision 1.5 2003/08/22 16:45:20 olof * hola * * Revision 1.4 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.3 2003/07/29 17:47:00 olof * stuff * * Revision 1.2 2003/06/24 17:00:06 olof * multischeiss * * Revision 1.1.1.1 2003/06/24 10:16:18 olof * remake of cvs tree * * Revision 1.6 2003/06/16 19:48:25 olof * multihub search and password * * 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/03/16 21:00:49 mickeg * Added functionality for the tree view of the search results * Still some bugs * Doesn't iterate through the children accurately * * Revision 1.1 2003/03/04 22:10:41 olof * dcqt2 creation * * Revision 1.4 2003/02/23 16:54:49 ribj4077 * Added some features * * Revision 1.3 2003/02/18 15:47:33 migr8915 * Bastard rightclick signal not working * Should be able to download by doubleclicking item * * */