From 31d0e3438e5e13522b93f0e9a588f7c48191435d Mon Sep 17 00:00:00 2001 From: csoler Date: Sat, 26 Jan 2013 14:03:30 +0000 Subject: [PATCH] moved search tab into transfers. Simplified the layout (but kept all buttons) git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-ImprovedGUI@6093 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/MainWindow.cpp | 21 +- retroshare-gui/src/gui/MainWindow.h | 2 +- retroshare-gui/src/gui/SearchDialog.ui | 512 +++++++++------------ retroshare-gui/src/gui/TransfersDialog.cpp | 3 + retroshare-gui/src/gui/TransfersDialog.h | 3 + retroshare-gui/src/main.cpp | 2 +- 6 files changed, 234 insertions(+), 309 deletions(-) diff --git a/retroshare-gui/src/gui/MainWindow.cpp b/retroshare-gui/src/gui/MainWindow.cpp index a4f67af9e..1c8fcc1d1 100644 --- a/retroshare-gui/src/gui/MainWindow.cpp +++ b/retroshare-gui/src/gui/MainWindow.cpp @@ -120,7 +120,6 @@ /* Images for toolbar icons */ #define IMAGE_NETWORK2 ":/images/rs1.png" #define IMAGE_PEERS ":/images/groupchat.png" -#define IMAGE_SEARCH ":/images/filefind.png" #define IMAGE_TRANSFERS ":/images/ktorrent32.png" #define IMAGE_FILES ":/images/fileshare32.png" #define IMAGE_CHANNELS ":/images/channels.png" @@ -245,8 +244,8 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags) action = createPageAction(QIcon(IMAGE_PEERS), tr("Friends"), grp)); notify.push_back(QPair(friendsDialog, action)); - ui->stackPages->add(searchDialog = new SearchDialog(ui->stackPages), - createPageAction(QIcon(IMAGE_SEARCH), tr("Search"), grp)); +// ui->stackPages->add(searchDialog = new SearchDialog(ui->stackPages), +// createPageAction(QIcon(IMAGE_SEARCH), tr("Search"), grp)); ui->stackPages->add(transfersDialog = new TransfersDialog(ui->stackPages), action = createPageAction(QIcon(IMAGE_TRANSFERS), tr("Transfers"), grp)); @@ -791,9 +790,9 @@ void SetForegroundWindowInternal(HWND hWnd) case Friends: Page = _instance->friendsDialog; break; - case Search: - Page = _instance->searchDialog; - break; +// case Search: +// Page = _instance->searchDialog; +// break; case Transfers: Page = _instance->transfersDialog; break; @@ -840,9 +839,9 @@ void SetForegroundWindowInternal(HWND hWnd) if (page == _instance->friendsDialog) { return Friends; } - if (page == _instance->searchDialog) { - return Search; - } +// if (page == _instance->searchDialog) { +// return Search; +// } if (page == _instance->transfersDialog) { return Transfers; } @@ -884,8 +883,8 @@ void SetForegroundWindowInternal(HWND hWnd) return _instance->networkDialog; case Friends: return _instance->friendsDialog; - case Search: - return _instance->searchDialog; +// case Search: +// return _instance->searchDialog; case Transfers: return _instance->transfersDialog; case SharedDirectories: diff --git a/retroshare-gui/src/gui/MainWindow.h b/retroshare-gui/src/gui/MainWindow.h index e4d533fc5..682053178 100644 --- a/retroshare-gui/src/gui/MainWindow.h +++ b/retroshare-gui/src/gui/MainWindow.h @@ -119,7 +119,7 @@ public: NetworkDialog *networkDialog; FriendsDialog *friendsDialog; - SearchDialog *searchDialog; +// SearchDialog *searchDialog; TransfersDialog *transfersDialog; MessagesDialog *messagesDialog; SharedFilesDialog *sharedfilesDialog; diff --git a/retroshare-gui/src/gui/SearchDialog.ui b/retroshare-gui/src/gui/SearchDialog.ui index 6bc3b78bb..094eb33ed 100644 --- a/retroshare-gui/src/gui/SearchDialog.ui +++ b/retroshare-gui/src/gui/SearchDialog.ui @@ -6,8 +6,8 @@ 0 0 - 581 - 331 + 758 + 339 @@ -16,14 +16,8 @@ 1 - - - 6 - - - 0 - - + + @@ -41,107 +35,6 @@ 2 - - - - - Any - - - - :/images/FileTypeAny.png:/images/FileTypeAny.png - - - - - Archive - - - - :/images/FileTypeArchive.png:/images/FileTypeArchive.png - - - - - Audio - - - - :/images/FileTypeAudio.png:/images/FileTypeAudio.png - - - - - CD-Image - - - - :/images/FileTypeCDImage.png:/images/FileTypeCDImage.png - - - - - Document - - - - :/images/FileTypeDocument.png:/images/FileTypeDocument.png - - - - - Picture - - - - :/images/FileTypePicture.png:/images/FileTypePicture.png - - - - - Program - - - - :/images/FileTypeProgram.png:/images/FileTypeProgram.png - - - - - Video - - - - :/images/FileTypeVideo.png:/images/FileTypeVideo.png - - - - - Directory - - - - :/images/folder16.png:/images/folder16.png - - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 13 - 20 - - - - @@ -196,22 +89,6 @@ - - - - Qt::Horizontal - - - QSizePolicy::Minimum - - - - 50 - 20 - - - - @@ -222,17 +99,70 @@ + + + + Search inside "browsable" files of your friends + + + Browsable files + + + true + + + + + + + Multi-hop search at distance 6 in the network +(always reports available files) + + + Distant + + + true + + + + + + + + 0 + 0 + + + + Include files from your own file list in the search result + + + Own files + + + + + + + Close all Search Results + + + Clear + + + - + Qt::Horizontal - + 0 1 @@ -279,9 +209,9 @@ - - - + + + @@ -338,175 +268,165 @@ - - - - Filter Search Result - - + + + + + + Filter: + + + + + + + Filter Search Result + + + + + + + Max results: + + + + + + + + + + 100 + + + 5000 + + + 100 + + + 1000 + + + + + + + + Any + + + + :/images/FileTypeAny.png:/images/FileTypeAny.png + + + + + Archive + + + + :/images/FileTypeArchive.png:/images/FileTypeArchive.png + + + + + Audio + + + + :/images/FileTypeAudio.png:/images/FileTypeAudio.png + + + + + CD-Image + + + + :/images/FileTypeCDImage.png:/images/FileTypeCDImage.png + + + + + Document + + + + :/images/FileTypeDocument.png:/images/FileTypeDocument.png + + + + + Picture + + + + :/images/FileTypePicture.png:/images/FileTypePicture.png + + + + + Program + + + + :/images/FileTypeProgram.png:/images/FileTypeProgram.png + + + + + Video + + + + :/images/FileTypeVideo.png:/images/FileTypeVideo.png + + + + + Directory + + + + :/images/folder16.png:/images/folder16.png + + + + + + + + + 120 + 0 + + + + + 16777215 + 26 + + + + Download Selected + + + Download selected + + + + :/images/download16.png:/images/download16.png + + + + - - - - Close all Search Results - - - Close All Search Results - - - - - - - Qt::Horizontal - - - - 29 - 17 - - - - - - - - - 120 - 0 - - - - - 16777215 - 26 - - - - Download Selected - - - Download - - - - :/images/download16.png:/images/download16.png - - - - - - - - 16777215 - 38 - - - - QFrame::Box - - - QFrame::Sunken - - - - 6 - - - 1 - - - 3 - - - - - - 0 - 0 - - - - Include files from your own file list in the search result - - - Include my files - - - - - - - Search inside "browsable" files of your friends - - - Search in friends lists - - - true - - - - - - - Multi-hop search at distance 6 in the network -(always reports available files) - - - F2F search - - - true - - - - - - - Limit number of results to : - - - - - - - - - - 100 - - - 5000 - - - 100 - - - 1000 - - - - - - - Qt::Horizontal - - - - 40 - 5 - - - - - - - diff --git a/retroshare-gui/src/gui/TransfersDialog.cpp b/retroshare-gui/src/gui/TransfersDialog.cpp index a8dea4ea4..240dc7779 100644 --- a/retroshare-gui/src/gui/TransfersDialog.cpp +++ b/retroshare-gui/src/gui/TransfersDialog.cpp @@ -44,6 +44,7 @@ #include "FileTransferInfoWidget.h" #include "TurtleRouterDialog.h" #include "TurtleRouterStatistics.h" +#include "SearchDialog.h" #include "xprogressbar.h" #include "settings/rsharesettings.h" #include "util/misc.h" @@ -81,6 +82,7 @@ #define IMAGE_PRIORITYNORMAL ":/images/prioritynormal.png" #define IMAGE_PRIORITYHIGH ":/images/priorityhigh.png" #define IMAGE_PRIORITYAUTO ":/images/priorityauto.png" +#define IMAGE_SEARCH ":/images/filefind.png" Q_DECLARE_METATYPE(FileProgressInfo) @@ -303,6 +305,7 @@ TransfersDialog::TransfersDialog(QWidget *parent) QObject::connect(ui.downloadList->selectionModel(),SIGNAL(selectionChanged (const QItemSelection&, const QItemSelection&)),this,SLOT(showFileDetails())) ; + ui.tabWidget->insertTab(0,searchDialog = new SearchDialog(), QIcon(IMAGE_SEARCH), tr("Search")) ; ui.tabWidget->addTab( new TurtleRouterStatistics(), tr("Router Statistics")) ; ui.tabWidget->addTab( new TurtleRouterDialog(), tr("Router Requests")) ; diff --git a/retroshare-gui/src/gui/TransfersDialog.h b/retroshare-gui/src/gui/TransfersDialog.h index 6c727caac..e74b3346c 100644 --- a/retroshare-gui/src/gui/TransfersDialog.h +++ b/retroshare-gui/src/gui/TransfersDialog.h @@ -36,6 +36,7 @@ class QStandardItemModel; class QStandardItem; class DetailsDialog; class FileProgressInfo; +class SearchDialog; class TransfersDialog : public RsAutoUpdatePage { @@ -54,6 +55,8 @@ public: static DetailsDialog *detailsdlg; + SearchDialog *searchDialog ; + public slots: void insertTransfers(); diff --git a/retroshare-gui/src/main.cpp b/retroshare-gui/src/main.cpp index d5578c160..4260f5411 100644 --- a/retroshare-gui/src/main.cpp +++ b/retroshare-gui/src/main.cpp @@ -322,7 +322,7 @@ int main(int argc, char *argv[]) qRegisterMetaType("FileDetail") ; std::cerr << "connecting signals and slots" << std::endl ; - QObject::connect(notify,SIGNAL(gotTurtleSearchResult(qulonglong,FileDetail)),w->searchDialog ,SLOT(updateFiles(qulonglong,FileDetail))) ; + QObject::connect(notify,SIGNAL(gotTurtleSearchResult(qulonglong,FileDetail)),w->transfersDialog->searchDialog ,SLOT(updateFiles(qulonglong,FileDetail))) ; QObject::connect(notify,SIGNAL(diskFull(int,int)) ,w ,SLOT(displayDiskSpaceWarning(int,int))) ; QObject::connect(notify,SIGNAL(filesPreModChanged(bool)) ,w->sharedfilesDialog ,SLOT(preModDirectories(bool) )) ; QObject::connect(notify,SIGNAL(filesPostModChanged(bool)) ,w->sharedfilesDialog ,SLOT(postModDirectories(bool) )) ;