145 setToolTip(tr(
"Works chosen for the search and the number of the hits in each work"));
146 setHeaderLabels( QStringList(tr(
"Work")) << tr(
"Hits") );
161 m_actions.copyMenu->setIcon(CResMgr::searchdialog::result::moduleList::copyMenu::icon());
165 if (auto * const m = activeModule())
166 CExportManager(true, tr(
"Copying search result"))
167 .copyKeyList(m_results[m],
169 CExportManager::Text,
173 m_actions.copy.resultWithText =
new QAction(tr(
"Reference with text"),
this);
176 if (auto * const m = activeModule())
177 CExportManager(true, tr(
"Copying search result"))
178 .copyKeyList(m_results[m],
180 CExportManager::Text,
187 m_actions.saveMenu->setIcon(CResMgr::searchdialog::result::moduleList::saveMenu::icon());
191 if (auto * const m = activeModule())
192 CExportManager(true, tr(
"Saving search result"))
193 .saveKeyList(m_results[m],
195 CExportManager::Text,
199 m_actions.save.resultWithText =
new QAction(tr(
"Reference with text"),
this);
202 if (auto * const m = activeModule())
203 CExportManager(true, tr(
"Saving search result"))
204 .saveKeyList(m_results[m],
206 CExportManager::Text,
213 m_actions.printMenu->setIcon(CResMgr::searchdialog::result::moduleList::printMenu::icon());
217 if (auto * const m = activeModule())
218 CExportManager(true, tr(
"Printing search result"))
219 .printKeyList(m_results[m],
221 btConfig().getDisplayOptions(),
222 btConfig().getFilterOptions());
236 const QString & searchedText)
244 bool strongsAvailable =
false;
246 for (
auto const &
result : results) {
247 auto const *
const m =
result.module;
250 QTreeWidgetItem *
const item =
251 new QTreeWidgetItem(
this,
252 QStringList(m->name())
253 << QString::number(
result.results.size()));
255 item->setIcon(0, m->moduleIcon());
263 int sstIndex = searchedText.indexOf(QStringLiteral(
"strong:"), 0);
264 if (sstIndex != -1) {
271 const int sTokenIndex = searchedText.indexOf(
' ', sstIndex);
272 const QString sNumber(searchedText.mid(sstIndex, sTokenIndex - sstIndex));
274 QList<StrongsResult> strongResultList;
275 populateStrongsResultList(strongResultList,
279 for (
auto const & strongResult : strongResultList)
282 QStringList{strongResult.keyText(),
283 QString::number(strongResult.keyCount())});
287 strongsAvailable =
true;
292 setRootIsDecorated( strongsAvailable );
QString renderSingleKey(const QString &key, const BtConstModuleList &modules, const KeyTreeItem::Settings &settings=KeyTreeItem::Settings())