BibleTime
Signals | Public Member Functions | Private Member Functions | Private Attributes | List of all members
Search::BtSearchOptionsArea Class Reference

#include <btsearchoptionsarea.h>

Inheritance diagram for Search::BtSearchOptionsArea:

Signals

void sigStartSearch ()
 

Public Member Functions

void addToHistory (const QString &text)
 
 BtSearchOptionsArea (QWidget *parent=nullptr)
 
void chooseModules ()
 
BtConstModuleList const & modules () const
 
void reset ()
 
sword::ListKey searchScope ()
 
QString searchText () const
 
CSwordModuleSearch::SearchType searchType ()
 
void setModules (const BtConstModuleList &modules)
 
void setSearchText (const QString &text)
 
 ~BtSearchOptionsArea () override
 

Private Member Functions

bool eventFilter (QObject *obj, QEvent *event) override
 
QStringList getUniqueWorksList ()
 
void initConnections ()
 
void initView ()
 
void readSettings ()
 
void refreshRanges ()
 
void saveSettings ()
 

Private Attributes

QGridLayout * gridLayout
 
QHBoxLayout * hboxLayout
 
QPushButton * m_chooseModulesButton
 
QPushButton * m_chooseRangeButton
 
QLabel * m_helpLabel
 
BtConstModuleList m_modules
 
QComboBoxm_modulesCombo
 
QLabel * m_modulesLabel
 
QComboBoxm_rangeChooserCombo
 
QPushButton * m_searchButton
 
QLabel * m_searchScopeLabel
 
CHistoryComboBoxm_searchTextCombo
 
QLabel * m_searchTextLabel
 
QRadioButton * m_typeAndButton
 
QRadioButton * m_typeFreeButton
 
QRadioButton * m_typeOrButton
 
QGroupBox * searchGroupBox
 

Detailed Description

Definition at line 34 of file btsearchoptionsarea.h.

Constructor & Destructor Documentation

◆ BtSearchOptionsArea()

Search::BtSearchOptionsArea::BtSearchOptionsArea ( QWidget parent = nullptr)

Definition at line 42 of file btsearchoptionsarea.cpp.

References initConnections(), initView(), and readSettings().

◆ ~BtSearchOptionsArea()

Search::BtSearchOptionsArea::~BtSearchOptionsArea ( )
override

Definition at line 49 of file btsearchoptionsarea.cpp.

References saveSettings().

Member Function Documentation

◆ addToHistory()

void Search::BtSearchOptionsArea::addToHistory ( const QString &  text)

◆ chooseModules()

void Search::BtSearchOptionsArea::chooseModules ( )

◆ eventFilter()

bool Search::BtSearchOptionsArea::eventFilter ( QObject obj,
QEvent *  event 
)
overrideprivate

Definition at line 392 of file btsearchoptionsarea.cpp.

References m_searchTextCombo.

◆ getUniqueWorksList()

QStringList Search::BtSearchOptionsArea::getUniqueWorksList ( )
private

Get unique works list from the Works combobox

Definition at line 281 of file btsearchoptionsarea.cpp.

References btConfig().

Referenced by initConnections(), refreshRanges(), and searchScope().

◆ initConnections()

void Search::BtSearchOptionsArea::initConnections ( )
private

◆ initView()

void Search::BtSearchOptionsArea::initView ( )
private

◆ modules()

BtConstModuleList const& Search::BtSearchOptionsArea::modules ( ) const
inline

Returns the list of used modules.

Definition at line 58 of file btsearchoptionsarea.h.

References m_modules.

Referenced by chooseModules(), setModules(), and Search::CSearchDialog::startSearch().

◆ readSettings()

void Search::BtSearchOptionsArea::readSettings ( )
private

◆ refreshRanges()

void Search::BtSearchOptionsArea::refreshRanges ( )
private

Refreshes the list of ranges and the range combobox.

Todo:
what about this?

Definition at line 365 of file btsearchoptionsarea.cpp.

References btConfig(), getUniqueWorksList(), and m_rangeChooserCombo.

Referenced by initConnections(), and initView().

◆ reset()

void Search::BtSearchOptionsArea::reset ( )

Sets all options back to the default.

Definition at line 301 of file btsearchoptionsarea.cpp.

References btConfig(), m_rangeChooserCombo, and m_searchTextCombo.

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

◆ saveSettings()

void Search::BtSearchOptionsArea::saveSettings ( )
private

◆ searchScope()

sword::ListKey Search::BtSearchOptionsArea::searchScope ( )

Returns the selected search scope if a search scope was selected.

Definition at line 377 of file btsearchoptionsarea.cpp.

References btConfig(), BtConfig::getSearchScopesForCurrentLocale(), getUniqueWorksList(), m_rangeChooserCombo, and BtConfig::parseVerseListWithModules().

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

