added conjunction choice in advsearch
This commit is contained in:
parent
9c68941431
commit
4dff7f2614
@ -74,12 +74,25 @@
|
||||
<number>7</number>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Search for files<br>having all of:</string>
|
||||
<string>Search for <br>documents<br>satisfying:</string>
|
||||
</property>
|
||||
<property name="toolTip" stdset="0">
|
||||
<string>All non blank fields will be combined with AND conjunctions. <br>All fields except "exact phrase" can accept a mix of simple words, and phrases enclosed in double quotes.<br>There are two <em>Any of these</em> fields so you can search for things like: <br><em>(apple OR pear) AND (green OR sour)</em></string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QComboBox">
|
||||
<property name="name">
|
||||
<cstring>conjunctCMB</cstring>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy>
|
||||
<hsizetype>7</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<horstretch>8</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
<spacer>
|
||||
<property name="name">
|
||||
<cstring>spacer2</cstring>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#ifndef lint
|
||||
static char rcsid[] = "@(#$Id: advsearch_w.cpp,v 1.8 2006-11-14 17:41:12 dockes Exp $ (C) 2005 J.F.Dockes";
|
||||
static char rcsid[] = "@(#$Id: advsearch_w.cpp,v 1.9 2006-11-14 17:56:40 dockes Exp $ (C) 2005 J.F.Dockes";
|
||||
#endif
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -70,6 +70,9 @@ void AdvSearch::init()
|
||||
this, SLOT(saveFileTypes()));
|
||||
connect(addClausePB, SIGNAL(clicked()), this, SLOT(addClause()));
|
||||
|
||||
conjunctCMB->insertItem(tr("All clauses"));
|
||||
conjunctCMB->insertItem(tr("Any clause"));
|
||||
|
||||
// Create preconfigured clauses
|
||||
andWords = new SearchClauseW(this);
|
||||
andWords->tpChange(1);
|
||||
@ -214,7 +217,8 @@ void AdvSearch::restrictFtCB_toggled(bool on)
|
||||
using namespace Rcl;
|
||||
void AdvSearch::searchPB_clicked()
|
||||
{
|
||||
RefCntr<SearchData> sdata(new SearchData(SCLT_AND));
|
||||
RefCntr<SearchData> sdata(new SearchData(conjunctCMB->currentItem() == 0 ?
|
||||
SCLT_AND : SCLT_OR));
|
||||
bool hasnotnot = false;
|
||||
bool hasnot = false;
|
||||
SearchDataClause *cl;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user