BibleTime
Namespaces | Classes | Typedefs | Enumerations | Functions
CSwordModuleSearch Namespace Reference

Namespaces

 anonymous_namespace{cswordmodulesearch.cpp}
 

Classes

struct  ModuleSearchResult
 

Typedefs

using ModuleResultList = std::vector< std::shared_ptr< sword::SWKey const > >
 
using Results = std::vector< ModuleSearchResult >
 

Enumerations

enum  SearchType { AndType = 0 , OrType = 1 , FullType = 2 }
 

Functions

QString highlightSearchedText (QString const &content, QString const &searchedText, bool plainSearchedText)
 
QString prepareSearchText (QString const &orig, SearchType const searchType)
 
Results search (QString const &searchText, BtConstModuleList const &modules, sword::ListKey scope)
 

Typedef Documentation

◆ ModuleResultList

using CSwordModuleSearch::ModuleResultList = typedef std::vector<std::shared_ptr<sword::SWKey const> >

Definition at line 43 of file cswordmodulesearch.h.

◆ Results

using CSwordModuleSearch::Results = typedef std::vector<ModuleSearchResult>

Definition at line 50 of file cswordmodulesearch.h.

Enumeration Type Documentation

◆ SearchType

Enumerator
AndType 
OrType 
FullType 

Definition at line 52 of file cswordmodulesearch.h.

Function Documentation

◆ highlightSearchedText()

QString CSwordModuleSearch::highlightSearchedText ( QString const &  content,
QString const &  searchedText,
bool  plainSearchedText = false 
)

This function highlights the searched text in the content using the search type given by search flags

Bug:
?

Definition at line 156 of file cswordmodulesearch.cpp.

References CSwordModuleSearch::anonymous_namespace{cswordmodulesearch.cpp}::spaceRegexp().

Referenced by BtModuleTextModel::data(), Search::BtSearchResultArea::updatePreview(), and BtModuleTextModel::verseData().

◆ prepareSearchText()

QString CSwordModuleSearch::prepareSearchText ( QString const &  orig,
SearchType const  searchType 
)

Prepares the search string given by user for a specific search type

Referenced by Search::CSearchDialog::startSearch().

◆ search()

Results CSwordModuleSearch::search ( QString const &  searchText,
BtConstModuleList const &  modules,
sword::ListKey  scope 
)
Todo:
What is the purpose of the following statement?

Definition at line 33 of file cswordmodulesearch.cpp.

References BT_ASSERT, btConfig(), CSwordBackend::instance(), r(), and CSwordBackend::setFilterOptions().

Referenced by Search::CSearchDialog::startSearch().