3
* This file is part of BibleTime's source code, http://www.bibletime.info/.
5
* Copyright 1999-2006 by the BibleTime developers.
6
* The BibleTime source code is licensed under the GNU General Public License version 2.0.
12
#ifndef CSWORDMODULESEARCH_H
13
#define CSWORDMODULESEARCH_H
16
#include "cswordmoduleinfo.h"
19
#include "util/cpointers.h"
33
* CSwordModuleSearch manages the search on Sword modules. It manages the thread(s)
34
* and manages the different modules.
36
* @author The BibleTime team
37
* @version $Id: cswordmodulesearch.h,v 1.34 2006/08/08 19:32:48 joachim Exp $
40
class CSwordModuleSearch: public CPointers {
45
* The destructor of this class. It cleans uop memory before it's deleted.
47
virtual ~CSwordModuleSearch();
49
* Sets the text which should be search in the modules.
51
void setSearchedText( const QString& );
53
* Starts the search for the search text.
55
const bool startSearch();
57
* This function sets the modules which should be searched.
59
void setModules( const ListCSwordModuleInfo& );
61
* Sets the search scope.
63
void setSearchScope( const sword::ListKey& scope );
65
* Sets the seaech scope back.
67
void resetSearchScope();
69
* @return "true" if in the last search the searcher found items, if no items were found return "false"
71
const bool foundItems() const;
73
* Returns a copy of the used search scope.
75
const sword::ListKey& searchScope() const;
77
void connectFinished( QObject * receiver, const char * member );
78
void searchFinished();
81
* Returns true if all of the specified modules have indices already built.
83
const bool modulesHaveIndices( const ListCSwordModuleInfo& );
86
QString m_searchedText;
87
sword::ListKey m_searchScope;
88
ListCSwordModuleInfo m_moduleList;
95
QSignal m_finishedSig;
96
static CSwordModuleSearch* searcher;