mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-17 10:27:13 -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 */
|
/* 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 */
|
||||||
|
|
||||||
@ -144,8 +147,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, 75 );
|
_smheader->resizeSection ( 1, 60 );
|
||||||
_smheader->resizeSection ( 2, 75 );
|
_smheader->resizeSection ( 2, 30 );
|
||||||
|
|
||||||
ui.searchResultWidget->setColumnCount(6);
|
ui.searchResultWidget->setColumnCount(6);
|
||||||
_smheader = ui.searchResultWidget->header () ;
|
_smheader = ui.searchResultWidget->header () ;
|
||||||
@ -362,6 +365,12 @@ void SearchDialog::searchRemoveAll()
|
|||||||
nextSearchId = 1;
|
nextSearchId = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** clear keywords **/
|
||||||
|
void SearchDialog::clearKeyword()
|
||||||
|
{
|
||||||
|
ui.lineEdit->clear();
|
||||||
|
}
|
||||||
|
|
||||||
/* *****************************************************************
|
/* *****************************************************************
|
||||||
Advanced search implementation
|
Advanced search implementation
|
||||||
*******************************************************************/
|
*******************************************************************/
|
||||||
|
@ -66,6 +66,9 @@ private slots:
|
|||||||
void searchRemoveAll();
|
void searchRemoveAll();
|
||||||
|
|
||||||
void searchKeywords();
|
void searchKeywords();
|
||||||
|
|
||||||
|
void clearKeyword();
|
||||||
|
|
||||||
|
|
||||||
/** management of the adv search dialog object when switching search modes */
|
/** management of the adv search dialog object when switching search modes */
|
||||||
void toggleAdvancedSearchDialog(bool);
|
void toggleAdvancedSearchDialog(bool);
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user