BibleTime
cmoduleresultview.h
Go to the documentation of this file.
1/*********
2*
3* In the name of the Father, and of the Son, and of the Holy Spirit.
4*
5* This file is part of BibleTime's source code, https://bibletime.info/
6*
7* Copyright 1999-2025 by the BibleTime developers.
8* The BibleTime source code is licensed under the GNU General Public License
9* version 2.0.
10*
11**********/
12
13#pragma once
14
15#include <QTreeWidget>
16
17#include <QHash>
18#include <QObject>
19#include <QSize>
20#include <QString>
21#include <QStringList>
22#include "../../backend/cswordmodulesearch.h"
23#include "btsearchresultarea.h"
24
25
27class QAction;
28class QContextMenuEvent;
29class QMenu;
30class QWidget;
31
32namespace Search {
33
34class StrongsResultList;
35
37 Q_OBJECT
38 public:
41
42 /**
43 Setups the tree using the given list of modules.
44 */
45 void setupTree(const CSwordModuleSearch::Results &results,
46 const QString &searchedText);
47
48 /**
49 * Returns the currently active module.
50 */
52
53 QSize sizeHint() const override {
54 return m_size;
55 }
56
57 protected:
58 /**
59 * Initializes this widget.
60 */
61 void initView();
62 /**
63 * Initializes the connections of this widget
64 */
65 void initConnections();
66
67 protected Q_SLOTS:
68 /**
69 * Is executed when an item was selected in the list.
70 */
71 void executed(QTreeWidgetItem*, QTreeWidgetItem*);
72 /**
73 * This event handler (reimplemented from QWidget) opens the popup menu at the given position.
74 */
75 void contextMenuEvent( QContextMenuEvent * event ) override;
76
77 Q_SIGNALS:
81 void strongsSelected(CSwordModuleInfo*, const QStringList&);
82
83 private:
84 struct {
86 struct {
89 }
91
93 struct {
95 }
97
99 struct {
102 }
104
106
108
112 QSize m_size;
113};
114
115
116} //end of namespace Search
struct Search::CModuleResultView::@17 m_actions
CSwordModuleInfo * activeModule()
struct Search::CModuleResultView::@17::@20 copy
QSize sizeHint() const override
struct Search::CModuleResultView::@17::@18 save
void strongsSelected(CSwordModuleInfo *, const QStringList &)
void setupTree(const CSwordModuleSearch::Results &results, const QString &searchedText)
struct Search::CModuleResultView::@17::@19 print
QHash< CSwordModuleInfo const *, CSwordModuleSearch::ModuleResultList > m_results
void contextMenuEvent(QContextMenuEvent *event) override
QHash< CSwordModuleInfo const *, QList< StrongsResult > > m_strongsResults
void executed(QTreeWidgetItem *, QTreeWidgetItem *)
void moduleSelected(CSwordModuleInfo const *, CSwordModuleSearch::ModuleResultList const &)
std::vector< std::shared_ptr< sword::SWKey const > > ModuleResultList
std::vector< ModuleSearchResult > Results