~ubuntu-branches/ubuntu/trusty/bibletime/trusty

« back to all changes in this revision

Viewing changes to src/frontend/searchdialog/csearchdialog.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Marsden
  • Date: 2009-11-18 17:30:00 UTC
  • mfrom: (1.3.4 upstream) (5.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20091118173000-endkhjz5qai88tvr
Tags: 2.4-1
* New upstream version 2.4
* debian/control: 
  - Replace incorrect bibletime-data Depends on lib4qt-gui
    with bibletime Depends on libqtgui4 (>= 4.4.0). (Closes: #556209).
  - Add Build-depends: on zlib1g-dev and libcurl4-gnutls-dev 
    (Closes: #556805).

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
* The BibleTime source code is licensed under the GNU General Public License version 2.0.
7
7
*
8
8
**********/
9
 
#include "csearchdialog.h"
10
 
#include "btsearchoptionsarea.h"
11
 
#include "btsearchresultarea.h"
12
 
 
 
9
 
 
10
#include "frontend/searchdialog/csearchdialog.h"
 
11
 
 
12
#include <QDebug>
 
13
#include <QDialogButtonBox>
 
14
#include <QLineEdit>
 
15
#include <QPushButton>
 
16
#include <QSettings>
 
17
#include <QSizePolicy>
 
18
#include <QString>
 
19
#include <QRegExp>
 
20
#include <QVBoxLayout>
 
21
#include <QWidget>
 
22
 
 
23
#include "backend/config/cbtconfig.h"
13
24
#include "backend/cswordmodulesearch.h"
14
25
#include "backend/keys/cswordkey.h"
15
26
#include "backend/keys/cswordversekey.h"
16
 
#include "backend/config/cbtconfig.h"
17
 
 
18
27
#include "frontend/cmoduleindexdialog.h"
19
 
 
 
28
#include "frontend/searchdialog/btsearchoptionsarea.h"
 
29
#include "frontend/searchdialog/btsearchresultarea.h"
20
30
#include "util/cresmgr.h"
21
 
#include "util/ctoolclass.h"
22
 
#include "util/directoryutil.h"
 
31
#include "util/directory.h"
 
32
#include "util/dialogutil.h"
23
33
 
24
 
//Qt includes
25
 
#include <QString>
26
 
#include <QWidget>
27
 
#include <QMessageBox>
28
 
#include <QVBoxLayout>
29
 
#include <QLineEdit>
30
 
#include <QSettings>
31
 
#include <QDialogButtonBox>
32
 
#include <QPushButton>
33
 
#include <QSizePolicy>
34
 
#include <QDebug>
35
34
 
36
35
namespace Search {
37
36
 
38
37
static CSearchDialog* m_staticDialog = 0;
39
38
 
40
 
void CSearchDialog::openDialog(const QList<CSwordModuleInfo*> modules, const QString& searchText, QWidget* parentDialog)
41
 
{
42
 
        if (!m_staticDialog) {
43
 
                m_staticDialog = new CSearchDialog(parentDialog);
44
 
        };
45
 
        m_staticDialog->reset();
46
 
 
47
 
        if (modules.count()) {
48
 
                m_staticDialog->setModules(modules);
49
 
        }
50
 
        else {
51
 
                m_staticDialog->showModulesSelector();
52
 
        }
53
 
 
54
 
        m_staticDialog->setSearchText(searchText);
55
 
        if (m_staticDialog->isHidden()) {
56
 
                m_staticDialog->show();
57
 
        }
58
 
 
59
 
        if (modules.count() && !searchText.isEmpty()) {
60
 
                m_staticDialog->startSearch();
61
 
        }
62
 
        // moved these to after the startSearch() because
63
 
        // the progress dialog caused them to loose focus.
64
 
        m_staticDialog->raise();
65
 
        m_staticDialog->activateWindow();
66
 
}
67
 
 
68
 
CSearchDialog* CSearchDialog::getSearchDialog()
69
 
{
70
 
        Q_ASSERT(m_staticDialog);
71
 
        return m_staticDialog;
 
39
void CSearchDialog::openDialog(const QList<CSwordModuleInfo*> modules, const QString& searchText, QWidget* parentDialog) {
 
40
    if (!m_staticDialog) {
 
41
        m_staticDialog = new CSearchDialog(parentDialog);
 
42
    };
 
43
    m_staticDialog->reset();
 
44
 
 
45
    if (modules.count()) {
 
46
        m_staticDialog->setModules(modules);
 
47
    }
 
48
    else {
 
49
        m_staticDialog->showModulesSelector();
 
50
    }
 
51
 
 
52
    m_staticDialog->setSearchText(searchText);
 
53
    if (m_staticDialog->isHidden()) {
 
54
        m_staticDialog->show();
 
55
    }
 
56
 
 
57
    if (modules.count() && !searchText.isEmpty()) {
 
58
        m_staticDialog->startSearch();
 
59
    }
 
60
    // moved these to after the startSearch() because
 
61
    // the progress dialog caused them to loose focus.
 
62
    m_staticDialog->raise();
 
63
    m_staticDialog->activateWindow();
 
64
}
 
65
 
 
66
void CSearchDialog::closeDialog()
 
67
{
 
68
        if (m_staticDialog != 0)
 
69
                m_staticDialog->closeButtonClicked();
 
70
}
 
71
 
 
72
CSearchDialog* CSearchDialog::getSearchDialog() {
 
73
    Q_ASSERT(m_staticDialog);
 
74
    return m_staticDialog;
72
75
}
73
76
 
74
77
CSearchDialog::CSearchDialog(QWidget *parent)
75
 
        :QDialog(parent), /*m_searchButton(0),*/ m_closeButton(0), 
76
 
        m_searchResultArea(0), m_searchOptionsArea(0)
77
 
{
78
 
        setWindowIcon( util::filesystem::DirectoryUtil::getIcon(CResMgr::searchdialog::icon) );
79
 
        setWindowTitle(tr("Search"));
80
 
        setAttribute(Qt::WA_DeleteOnClose);
81
 
        m_searcher.connectFinished( this, SLOT(searchFinished()));
82
 
        initView();
83
 
        initConnections();
 
78
        : QDialog(parent), /*m_searchButton(0),*/ m_closeButton(0),
 
79
        m_searchResultArea(0), m_searchOptionsArea(0) {
 
80
    namespace DU = util::directory;
 
81
 
 
82
    setWindowIcon(DU::getIcon(CResMgr::searchdialog::icon));
 
83
    setWindowTitle(tr("Search"));
 
84
    setAttribute(Qt::WA_DeleteOnClose);
 
85
    m_searcher.connectFinished( this, SLOT(searchFinished()));
 
86
    initView();
 
87
    initConnections();
84
88
}
85
89
 
86
 
CSearchDialog::~CSearchDialog()
87
 
{
88
 
        saveDialogSettings();
89
 
        m_staticDialog = 0;
 
90
CSearchDialog::~CSearchDialog() {
 
91
    saveDialogSettings();
 
92
    m_staticDialog = 0;
90
93
}
91
94
 
92
95
/** Starts the search with the set modules and the set search text. */
93
 
void CSearchDialog::startSearch()
94
 
{
95
 
        QString originalSearchText(m_searchOptionsArea->searchText());
96
 
        QString searchText("");
97
 
 
98
 
        if (originalSearchText.isEmpty()) {
99
 
                return;
100
 
        }
101
 
 
102
 
        searchText = prepareSearchText(originalSearchText);
103
 
 
104
 
        // Insert search text into history list of combobox
105
 
        m_searchOptionsArea->addToHistory(originalSearchText);
106
 
 
107
 
        // check that we have the indices we need for searching
108
 
        if (!m_searcher.modulesHaveIndices( modules() ) )       {
109
 
                int result = QMessageBox::question(this, tr("Missing indices"),
110
 
                        tr("One or more works need indexing before they can be searched.\n"
111
 
                        "This could take a long time. Proceed with indexing?"),
112
 
                QMessageBox::Yes | QMessageBox::Default,
113
 
                QMessageBox::No  | QMessageBox::Escape);
114
 
                // In SuSE 10.0 the result is the logical or of the button type, just like it is
115
 
                // inputed into the QMessageBox.
116
 
                if ( (result == (QMessageBox::Yes | QMessageBox::Default)) ||
117
 
                        (result == QMessageBox::Yes) || (result == QMessageBox::Default) ) {
118
 
                        CModuleIndexDialog* dlg = CModuleIndexDialog::getInstance();
119
 
                        dlg->indexUnindexedModules( modules() );
120
 
                }
121
 
                else {
 
96
void CSearchDialog::startSearch() {
 
97
    QString originalSearchText(m_searchOptionsArea->searchText());
 
98
    QString searchText("");
 
99
 
 
100
    // first check the search string for errors
 
101
    {
 
102
                QString TestString(originalSearchText);
 
103
                QRegExp ReservedWords("heading:|footnote:|morph:|strong:");
 
104
                if (TestString.replace(ReservedWords, "").simplified().isEmpty()) {
122
105
                        return;
123
106
                }
124
 
        }
125
 
 
126
 
        if (m_searchOptionsArea->hasSearchScope()) {
127
 
                m_searcher.setSearchScope( m_searchOptionsArea->searchScope() );
128
 
        }
129
 
        else {
130
 
                m_searcher.resetSearchScope();
131
 
        }
132
 
 
133
 
        m_searcher.setModules( modules() );
134
 
        m_searcher.setSearchedText(searchText);
135
 
 
136
 
 
137
 
        //Just to be sure that it can't be clicked again, if the search happens to be a bit slow.
138
 
        m_searchOptionsArea->searchButton()->setEnabled(false);
139
 
        m_searchOptionsArea->m_searchTextCombo->setEnabled(false);
140
 
 
141
 
        m_searcher.startSearch();
142
 
 
143
 
        m_searchOptionsArea->searchButton()->setEnabled(true);
144
 
        m_searchOptionsArea->m_searchTextCombo->setEnabled(true);
145
 
        m_searchOptionsArea->m_searchTextCombo->setFocus();
 
107
    }
 
108
 
 
109
    searchText = prepareSearchText(originalSearchText);
 
110
 
 
111
    // Insert search text into history list of combobox
 
112
    m_searchOptionsArea->addToHistory(originalSearchText);
 
113
 
 
114
    // check that we have the indices we need for searching
 
115
    if (!m_searcher.modulesHaveIndices( modules() ) )   {
 
116
        int result = util::showQuestion(this, tr("Missing indices"),
 
117
                                        tr("One or more works need indexing before they can be searched.\n"
 
118
                                           "This could take a long time. Proceed with indexing?"),
 
119
                                        QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
 
120
        // In SuSE 10.0 the result is the logical or of the button type, just like it is
 
121
        // inputed into the QMessageBox.
 
122
        if ( (result == (QMessageBox::Yes | QMessageBox::Default)) ||
 
123
                (result == QMessageBox::Yes) || (result == QMessageBox::Default) ) {
 
124
            CModuleIndexDialog* dlg = CModuleIndexDialog::getInstance();
 
125
            dlg->indexUnindexedModules( modules() );
 
126
        }
 
127
        else {
 
128
            return;
 
129
        }
 
130
    }
 
131
 
 
132
    if (m_searchOptionsArea->hasSearchScope()) {
 
133
        m_searcher.setSearchScope( m_searchOptionsArea->searchScope() );
 
134
    }
 
135
    else {
 
136
        m_searcher.resetSearchScope();
 
137
    }
 
138
 
 
139
    m_searcher.setModules( modules() );
 
140
    m_searcher.setSearchedText(searchText);
 
141
 
 
142
 
 
143
    //Just to be sure that it can't be clicked again, if the search happens to be a bit slow.
 
144
    m_searchOptionsArea->searchButton()->setEnabled(false);
 
145
    m_searchOptionsArea->m_searchTextCombo->setEnabled(false);
 
146
 
 
147
    m_searcher.startSearch();
 
148
 
 
149
    m_searchOptionsArea->searchButton()->setEnabled(true);
 
150
    m_searchOptionsArea->m_searchTextCombo->setEnabled(true);
 
151
    m_searchOptionsArea->m_searchTextCombo->setFocus();
146
152
}
147
153
 
148
 
QString CSearchDialog::prepareSearchText(const QString& orig)
149
 
{
150
 
        qDebug() << "Original search text:" << orig;
151
 
        static const QRegExp syntaxCharacters("[+\\-()!\"~]");
152
 
        static const QRegExp andWords("\\band\\b", Qt::CaseInsensitive);
153
 
        static const QRegExp orWords("\\bor\\b", Qt::CaseInsensitive);
154
 
        QString text("");
155
 
        if (m_searchOptionsArea->searchType() == BtSearchOptionsArea::AndType) {
156
 
                qDebug() << "AND type";
157
 
                text = orig.simplified();
158
 
                text.remove(syntaxCharacters);
159
 
                qDebug() << "After syntax characters removed:" << text;
160
 
                text.replace(andWords, "\"and\"");
161
 
                text.replace(orWords, "\"or\"");
162
 
                qDebug() << "After andor repclaced:" << text;
163
 
                text.replace(" ", " AND ");
164
 
        }
165
 
        if (m_searchOptionsArea->searchType() == BtSearchOptionsArea::OrType) {
166
 
                text = orig.simplified();
167
 
                text.remove(syntaxCharacters);
168
 
                text.replace(andWords, "\"and\"");
169
 
                text.replace(orWords, "\"or\"");
170
 
        }
171
 
        if (m_searchOptionsArea->searchType() == BtSearchOptionsArea::FullType) {
172
 
                text = orig;
173
 
        }
174
 
        qDebug() << "The final search string:" << text;
175
 
        return text;
 
154
QString CSearchDialog::prepareSearchText(const QString& orig) {
 
155
    qDebug() << "Original search text:" << orig;
 
156
    static const QRegExp syntaxCharacters("[+\\-()!\"~]");
 
157
    static const QRegExp andWords("\\band\\b", Qt::CaseInsensitive);
 
158
    static const QRegExp orWords("\\bor\\b", Qt::CaseInsensitive);
 
159
    QString text("");
 
160
    if (m_searchOptionsArea->searchType() == BtSearchOptionsArea::AndType) {
 
161
        qDebug() << "AND type";
 
162
        text = orig.simplified();
 
163
        text.remove(syntaxCharacters);
 
164
        qDebug() << "After syntax characters removed:" << text;
 
165
        text.replace(andWords, "\"and\"");
 
166
        text.replace(orWords, "\"or\"");
 
167
        qDebug() << "After andor repclaced:" << text;
 
168
        text.replace(" ", " AND ");
 
169
    }
 
170
    if (m_searchOptionsArea->searchType() == BtSearchOptionsArea::OrType) {
 
171
        text = orig.simplified();
 
172
        text.remove(syntaxCharacters);
 
173
        text.replace(andWords, "\"and\"");
 
174
        text.replace(orWords, "\"or\"");
 
175
    }
 
176
    if (m_searchOptionsArea->searchType() == BtSearchOptionsArea::FullType) {
 
177
        text = orig;
 
178
    }
 
179
    qDebug() << "The final search string:" << text;
 
180
    return text;
176
181
}
177
182
 
178
183
/** Starts the search with the given module list and given search text. */
179
 
void CSearchDialog::startSearch( const QList<CSwordModuleInfo*> modules, const QString& searchText)
180
 
{
181
 
        m_searchResultArea->reset();
182
 
        m_searchOptionsArea->reset();
183
 
        setModules(modules);
184
 
        setSearchText(searchText);
 
184
void CSearchDialog::startSearch( const QList<CSwordModuleInfo*> modules, const QString& searchText) {
 
185
    m_searchResultArea->reset();
 
186
    m_searchOptionsArea->reset();
 
187
    setModules(modules);
 
188
    setSearchText(searchText);
185
189
 
186
 
        startSearch();
 
190
    startSearch();
187
191
}
188
192
 
189
193
/** Returns the list of used modules. */
190
 
QList<CSwordModuleInfo*> CSearchDialog::modules() const
191
 
{
192
 
        return m_searchOptionsArea->modules();
 
194
QList<CSwordModuleInfo*> CSearchDialog::modules() const {
 
195
    return m_searchOptionsArea->modules();
193
196
}
194
197
 
195
198
/** Sets the list of modules for the search. */
196
 
void CSearchDialog::setModules( const QList<CSwordModuleInfo*> modules )
197
 
{
198
 
        m_searchOptionsArea->setModules(modules);
 
199
void CSearchDialog::setModules( const QList<CSwordModuleInfo*> modules ) {
 
200
    m_searchOptionsArea->setModules(modules);
199
201
}
200
202
 
201
203
/** Returns the search text which is set currently. */
202
 
QString CSearchDialog::searchText() const
203
 
{
204
 
        return m_searchOptionsArea->searchText();
 
204
QString CSearchDialog::searchText() const {
 
205
    return m_searchOptionsArea->searchText();
205
206
}
206
207
 
207
 
sword::ListKey CSearchDialog::searchScope()
208
 
{
209
 
        return m_searchOptionsArea->searchScope();
 
208
sword::ListKey CSearchDialog::searchScope() {
 
209
    return m_searchOptionsArea->searchScope();
210
210
}
211
211
 
212
212
/** Sets the search text which is used for the search. */
213
 
void CSearchDialog::setSearchText( const QString searchText )
214
 
{
215
 
        m_searchOptionsArea->setSearchText(searchText);
 
213
void CSearchDialog::setSearchText( const QString searchText ) {
 
214
    m_searchOptionsArea->setSearchText(searchText);
216
215
}
217
216
 
218
217
/** Initializes this object. */
219
 
void CSearchDialog::initView()
220
 
{
221
 
        QVBoxLayout* verticalLayout = new QVBoxLayout(this);
222
 
        setLayout(verticalLayout);
223
 
 
224
 
        m_searchOptionsArea = new BtSearchOptionsArea(this);
225
 
        verticalLayout->addWidget(m_searchOptionsArea);
226
 
 
227
 
        m_searchResultArea = new BtSearchResultArea(this);
228
 
        verticalLayout->addWidget(m_searchResultArea);
229
 
        
230
 
        QHBoxLayout* horizontalLayout = new QHBoxLayout();
231
 
 
232
 
        m_analyseButton = new QPushButton(tr("&Analyze results..."), 0);
233
 
        m_analyseButton->setToolTip(tr("Show a graphical analyzis of the search result"));
234
 
        QSpacerItem* spacerItem = new QSpacerItem(1, 1, QSizePolicy::Expanding, QSizePolicy::Minimum);
235
 
        horizontalLayout->addWidget(m_analyseButton);
236
 
        horizontalLayout->addItem(spacerItem);
237
 
 
238
 
        m_closeButton = new QPushButton(this);
239
 
        m_closeButton->setText(tr("&Close")); 
240
 
        m_closeButton->setIcon( util::filesystem::DirectoryUtil::getIcon(CResMgr::searchdialog::close_icon));
241
 
        horizontalLayout->addWidget(m_closeButton);
242
 
 
243
 
        verticalLayout->addLayout(horizontalLayout);
244
 
 
245
 
        loadDialogSettings();
 
218
void CSearchDialog::initView() {
 
219
    namespace DU = util::directory;
 
220
 
 
221
    QVBoxLayout* verticalLayout = new QVBoxLayout(this);
 
222
    setLayout(verticalLayout);
 
223
 
 
224
    m_searchOptionsArea = new BtSearchOptionsArea(this);
 
225
    verticalLayout->addWidget(m_searchOptionsArea);
 
226
 
 
227
    m_searchResultArea = new BtSearchResultArea(this);
 
228
    verticalLayout->addWidget(m_searchResultArea);
 
229
 
 
230
    QHBoxLayout* horizontalLayout = new QHBoxLayout();
 
231
 
 
232
    m_analyseButton = new QPushButton(tr("&Analyze results..."), 0);
 
233
    m_analyseButton->setToolTip(tr("Show a graphical analyzis of the search result"));
 
234
    QSpacerItem* spacerItem = new QSpacerItem(1, 1, QSizePolicy::Expanding, QSizePolicy::Minimum);
 
235
    horizontalLayout->addWidget(m_analyseButton);
 
236
    horizontalLayout->addItem(spacerItem);
 
237
 
 
238
    m_closeButton = new QPushButton(this);
 
239
    m_closeButton->setText(tr("&Close"));
 
240
    m_closeButton->setIcon(DU::getIcon(CResMgr::searchdialog::close_icon));
 
241
    horizontalLayout->addWidget(m_closeButton);
 
242
 
 
243
    verticalLayout->addLayout(horizontalLayout);
 
244
 
 
245
    loadDialogSettings();
246
246
}
247
247
 
248
248
void CSearchDialog::searchFinished() {
249
 
        if ( m_searcher.foundItems() ) {
250
 
                m_searchResultArea->setSearchResult(modules());
251
 
        }
252
 
        else {
253
 
                m_searchResultArea->reset();
254
 
        }
255
 
        m_staticDialog->raise();
256
 
        m_staticDialog->activateWindow();
 
249
    if ( m_searcher.foundItems() ) {
 
250
        m_searchResultArea->setSearchResult(modules());
 
251
    }
 
252
    else {
 
253
        m_searchResultArea->reset();
 
254
    }
 
255
    m_staticDialog->raise();
 
256
    m_staticDialog->activateWindow();
257
257
}
258
258
 
259
259
void CSearchDialog::showModulesSelector() {
260
 
        m_searchOptionsArea->chooseModules();
 
260
    m_searchOptionsArea->chooseModules();
261
261
}
262
262
 
263
263
/** Initializes the signal slot connections */
264
264
void CSearchDialog::initConnections() {
265
 
        // Search button is clicked
266
 
    bool ok = connect(m_searchOptionsArea->searchButton(), SIGNAL(clicked()),this, SLOT(startSearch()));
267
 
        Q_ASSERT(ok);
268
 
        // Return/Enter is pressed in the search text field
269
 
        ok = connect(m_searchOptionsArea, SIGNAL(sigStartSearch()), this, SLOT(startSearch()) );
270
 
        Q_ASSERT(ok);
 
265
    // Search button is clicked
 
266
    bool ok = connect(m_searchOptionsArea->searchButton(), SIGNAL(clicked()), this, SLOT(startSearch()));
 
267
    Q_ASSERT(ok);
 
268
    // Return/Enter is pressed in the search text field
 
269
    ok = connect(m_searchOptionsArea, SIGNAL(sigStartSearch()), this, SLOT(startSearch()) );
 
270
    Q_ASSERT(ok);
271
271
    ok = connect(m_closeButton, SIGNAL(clicked()), this, SLOT(closeButtonClicked()));
272
 
        Q_ASSERT(ok);
 
272
    Q_ASSERT(ok);
273
273
 
274
 
        connect(m_analyseButton, SIGNAL(clicked()), m_searchResultArea, SLOT(showAnalysis()));
 
274
    connect(m_analyseButton, SIGNAL(clicked()), m_searchResultArea, SLOT(showAnalysis()));
275
275
 
276
276
}
277
277
 
278
278
/** Resets the parts to the default. */
279
279
void CSearchDialog::reset() {
280
 
        m_searchOptionsArea->reset();
281
 
        m_searchResultArea->reset();
 
280
    m_searchOptionsArea->reset();
 
281
    m_searchResultArea->reset();
282
282
}
283
283
 
284
284
void CSearchDialog::closeButtonClicked() {
285
 
        // With Qt::WA_DeleteOnClose set, the dialog will be deleted now
286
 
        m_staticDialog->close();
287
 
}
288
 
 
289
 
void CSearchDialog::loadDialogSettings()
290
 
{
291
 
        resize(CBTConfig::get(CBTConfig::searchDialogWidth), CBTConfig::get(CBTConfig::searchDialogHeight));
292
 
        move(CBTConfig::get(CBTConfig::searchDialogX), CBTConfig::get(CBTConfig::searchDialogY));
293
 
}
294
 
 
295
 
void CSearchDialog::saveDialogSettings()
296
 
{
297
 
        CBTConfig::set(CBTConfig::searchDialogWidth, size().width());
298
 
        CBTConfig::set(CBTConfig::searchDialogHeight, size().height());
299
 
        CBTConfig::set(CBTConfig::searchDialogX, x());
300
 
        CBTConfig::set(CBTConfig::searchDialogY, y());
 
285
    // With Qt::WA_DeleteOnClose set, the dialog will be deleted now
 
286
    m_staticDialog->close();
 
287
}
 
288
 
 
289
void CSearchDialog::loadDialogSettings() {
 
290
    resize(CBTConfig::get(CBTConfig::searchDialogWidth), CBTConfig::get(CBTConfig::searchDialogHeight));
 
291
    move(CBTConfig::get(CBTConfig::searchDialogX), CBTConfig::get(CBTConfig::searchDialogY));
 
292
}
 
293
 
 
294
void CSearchDialog::saveDialogSettings() {
 
295
    CBTConfig::set(CBTConfig::searchDialogWidth, size().width());
 
296
    CBTConfig::set(CBTConfig::searchDialogHeight, size().height());
 
297
    CBTConfig::set(CBTConfig::searchDialogX, x());
 
298
    CBTConfig::set(CBTConfig::searchDialogY, y());
301
299
}
302
300
 
303
301