32 QVBoxLayout *mainLayout =
new QVBoxLayout(
this);
33 mainLayout->setContentsMargins(5, 5, 5, 5);
34 mainLayout->setSpacing(2);
38 QSizePolicy::Preferred);
43 QFormLayout *formLayout =
new QFormLayout;
44 formLayout->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow);
46 static constexpr auto const toLexModule =
49#define STANDARD_WORKS_TAB_ADD_ROW(fname,...) \
51 m_ ## fname ## Label = new QLabel(this); \
52 m_ ## fname ## Combo = new QComboBox(this); \
53 formLayout->addRow(m_ ## fname ## Label, m_ ## fname ## Combo); \
54 auto const * const defaultModule = \
55 btConfig().getDefaultSwordModuleByType(#fname); \
56 for (auto const * const m : CSwordBackend::instance().moduleList()) { \
57 if (m->type() == CSwordModuleInfo::__VA_ARGS__) { \
59 if (auto description = \
60 m->config(CSwordModuleInfo::Description); \
61 !description.isEmpty()) \
65 "module name: module description").arg( \
67 std::move(description)); \
69 itemText = m->name(); \
72 QVariant::fromValue( \
73 const_cast<void *>(static_cast<void const *>(m))); \
74 m_ ## fname ## Combo->addItem(std::move(itemText), \
75 std::move(itemData)); \
76 if (m == defaultModule) \
77 m_ ## fname ## Combo->setCurrentIndex( \
78 m_ ## fname ## Combo->count() - 1); \
90 && toLexModule(m)->hasStrongsKeys())
92 && toLexModule(m)->hasStrongsKeys())
96 standardDailyDevotional,
100 standardHebrewStrongsLexicon,
103 && toLexModule(m)->hasStrongsKeys());
105 standardGreekStrongsLexicon,
108 && toLexModule(m)->hasStrongsKeys());
110 standardHebrewMorphLexicon,
113 standardGreekMorphLexicon,
115#undef STANDARD_WORKS_TAB_ADD_ROW
117 mainLayout->addLayout(formLayout);
118 mainLayout->addStretch();
143 tr(
"Standard works are used when no particular work is specified, for "
144 "example when a hyperlink into a Bible or lexicon was clicked."));
146 m_standardBibleLabel->setText(tr(
"Bible:"));
147 m_standardBibleCombo->setToolTip(
148 tr(
"The standard Bible is used when a hyperlink into a Bible "
151 m_standardCommentaryLabel->setText(tr(
"Commentary:"));
152 m_standardCommentaryCombo->setToolTip(
153 tr(
"The standard commentary is used when a hyperlink into a "
154 "commentary is clicked"));
156 m_standardLexiconLabel->setText(tr(
"Lexicon:"));
157 m_standardLexiconCombo->setToolTip(
158 tr(
"The standard lexicon is used when a hyperlink into a "
159 "lexicon is clicked"));
161 m_standardDailyDevotionalLabel->setText(tr(
"Daily devotional:"));
162 m_standardDailyDevotionalCombo->setToolTip(
163 tr(
"The standard devotional will be used to display a short "
164 "start up devotional"));
166 m_standardHebrewStrongsLexiconLabel->setText(
167 tr(
"Hebrew Strong's lexicon:"));
168 m_standardHebrewStrongsLexiconCombo->setToolTip(
169 tr(
"The standard Hebrew lexicon is used when a hyperlink into "
170 "a Hebrew lexicon is clicked"));
172 m_standardGreekStrongsLexiconLabel->setText(tr(
"Greek Strong's lexicon:"));
173 m_standardGreekStrongsLexiconCombo->setToolTip(
174 tr(
"The standard Greek lexicon is used when a hyperlink into a "
175 "Greek lexicon is clicked"));
177 m_standardHebrewMorphLexiconLabel->setText(
178 tr(
"Hebrew morphological lexicon:"));
179 m_standardHebrewMorphLexiconCombo->setToolTip(
180 tr(
"The standard morphological lexicon for Hebrew texts is "
181 "used when a hyperlink of a morphological tag in a Hebrew "
184 m_standardGreekMorphLexiconLabel->setText(
185 tr(
"Greek morphological lexicon:"));
186 m_standardGreekMorphLexiconCombo->setToolTip(
187 tr(
"The standard morphological lexicon for Greek texts is used "
188 "when a hyperlink of a morphological tag in a Greek text is "