mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-21 12:28:26 -04:00
fix the history problem with SearchDialog
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1221 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
fc9ed005bf
commit
5a5ad509aa
2 changed files with 512 additions and 495 deletions
|
@ -91,26 +91,23 @@ SearchDialog::SearchDialog(QWidget *parent)
|
||||||
/* initialise the filetypes mapping */
|
/* initialise the filetypes mapping */
|
||||||
if (!SearchDialog::initialised)
|
if (!SearchDialog::initialised)
|
||||||
{
|
{
|
||||||
initialiseFileTypeMappings();
|
initialiseFileTypeMappings();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Advanced search panel specifica */
|
/* Advanced search panel specifica */
|
||||||
RshareSettings rsharesettings;
|
RshareSettings rsharesettings;
|
||||||
QString key (UI_PREF_ADVANCED_SEARCH);
|
QString key (UI_PREF_ADVANCED_SEARCH);
|
||||||
bool useAdvanced = rsharesettings.value(key, QVariant(false)).toBool();
|
bool useAdvanced = rsharesettings.value(key, QVariant(false)).toBool();
|
||||||
/*if (useAdvanced)
|
if (useAdvanced)
|
||||||
{
|
{
|
||||||
ui.toggleAdvancedSearchBtn->setChecked(true);
|
ui.toggleAdvancedSearchBtn->setChecked(true);
|
||||||
ui.SimpleSearchPanel->hide();
|
ui.SimpleSearchPanel->hide();
|
||||||
} else {
|
} else {
|
||||||
ui.AdvancedSearchPanel->hide();
|
ui.AdvancedSearchPanel->hide();
|
||||||
}*/
|
}
|
||||||
|
|
||||||
//connect(ui.toggleAdvancedSearchBtn, SIGNAL(toggled(bool)), this, SLOT(toggleAdvancedSearchDialog(bool)));
|
connect(ui.toggleAdvancedSearchBtn, SIGNAL(toggled(bool)), this, SLOT(toggleAdvancedSearchDialog(bool)));
|
||||||
//connect(ui.focusAdvSearchDialogBtn, SIGNAL(clicked()), this, SLOT(showAdvSearchDialog()));
|
connect(ui.focusAdvSearchDialogBtn, SIGNAL(clicked()), this, SLOT(showAdvSearchDialog()));
|
||||||
connect(ui.toggleAdvancedSearchBtn, SIGNAL(clicked()), this, SLOT(showAdvSearchDialog()));
|
|
||||||
connect(ui.cloaseallsearchresultsButton, SIGNAL(clicked()), this, SLOT(searchRemoveAll()));
|
|
||||||
connect(ui.resetButton, SIGNAL(clicked()), this, SLOT(clearKeyword()));
|
|
||||||
|
|
||||||
/* End Advanced Search Panel specifics */
|
/* End Advanced Search Panel specifics */
|
||||||
|
|
||||||
|
@ -132,8 +129,6 @@ SearchDialog::SearchDialog(QWidget *parent)
|
||||||
connect ( ui.searchSummaryWidget, SIGNAL( currentItemChanged ( QTreeWidgetItem *, QTreeWidgetItem * ) ),
|
connect ( ui.searchSummaryWidget, SIGNAL( currentItemChanged ( QTreeWidgetItem *, QTreeWidgetItem * ) ),
|
||||||
this, SLOT( selectSearchResults( void ) ) );
|
this, SLOT( selectSearchResults( void ) ) );
|
||||||
|
|
||||||
connect( ui.searchResultWidget, SIGNAL( itemDoubleClicked ( QTreeWidgetItem *, int)), this, SLOT(download()));
|
|
||||||
|
|
||||||
|
|
||||||
/* hide the Tree +/- */
|
/* hide the Tree +/- */
|
||||||
ui.searchResultWidget -> setRootIsDecorated( false );
|
ui.searchResultWidget -> setRootIsDecorated( false );
|
||||||
|
@ -154,8 +149,8 @@ SearchDialog::SearchDialog(QWidget *parent)
|
||||||
_smheader->setResizeMode (2, QHeaderView::Interactive);
|
_smheader->setResizeMode (2, QHeaderView::Interactive);
|
||||||
|
|
||||||
_smheader->resizeSection ( 0, 80 );
|
_smheader->resizeSection ( 0, 80 );
|
||||||
_smheader->resizeSection ( 1, 60 );
|
_smheader->resizeSection ( 1, 75 );
|
||||||
_smheader->resizeSection ( 2, 30 );
|
_smheader->resizeSection ( 2, 75 );
|
||||||
|
|
||||||
ui.searchResultWidget->setColumnCount(6);
|
ui.searchResultWidget->setColumnCount(6);
|
||||||
_smheader = ui.searchResultWidget->header () ;
|
_smheader = ui.searchResultWidget->header () ;
|
||||||
|
@ -173,11 +168,11 @@ SearchDialog::SearchDialog(QWidget *parent)
|
||||||
|
|
||||||
|
|
||||||
// set header text aligment
|
// set header text aligment
|
||||||
QTreeWidgetItem * headerItem = ui.searchResultWidget->headerItem();
|
QTreeWidgetItem * headerItem = ui.searchResultWidget->headerItem();
|
||||||
headerItem->setTextAlignment(2, Qt::AlignRight | Qt::AlignRight);
|
headerItem->setTextAlignment(2, Qt::AlignRight | Qt::AlignRight);
|
||||||
headerItem->setTextAlignment(3, Qt::AlignRight | Qt::AlignRight);
|
headerItem->setTextAlignment(3, Qt::AlignRight | Qt::AlignRight);
|
||||||
|
|
||||||
ui.searchResultWidget->sortItems(SR_NAME_COL, Qt::AscendingOrder);
|
ui.searchResultWidget->sortItems(SR_NAME_COL, Qt::AscendingOrder);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -372,7 +367,6 @@ void SearchDialog::searchRemoveAll()
|
||||||
nextSearchId = 1;
|
nextSearchId = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
<<<<<<< HEAD:retroshare-gui/src/gui/SearchDialog.cpp
|
|
||||||
/** clear keywords and ComboBox **/
|
/** clear keywords and ComboBox **/
|
||||||
void SearchDialog::clearKeyword()
|
void SearchDialog::clearKeyword()
|
||||||
{
|
{
|
||||||
|
@ -381,16 +375,6 @@ void SearchDialog::clearKeyword()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
=======
|
|
||||||
/** clear keywords **/
|
|
||||||
void SearchDialog::clearKeyword()
|
|
||||||
{
|
|
||||||
ui.lineEdit->clear();
|
|
||||||
ui.FileTypeComboBox->setCurrentIndex(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
>>>>>>> c9de750...
|
|
||||||
* Rolled back Modifications to SearchDialog and PopupChatDialog.:retroshare-gui/src/gui/SearchDialog.cpp
|
|
||||||
/* *****************************************************************
|
/* *****************************************************************
|
||||||
Advanced search implementation
|
Advanced search implementation
|
||||||
*******************************************************************/
|
*******************************************************************/
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue