mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-02 03:16:18 -05:00
redesign the Search Dialog
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1177 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
6f59bd806b
commit
626074d3f8
@ -91,23 +91,26 @@ SearchDialog::SearchDialog(QWidget *parent)
|
||||
/* initialise the filetypes mapping */
|
||||
if (!SearchDialog::initialised)
|
||||
{
|
||||
initialiseFileTypeMappings();
|
||||
initialiseFileTypeMappings();
|
||||
}
|
||||
|
||||
/* Advanced search panel specifica */
|
||||
RshareSettings rsharesettings;
|
||||
QString key (UI_PREF_ADVANCED_SEARCH);
|
||||
bool useAdvanced = rsharesettings.value(key, QVariant(false)).toBool();
|
||||
if (useAdvanced)
|
||||
/*if (useAdvanced)
|
||||
{
|
||||
ui.toggleAdvancedSearchBtn->setChecked(true);
|
||||
ui.SimpleSearchPanel->hide();
|
||||
} else {
|
||||
ui.AdvancedSearchPanel->hide();
|
||||
}
|
||||
}*/
|
||||
|
||||
connect(ui.toggleAdvancedSearchBtn, SIGNAL(toggled(bool)), this, SLOT(toggleAdvancedSearchDialog(bool)));
|
||||
connect(ui.focusAdvSearchDialogBtn, SIGNAL(clicked()), this, SLOT(showAdvSearchDialog()));
|
||||
//connect(ui.toggleAdvancedSearchBtn, SIGNAL(toggled(bool)), this, SLOT(toggleAdvancedSearchDialog(bool)));
|
||||
//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 */
|
||||
|
||||
@ -144,8 +147,8 @@ SearchDialog::SearchDialog(QWidget *parent)
|
||||
_smheader->setResizeMode (2, QHeaderView::Interactive);
|
||||
|
||||
_smheader->resizeSection ( 0, 80 );
|
||||
_smheader->resizeSection ( 1, 75 );
|
||||
_smheader->resizeSection ( 2, 75 );
|
||||
_smheader->resizeSection ( 1, 60 );
|
||||
_smheader->resizeSection ( 2, 30 );
|
||||
|
||||
ui.searchResultWidget->setColumnCount(6);
|
||||
_smheader = ui.searchResultWidget->header () ;
|
||||
@ -362,6 +365,12 @@ void SearchDialog::searchRemoveAll()
|
||||
nextSearchId = 1;
|
||||
}
|
||||
|
||||
/** clear keywords **/
|
||||
void SearchDialog::clearKeyword()
|
||||
{
|
||||
ui.lineEdit->clear();
|
||||
}
|
||||
|
||||
/* *****************************************************************
|
||||
Advanced search implementation
|
||||
*******************************************************************/
|
||||
|
@ -67,6 +67,9 @@ private slots:
|
||||
|
||||
void searchKeywords();
|
||||
|
||||
void clearKeyword();
|
||||
|
||||
|
||||
/** management of the adv search dialog object when switching search modes */
|
||||
void toggleAdvancedSearchDialog(bool);
|
||||
void hideEvent(QHideEvent * event);
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user