Switch to unified view

a/src/qtgui/advsearch_w.cpp b/src/qtgui/advsearch_w.cpp
1
#ifndef lint
1
#ifndef lint
2
static char rcsid[] = "@(#$Id: advsearch_w.cpp,v 1.17 2007-02-19 16:10:00 dockes Exp $ (C) 2005 J.F.Dockes";
2
static char rcsid[] = "@(#$Id: advsearch_w.cpp,v 1.18 2007-08-31 09:04:23 dockes Exp $ (C) 2005 J.F.Dockes";
3
#endif
3
#endif
4
/*
4
/*
5
 *   This program is free software; you can redistribute it and/or modify
5
 *   This program is free software; you can redistribute it and/or modify
6
 *   it under the terms of the GNU General Public License as published by
6
 *   it under the terms of the GNU General Public License as published by
7
 *   the Free Software Foundation; either version 2 of the License, or
7
 *   the Free Software Foundation; either version 2 of the License, or
...
...
66
66
67
void AdvSearch::init()
67
void AdvSearch::init()
68
{
68
{
69
    // signals and slots connections
69
    // signals and slots connections
70
    connect(delFiltypPB, SIGNAL(clicked()), this, SLOT(delFiltypPB_clicked()));
70
    connect(delFiltypPB, SIGNAL(clicked()), this, SLOT(delFiltypPB_clicked()));
71
    connect(searchPB, SIGNAL(clicked()), this, SLOT(searchPB_clicked()));
71
    connect(searchPB, SIGNAL(clicked()), this, SLOT(runSearch()));
72
    connect(restrictFtCB, SIGNAL(toggled(bool)), 
72
    connect(restrictFtCB, SIGNAL(toggled(bool)), 
73
        this, SLOT(restrictFtCB_toggled(bool)));
73
        this, SLOT(restrictFtCB_toggled(bool)));
74
    connect(restrictCtCB, SIGNAL(toggled(bool)), 
74
    connect(restrictCtCB, SIGNAL(toggled(bool)), 
75
        this, SLOT(restrictCtCB_toggled(bool)));
75
        this, SLOT(restrictCtCB_toggled(bool)));
76
    connect(dismissPB, SIGNAL(clicked()), this, SLOT(close()));
76
    connect(dismissPB, SIGNAL(clicked()), this, SLOT(close()));
77
    connect(browsePB, SIGNAL(clicked()), this, SLOT(browsePB_clicked()));
77
    connect(browsePB, SIGNAL(clicked()), this, SLOT(browsePB_clicked()));
78
    connect(addFiltypPB, SIGNAL(clicked()), this, SLOT(addFiltypPB_clicked()));
78
    connect(addFiltypPB, SIGNAL(clicked()), this, SLOT(addFiltypPB_clicked()));
79
79
80
    connect(subtreeCMB->lineEdit(), SIGNAL(returnPressed()), 
81
      this, SLOT(searchPB_clicked()));
82
    connect(delAFiltypPB, SIGNAL(clicked()), 
80
    connect(delAFiltypPB, SIGNAL(clicked()), 
83
        this, SLOT(delAFiltypPB_clicked()));
81
        this, SLOT(delAFiltypPB_clicked()));
84
    connect(addAFiltypPB, SIGNAL(clicked()), 
82
    connect(addAFiltypPB, SIGNAL(clicked()), 
85
        this, SLOT(addAFiltypPB_clicked()));
83
        this, SLOT(addAFiltypPB_clicked()));
86
    connect(saveFileTypesPB, SIGNAL(clicked()), 
84
    connect(saveFileTypesPB, SIGNAL(clicked()), 
...
...
186
184
187
void AdvSearch::addClause(int tp)
185
void AdvSearch::addClause(int tp)
188
{
186
{
189
    SearchClauseW *w = new SearchClauseW(clauseFRM);
187
    SearchClauseW *w = new SearchClauseW(clauseFRM);
190
    m_clauseWins.push_back(w);
188
    m_clauseWins.push_back(w);
191
    connect(w->wordsLE, SIGNAL(returnPressed()),
192
      this, SLOT(searchPB_clicked()));
193
    ((QVBoxLayout *)(clauseFRM->layout()))->addWidget(w);
189
    ((QVBoxLayout *)(clauseFRM->layout()))->addWidget(w);
194
    w->show();
190
    w->show();
195
    w->tpChange(tp);
191
    w->tpChange(tp);
196
    if (m_clauseWins.size() > iclausescnt) {
192
    if (m_clauseWins.size() > iclausescnt) {
197
    delClausePB->setEnabled(true);
193
    delClausePB->setEnabled(true);
...
...
352
    prefs.fileTypesByCats = m_ignByCats;
348
    prefs.fileTypesByCats = m_ignByCats;
353
    rwSettings(true);
349
    rwSettings(true);
354
}
350
}
355
351
356
using namespace Rcl;
352
using namespace Rcl;
357
void AdvSearch::searchPB_clicked()
353
void AdvSearch::runSearch()
358
{
354
{
359
    RefCntr<SearchData> sdata(new SearchData(conjunctCMB->currentItem() == 0 ?
355
    RefCntr<SearchData> sdata(new SearchData(conjunctCMB->currentItem() == 0 ?
360
                         SCLT_AND : SCLT_OR));
356
                         SCLT_AND : SCLT_OR));
361
    bool hasnotnot = false;
357
    bool hasnotnot = false;
362
    bool hasnot = false;
358
    bool hasnot = false;