66 if (searchKeyWord.isEmpty()) {
69 if (!m_keywordsInitialized) {
73 m_keywords << m_widget->windowTitle();
75 for (
const QLabel *label : m_widget->findChildren<QLabel *>())
76 m_keywords << label->text();
77 for (
const QCheckBox *checkbox : m_widget->findChildren<QCheckBox *>())
78 m_keywords << checkbox->text();
79 for (
const QRadioButton *checkbox : m_widget->findChildren<QRadioButton *>())
80 m_keywords << checkbox->text();
81 for (
const QPushButton *pushButton : m_widget->findChildren<QPushButton *>())
82 m_keywords << pushButton->text();
83 for (
const QGroupBox *groupBox : m_widget->findChildren<QGroupBox *>())
84 m_keywords << groupBox->title();
85 m_keywordsInitialized =
true;
87 for (
const QString &keyword : std::as_const(m_keywords))
88 if (keyword.contains(searchKeyWord, Qt::CaseInsensitive))
OptionPage(QWidget *parentWindow=nullptr)
Constructs a option page.
virtual void reset()=0
Discards altered settings and resets relevant widgets.
bool matches(const QString &searchKeyWord)
Returns whether the pages matches the specified searchKeyWord.
virtual QWidget * setupWidget()=0
Creates the widget for the page.
virtual ~OptionPage()
Destroys the option page.
QWidget * widget()
Returns the widget for the option page.