diff options
Diffstat (limited to 'src/frontend/searchdialog/btsearchoptionsarea.h')
-rw-r--r-- | src/frontend/searchdialog/btsearchoptionsarea.h | 221 |
1 files changed, 110 insertions, 111 deletions
diff --git a/src/frontend/searchdialog/btsearchoptionsarea.h b/src/frontend/searchdialog/btsearchoptionsarea.h index 30f6654..38bba54 100644 --- a/src/frontend/searchdialog/btsearchoptionsarea.h +++ b/src/frontend/searchdialog/btsearchoptionsarea.h @@ -31,117 +31,116 @@ class QEvent; namespace Search { -class BtSearchOptionsArea : public QWidget -{ - Q_OBJECT -public: - - enum SearchType {AndType, OrType, FullType}; - - friend class CSearchDialog; - - BtSearchOptionsArea(QWidget *parent=0); - ~BtSearchOptionsArea(); - /* - * Add text to search combox box history - */ - void addToHistory(const QString& text); - /** - * Sets the search text used in the page. - */ - void setSearchText(const QString& text); - /** - * Returns the search text set in this page. - */ - QString searchText() const; - - SearchType searchType(); - - QPushButton* searchButton() const; - - /** - * Returns the list of used modules. - */ - QList<CSwordModuleInfo*> modules() const; - - /** - * Sets all options back to the default. - */ - void reset(); - /** - * Returns the selected search scope if a search scope was selected. - */ - sword::ListKey searchScope(); - - bool hasSearchScope(); - - -protected: - /** - * Initializes this page. - */ - void initView(); - void initConnections(); - /** - * Reads the settings of the last searchdialog session. - */ - void readSettings(); - /** - * Reads the settings for the searchdialog from disk. - */ - void saveSettings(); - bool eventFilter(QObject* obj, QEvent* event); -public slots: - /** - * Sets the modules used by the search. - */ - void setModules( QList<CSwordModuleInfo*> modules ); - - /** Sets the modules when user selects them from the combobox.*/ - void moduleListTextSelected(int index); - - /** - * Reimplementation. - */ - void aboutToShow(); - /** - * Refreshes the list of ranges and the range combobox. - */ - void refreshRanges(); - /** - * Opens the modules chooser dialog. - */ - void chooseModules(); - -protected slots: - void setupRanges(); - void syntaxHelp(); - void slotSearchTextEditReturnPressed(); - void slotValidateText(const QString& newText); - -signals: - void sigSetSearchButtonStatus(bool); - void sigStartSearch(); - -private: - QList<CSwordModuleInfo*> m_modules; - - QHBoxLayout *hboxLayout; - QGroupBox *searchGroupBox; - QGridLayout *gridLayout; - QLabel *m_searchTextLabel; - QPushButton* m_searchButton; - QLabel* m_helpLabel; - QRadioButton* m_typeAndButton; - QRadioButton* m_typeOrButton; - QRadioButton* m_typeFreeButton; - QPushButton *m_chooseModulesButton; - QPushButton *m_chooseRangeButton; - QLabel *m_searchScopeLabel; - QComboBox *m_rangeChooserCombo; - CHistoryComboBox *m_searchTextCombo; - QLabel *m_modulesLabel; - QComboBox* m_modulesCombo; +class BtSearchOptionsArea : public QWidget { + Q_OBJECT + public: + + enum SearchType {AndType, OrType, FullType}; + + friend class CSearchDialog; + + BtSearchOptionsArea(QWidget *parent = 0); + ~BtSearchOptionsArea(); + /* + * Add text to search combox box history + */ + void addToHistory(const QString& text); + /** + * Sets the search text used in the page. + */ + void setSearchText(const QString& text); + /** + * Returns the search text set in this page. + */ + QString searchText() const; + + SearchType searchType(); + + QPushButton* searchButton() const; + + /** + * Returns the list of used modules. + */ + QList<CSwordModuleInfo*> modules() const; + + /** + * Sets all options back to the default. + */ + void reset(); + /** + * Returns the selected search scope if a search scope was selected. + */ + sword::ListKey searchScope(); + + bool hasSearchScope(); + + + protected: + /** + * Initializes this page. + */ + void initView(); + void initConnections(); + /** + * Reads the settings of the last searchdialog session. + */ + void readSettings(); + /** + * Reads the settings for the searchdialog from disk. + */ + void saveSettings(); + bool eventFilter(QObject* obj, QEvent* event); + public slots: + /** + * Sets the modules used by the search. + */ + void setModules( QList<CSwordModuleInfo*> modules ); + + /** Sets the modules when user selects them from the combobox.*/ + void moduleListTextSelected(int index); + + /** + * Reimplementation. + */ + void aboutToShow(); + /** + * Refreshes the list of ranges and the range combobox. + */ + void refreshRanges(); + /** + * Opens the modules chooser dialog. + */ + void chooseModules(); + + protected slots: + void setupRanges(); + void syntaxHelp(); + void slotSearchTextEditReturnPressed(); + void slotValidateText(const QString& newText); + + signals: + void sigSetSearchButtonStatus(bool); + void sigStartSearch(); + + private: + QList<CSwordModuleInfo*> m_modules; + + QHBoxLayout *hboxLayout; + QGroupBox *searchGroupBox; + QGridLayout *gridLayout; + QLabel *m_searchTextLabel; + QPushButton* m_searchButton; + QLabel* m_helpLabel; + QRadioButton* m_typeAndButton; + QRadioButton* m_typeOrButton; + QRadioButton* m_typeFreeButton; + QPushButton *m_chooseModulesButton; + QPushButton *m_chooseRangeButton; + QLabel *m_searchScopeLabel; + QComboBox *m_rangeChooserCombo; + CHistoryComboBox *m_searchTextCombo; + QLabel *m_modulesLabel; + QComboBox* m_modulesCombo; }; |