~vcs-imports/bibletime/trunk

« back to all changes in this revision

Viewing changes to bibletime/frontend/searchdialog/csearchresultview.h

  • Committer: mgruner
  • Date: 2007-05-08 15:51:07 UTC
  • Revision ID: vcs-imports@canonical.com-20070508155107-0rj7jdmm5ivf8685
-imported source and data files to new svn module
-this is where KDE4-based development will take place

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*********
 
2
*
 
3
* This file is part of BibleTime's source code, http://www.bibletime.info/.
 
4
*
 
5
* Copyright 1999-2006 by the BibleTime developers.
 
6
* The BibleTime source code is licensed under the GNU General Public License version 2.0.
 
7
*
 
8
**********/
 
9
 
 
10
 
 
11
 
 
12
#ifndef CSEARCHRESULTSVIEW_H
 
13
#define CSEARCHRESULTSVIEW_H
 
14
 
 
15
//BibleTime includes
 
16
#include "backend/cswordmoduleinfo.h"
 
17
 
 
18
//KDE includes
 
19
#include <klistview.h>
 
20
 
 
21
//forward declarations
 
22
class QLabel;
 
23
class QCheckBox;
 
24
class QPushButton;
 
25
class QRadioButton;
 
26
 
 
27
class KComboBox;
 
28
class KActionMenu;
 
29
class KAction;
 
30
class KHistoryCombo;
 
31
class KProgress;
 
32
class KPopupMenu;
 
33
 
 
34
class CReadDisplay;
 
35
 
 
36
namespace Search {
 
37
        namespace Result {
 
38
 
 
39
class CSearchResultView  : public KListView {
 
40
        Q_OBJECT
 
41
public:
 
42
        CSearchResultView(QWidget* parent, const char* name = 0);
 
43
        virtual ~CSearchResultView();
 
44
        /** Returns the module which is currently used. */
 
45
        CSwordModuleInfo* const module();
 
46
 
 
47
protected: // Protected methods
 
48
        /**
 
49
        * Initializes the view of this widget.
 
50
        */
 
51
        void initView();
 
52
        void initConnections();
 
53
        virtual QDragObject* dragObject();
 
54
 
 
55
public slots: // Public slots
 
56
        void saveItems();
 
57
        /**
 
58
        * Setups the list with the given module.
 
59
        */
 
60
        void setupTree(CSwordModuleInfo*);
 
61
   void setupStrongsTree(CSwordModuleInfo*, QStringList*);
 
62
        void copyItemsWithText();
 
63
        void copyItems();
 
64
        void saveItemsWithText();
 
65
        /**
 
66
        * Reimplementation to show the popup menu.
 
67
        */
 
68
        virtual void showPopup(KListView*, QListViewItem* i, const QPoint& point);
 
69
 
 
70
protected slots: // Protected slots
 
71
        void printItems();
 
72
        /**
 
73
        * Is connected to the signal executed, which is emitted when a mew item was chosen.
 
74
        */
 
75
        void executed(QListViewItem*);
 
76
 
 
77
private:
 
78
        struct {
 
79
                KActionMenu* saveMenu;
 
80
                struct {
 
81
                        KAction* result;
 
82
                        KAction* resultWithText;
 
83
                }
 
84
                save;
 
85
 
 
86
                KActionMenu* printMenu;
 
87
                struct {
 
88
                        KAction* result;
 
89
                }
 
90
                print;
 
91
 
 
92
                KActionMenu* copyMenu;
 
93
                struct {
 
94
                        KAction* result;
 
95
                        KAction* resultWithText;
 
96
                }
 
97
                copy;
 
98
        }
 
99
        m_actions;
 
100
        
 
101
        KPopupMenu* m_popup;
 
102
        CSwordModuleInfo* m_module;
 
103
 
 
104
signals: // Signals
 
105
        void keySelected(const QString&);
 
106
};
 
107
 
 
108
        } //end of namespace Result
 
109
} //end of namespace Search
 
110
 
 
111
#endif
 
112