◆ searchText()

QString Search::BtSearchOptionsArea::searchText ( ) const

Returns the search text set in this page.

Definition at line 53 of file btsearchoptionsarea.cpp.

References m_searchTextCombo.

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

◆ searchType()

CSwordModuleSearch::SearchType Search::BtSearchOptionsArea::searchType ( )

◆ setModules()

void Search::BtSearchOptionsArea::setModules ( const BtConstModuleList modules)

Sets the modules used by the search.

Todo:
Check for containsRef compat

Definition at line 242 of file btsearchoptionsarea.cpp.

References btConfig(), m_modules, m_modulesCombo, modules(), and BtConfigCore::setValue().

Referenced by chooseModules(), initConnections(), and Search::CSearchDialog::reset().

◆ setSearchText()

void Search::BtSearchOptionsArea::setSearchText ( const QString &  text)

Sets the search text used in the page.

Definition at line 67 of file btsearchoptionsarea.cpp.

References m_searchTextCombo.

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

◆ sigStartSearch

void Search::BtSearchOptionsArea::sigStartSearch ( )
signal
Todo:
Implement validation

Referenced by Search::CSearchDialog::CSearchDialog(), and initConnections().

Member Data Documentation

◆ gridLayout

QGridLayout* Search::BtSearchOptionsArea::gridLayout
private

Definition at line 120 of file btsearchoptionsarea.h.

Referenced by initView().

◆ hboxLayout

QHBoxLayout* Search::BtSearchOptionsArea::hboxLayout
private

Definition at line 118 of file btsearchoptionsarea.h.

Referenced by initView().

◆ m_chooseModulesButton

QPushButton* Search::BtSearchOptionsArea::m_chooseModulesButton
private

Definition at line 127 of file btsearchoptionsarea.h.

Referenced by initConnections(), and initView().

◆ m_chooseRangeButton

QPushButton* Search::BtSearchOptionsArea::m_chooseRangeButton
private

Definition at line 128 of file btsearchoptionsarea.h.

Referenced by initConnections(), and initView().

◆ m_helpLabel

QLabel* Search::BtSearchOptionsArea::m_helpLabel
private

Definition at line 123 of file btsearchoptionsarea.h.

Referenced by initConnections(), and initView().

◆ m_modules

BtConstModuleList Search::BtSearchOptionsArea::m_modules
private

Definition at line 116 of file btsearchoptionsarea.h.

Referenced by modules(), and setModules().

◆ m_modulesCombo

QComboBox* Search::BtSearchOptionsArea::m_modulesCombo
private

Definition at line 133 of file btsearchoptionsarea.h.

Referenced by initConnections(), initView(), readSettings(), and setModules().

◆ m_modulesLabel

QLabel* Search::BtSearchOptionsArea::m_modulesLabel
private

Definition at line 132 of file btsearchoptionsarea.h.

Referenced by initView().

◆ m_rangeChooserCombo

QComboBox* Search::BtSearchOptionsArea::m_rangeChooserCombo
private

Definition at line 130 of file btsearchoptionsarea.h.

Referenced by initView(), refreshRanges(), reset(), saveSettings(), and searchScope().

◆ m_searchButton

QPushButton* Search::BtSearchOptionsArea::m_searchButton
private

Definition at line 122 of file btsearchoptionsarea.h.

Referenced by initConnections(), and initView().

◆ m_searchScopeLabel

QLabel* Search::BtSearchOptionsArea::m_searchScopeLabel
private

Definition at line 129 of file btsearchoptionsarea.h.

Referenced by initView().

◆ m_searchTextCombo

CHistoryComboBox* Search::BtSearchOptionsArea::m_searchTextCombo
private

◆ m_searchTextLabel

QLabel* Search::BtSearchOptionsArea::m_searchTextLabel
private

Definition at line 121 of file btsearchoptionsarea.h.

Referenced by initView().

◆ m_typeAndButton

QRadioButton* Search::BtSearchOptionsArea::m_typeAndButton
private

Definition at line 124 of file btsearchoptionsarea.h.

Referenced by initView(), readSettings(), saveSettings(), and searchType().

◆ m_typeFreeButton

QRadioButton* Search::BtSearchOptionsArea::m_typeFreeButton
private

Definition at line 126 of file btsearchoptionsarea.h.

Referenced by initView(), and readSettings().

◆ m_typeOrButton

QRadioButton* Search::BtSearchOptionsArea::m_typeOrButton
private

Definition at line 125 of file btsearchoptionsarea.h.

Referenced by initView(), readSettings(), saveSettings(), and searchType().

◆ searchGroupBox

QGroupBox* Search::BtSearchOptionsArea::searchGroupBox
private

Definition at line 119 of file btsearchoptionsarea.h.

Referenced by initView().


The documentation for this class was generated from the following files: