BibleTime
|
#include <btsearchoptionsarea.h>
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 |
QComboBox * | m_modulesCombo |
QLabel * | m_modulesLabel |
QComboBox * | m_rangeChooserCombo |
QPushButton * | m_searchButton |
QLabel * | m_searchScopeLabel |
CHistoryComboBox * | m_searchTextCombo |
QLabel * | m_searchTextLabel |
QRadioButton * | m_typeAndButton |
QRadioButton * | m_typeFreeButton |
QRadioButton * | m_typeOrButton |
QGroupBox * | searchGroupBox |
Definition at line 34 of file btsearchoptionsarea.h.
Search::BtSearchOptionsArea::BtSearchOptionsArea | ( | QWidget * | parent = nullptr | ) |
Definition at line 42 of file btsearchoptionsarea.cpp.
References initConnections(), initView(), and readSettings().
|
override |
Definition at line 49 of file btsearchoptionsarea.cpp.
References saveSettings().
void Search::BtSearchOptionsArea::addToHistory | ( | const QString & | text | ) |
Definition at line 388 of file btsearchoptionsarea.cpp.
References Search::CHistoryComboBox::addToHistory(), and m_searchTextCombo.
Referenced by Search::CSearchDialog::startSearch().
void Search::BtSearchOptionsArea::chooseModules | ( | ) |
Opens the modules chooser dialog.
Definition at line 291 of file btsearchoptionsarea.cpp.
References BtSearchModuleChooserDialog::checkedModules(), modules(), BtSearchModuleChooserDialog::setCheckedModules(), and setModules().
Referenced by initConnections(), and Search::CSearchDialog::reset().
|
overrideprivate |
Definition at line 392 of file btsearchoptionsarea.cpp.
References m_searchTextCombo.
|
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().
|
private |
Definition at line 201 of file btsearchoptionsarea.cpp.
References Search::CHistoryComboBox::addToHistory(), BT_CONNECT, chooseModules(), CSwordBackend::findModuleByName(), getUniqueWorksList(), CSwordBackend::instance(), m_chooseModulesButton, m_chooseRangeButton, m_helpLabel, m_modulesCombo, m_searchButton, m_searchTextCombo, refreshRanges(), setModules(), and sigStartSearch().
Referenced by BtSearchOptionsArea().
|
private |
Initializes this page.
Definition at line 87 of file btsearchoptionsarea.cpp.
References gridLayout, hboxLayout, m_chooseModulesButton, m_chooseRangeButton, m_helpLabel, m_modulesCombo, m_modulesLabel, m_rangeChooserCombo, m_searchButton, m_searchScopeLabel, m_searchTextCombo, m_searchTextLabel, m_typeAndButton, m_typeFreeButton, m_typeOrButton, util::tool::mWidth(), refreshRanges(), and searchGroupBox.
Referenced by BtSearchOptionsArea().
|
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().
|
private |
Reads the settings of the last searchdialog session.
Definition at line 327 of file btsearchoptionsarea.cpp.
References CSwordModuleSearch::AndType, BT_CONNECT, btConfig(), m_modulesCombo, m_searchTextCombo, m_typeAndButton, m_typeFreeButton, m_typeOrButton, CSwordModuleSearch::OrType, anonymous_namespace{btsearchoptionsarea.cpp}::SearchTypeKey, and BtConfigCore::value().
Referenced by BtSearchOptionsArea().
|
private |
Refreshes the list of ranges and the range combobox.
Definition at line 365 of file btsearchoptionsarea.cpp.
References btConfig(), getUniqueWorksList(), and m_rangeChooserCombo.
Referenced by initConnections(), and initView().
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().
|
private |
Reads the settings for the searchdialog from disk.
Definition at line 312 of file btsearchoptionsarea.cpp.
References CSwordModuleSearch::AndType, btConfig(), CSwordModuleSearch::FullType, Search::CHistoryComboBox::historyItems(), m_rangeChooserCombo, m_searchTextCombo, m_typeAndButton, m_typeOrButton, CSwordModuleSearch::OrType, anonymous_namespace{btsearchoptionsarea.cpp}::SearchTypeKey, and BtConfigCore::setValue().
Referenced by ~BtSearchOptionsArea().
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().
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().
CSwordModuleSearch::SearchType Search::BtSearchOptionsArea::searchType | ( | ) |
Definition at line 57 of file btsearchoptionsarea.cpp.
References CSwordModuleSearch::AndType, CSwordModuleSearch::FullType, m_typeAndButton, m_typeOrButton, and CSwordModuleSearch::OrType.
Referenced by Search::CSearchDialog::startSearch().
void Search::BtSearchOptionsArea::setModules | ( | const BtConstModuleList & | modules | ) |
Sets the modules used by the search.
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().
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().
|
signal |
Referenced by Search::CSearchDialog::CSearchDialog(), and initConnections().
|
private |
Definition at line 120 of file btsearchoptionsarea.h.
Referenced by initView().
|
private |
Definition at line 118 of file btsearchoptionsarea.h.
Referenced by initView().
|
private |
Definition at line 127 of file btsearchoptionsarea.h.
Referenced by initConnections(), and initView().
|
private |
Definition at line 128 of file btsearchoptionsarea.h.
Referenced by initConnections(), and initView().
|
private |
Definition at line 123 of file btsearchoptionsarea.h.
Referenced by initConnections(), and initView().
|
private |
Definition at line 116 of file btsearchoptionsarea.h.
Referenced by modules(), and setModules().
|
private |
Definition at line 133 of file btsearchoptionsarea.h.
Referenced by initConnections(), initView(), readSettings(), and setModules().
|
private |
Definition at line 132 of file btsearchoptionsarea.h.
Referenced by initView().
|
private |
Definition at line 130 of file btsearchoptionsarea.h.
Referenced by initView(), refreshRanges(), reset(), saveSettings(), and searchScope().
|
private |
Definition at line 122 of file btsearchoptionsarea.h.
Referenced by initConnections(), and initView().
|
private |
Definition at line 129 of file btsearchoptionsarea.h.
Referenced by initView().
|
private |
Definition at line 131 of file btsearchoptionsarea.h.
Referenced by addToHistory(), eventFilter(), initConnections(), initView(), readSettings(), reset(), saveSettings(), searchText(), and setSearchText().
|
private |
Definition at line 121 of file btsearchoptionsarea.h.
Referenced by initView().
|
private |
Definition at line 124 of file btsearchoptionsarea.h.
Referenced by initView(), readSettings(), saveSettings(), and searchType().
|
private |
Definition at line 126 of file btsearchoptionsarea.h.
Referenced by initView(), and readSettings().
|
private |
Definition at line 125 of file btsearchoptionsarea.h.
Referenced by initView(), readSettings(), saveSettings(), and searchType().
|
private |
Definition at line 119 of file btsearchoptionsarea.h.
Referenced by initView().