BibleTime
csearchresultview.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-2021 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 "../../backend/cswordmodulesearch.h"
18 
19 
20 class CSwordModuleInfo;
21 class CReadDisplay;
22 class QAction;
23 class QMenu;
24 
25 namespace Search {
26 
28  Q_OBJECT
29  public:
30  CSearchResultView(QWidget* parent);
31 
32  /**
33  \returns the module which is currently used.
34  */
35  CSwordModuleInfo const * module() const { return m_module; }
36 
37  protected: // methods:
38  /**
39  * Initializes the view of this widget.
40  */
41  void initView();
42  void initConnections();
43 
44  //from QTreeWidget
45  QMimeData *
46  #if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
47  mimeData(QList<QTreeWidgetItem *> const items) const override;
48  #else
49  mimeData(QList<QTreeWidgetItem *> const & items) const override;
50  #endif
51  QStringList mimeTypes () const override;
52 
53  public Q_SLOTS:
54 
55  /**
56  Setups the list with the given module.
57  */
58  void setupTree(CSwordModuleInfo const * m,
59  CSwordModuleSearch::ModuleResultList const & results);
60 
61  void setupStrongsTree(CSwordModuleInfo*, const QStringList&);
62 
63  void contextMenuEvent(QContextMenuEvent* event) override;
64 
65  private:
66  struct {
68  struct {
71  }
73 
75  struct {
76  QAction* result;
77  }
79 
81  struct {
82  QAction* result;
84  }
86  }
88 
91 
92  Q_SIGNALS:
93  void keySelected(const QString&);
94  void keyDeselected();
95 };
96 
97 } //end of namespace Search
void contextMenuEvent(QContextMenuEvent *event) override
void setupStrongsTree(CSwordModuleInfo *, const QStringList &)
CSwordModuleInfo const * module() const
CSearchResultView(QWidget *parent)
struct Search::CSearchResultView::@13::@16 copy
struct Search::CSearchResultView::@13::@14 save
void keySelected(const QString &)
QStringList mimeTypes() const override
void setupTree(CSwordModuleInfo const *m, CSwordModuleSearch::ModuleResultList const &results)
const CSwordModuleInfo * m_module
struct Search::CSearchResultView::@13::@15 print
QMimeData * mimeData(QList< QTreeWidgetItem * > const &items) const override
struct Search::CSearchResultView::@13 m_actions
std::vector< std::shared_ptr< sword::SWKey const > > ModuleResultList