mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-03 14:45:12 -04:00
-add support for searching and display directories
-downloading directories from search dialog not implemented yet -needs more code clean and beautify the directory tree git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1566 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
1292a69ccf
commit
10d44a15b8
13 changed files with 564 additions and 431 deletions
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
****************************************************************/
|
||||
|
||||
|
@ -35,38 +35,38 @@
|
|||
#include "advsearch/advancedsearchdialog.h"
|
||||
#include "Preferences/rsharesettings.h"
|
||||
|
||||
class SearchDialog : public MainPage
|
||||
class SearchDialog : public MainPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
||||
public:
|
||||
/** Default Constructor */
|
||||
SearchDialog(QWidget *parent = 0);
|
||||
/** Default Destructor */
|
||||
|
||||
|
||||
|
||||
|
||||
public slots:
|
||||
void updateFiles(qulonglong request_id,FileDetail file) ;
|
||||
|
||||
private slots:
|
||||
|
||||
|
||||
/** Create the context popup menu and it's submenus */
|
||||
void searchtableWidgetCostumPopupMenu( QPoint point );
|
||||
|
||||
|
||||
void searchtableWidget2CostumPopupMenu( QPoint point );
|
||||
|
||||
|
||||
void download();
|
||||
|
||||
|
||||
void broadcastonchannel();
|
||||
|
||||
|
||||
void recommendtofriends();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void searchRemove();
|
||||
|
||||
|
||||
void searchRemoveAll();
|
||||
|
||||
|
||||
void searchKeywords();
|
||||
|
||||
/** management of the adv search dialog object when switching search modes */
|
||||
|
@ -80,32 +80,34 @@ private slots:
|
|||
void advancedSearch(Expression*);
|
||||
|
||||
void selectSearchResults();
|
||||
|
||||
|
||||
void clearKeyword();
|
||||
|
||||
|
||||
|
||||
private:
|
||||
/** render the results to the tree widget display */
|
||||
void resultsToTree(std::string,qulonglong searchId, const std::list<FileDetail>&);
|
||||
void resultsToTree(std::string,qulonglong searchId, const std::list<DirDetails>&);
|
||||
void insertFile(const std::string& txt,qulonglong searchId, const FileDetail& file) ;
|
||||
void insertDirectory(const std::string &txt, qulonglong searchId, const DirDetails &dir, QTreeWidgetItem *item);
|
||||
void setIconAndType(QTreeWidgetItem *item, QString &ext);
|
||||
|
||||
|
||||
/** the advanced search dialog instance */
|
||||
AdvancedSearchDialog * advSearchDialog;
|
||||
|
||||
|
||||
/** Define the popup menus for the Context menu */
|
||||
QMenu* contextMnu;
|
||||
|
||||
|
||||
QMenu* contextMnu2;
|
||||
|
||||
|
||||
/** Defines the actions for the context menu */
|
||||
QAction* downloadAct;
|
||||
QAction* broadcastonchannelAct;
|
||||
QAction* recommendtofriendsAct;
|
||||
|
||||
|
||||
QAction* searchRemoveAct;
|
||||
QAction* searchRemoveAllAct;
|
||||
|
||||
|
||||
/** Contains the mapping of filetype combobox to filetype extensions */
|
||||
static const int FILETYPE_IDX_ANY;
|
||||
static const int FILETYPE_IDX_ARCHIVE;
|
||||
|
@ -115,19 +117,20 @@ private:
|
|||
static const int FILETYPE_IDX_PICTURE;
|
||||
static const int FILETYPE_IDX_PROGRAM;
|
||||
static const int FILETYPE_IDX_VIDEO;
|
||||
static const int FILETYPE_IDX_DIRECTORY;
|
||||
|
||||
|
||||
|
||||
static QMap<int, QString> * FileTypeExtensionMap;
|
||||
static bool initialised;
|
||||
void initialiseFileTypeMappings();
|
||||
|
||||
|
||||
/****
|
||||
QTreeWidget *searchtableWidget;
|
||||
QTreeWidget *searchtablewidget2;
|
||||
****/
|
||||
|
||||
|
||||
int nextSearchId;
|
||||
|
||||
|
||||
/** Qt Designer generated object */
|
||||
Ui::SearchDialog ui;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue