~vcs-imports/bibletime/trunk

« back to all changes in this revision

Viewing changes to bibletime/bibletimeinterface.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 BIBLETIME_INTERFACE_H
 
13
#define BIBLETIME_INTERFACE_H
 
14
 
 
15
//Qt includes
 
16
#include <qstring.h>
 
17
#include <qstringlist.h>
 
18
 
 
19
//KDE includes
 
20
#include <dcopobject.h>
 
21
#include <kmainwindowiface.h>
 
22
 
 
23
/** DCOP interface definition for BibleTime.
 
24
* This is the interface definition for BibleTime's DCOP client interface. The main window class "BibleTime"
 
25
* inherits from this class and re-implements these pure virtual functions.
 
26
* It uses virtual inheritance so that a widget which inherits twice from DCOPObject does not get mixed up.
 
27
* This file is turned into bibletimeinterface_skel.cpp by the KDE automake system.
 
28
*
 
29
* @author Joachim Ansorg
 
30
*/
 
31
class BibleTimeInterface : virtual public DCOPObject {
 
32
        //This K_DCOP line is required so that the k_dcop: and void are processed.
 
33
        K_DCOP
 
34
 
 
35
public:
 
36
BibleTimeInterface(QCString id) : DCOPObject(id) {}
 
37
 
 
38
k_dcop:
 
39
        /** Sync all open Bible windows to the key.
 
40
        * @param key The key which is set to all Bible windows.
 
41
        */
 
42
        virtual void syncAllBibles(const QString& key) = 0;
 
43
        /** Sync all open commentary windows to the key.
 
44
        * @param key The key which is set to all Commentary windows.
 
45
        */
 
46
        virtual void syncAllCommentaries(const QString& key) = 0;
 
47
        /** Sync all open lexicon windows to the key.
 
48
        * @param key The key which is set to all Lexicon windows.
 
49
        */
 
50
        virtual void syncAllLexicons(const QString& key) = 0;
 
51
        /** Sync all open verse based (i.e. Bibles and commentaries) windows to the key.
 
52
        * @param key The key which is set to all Bible and Commentary windows.
 
53
        */
 
54
        virtual void syncAllVerseBasedModules(const QString& key) = 0;
 
55
        /** Reload all modules
 
56
        */
 
57
        virtual void reloadModules() = 0;
 
58
        /** Open a new read window for the module moduleName using the given key
 
59
        * @param moduleName The name of the module which is opened in a new module window.
 
60
        * @param key The key to set to the newly opened window.
 
61
        */
 
62
        virtual void openWindow(const QString& moduleName, const QString& key) = 0;
 
63
        /** Open a new read window for the default Bible module using the given key
 
64
        * @param key The key to set to the newly opened window.
 
65
        */
 
66
        virtual void openDefaultBible(const QString& key) = 0;
 
67
        /** Close all open windows.
 
68
        */
 
69
        virtual void closeAllModuleWindows() = 0;
 
70
        /** Returns the reference used in the current window.
 
71
        * The format of the returned reference is
 
72
        *       [Module] [Type] OSIS_Reference,
 
73
        * wtih type one of BIBLE/COMMENTARY/BOOK/LEXICON/UNSUPPORTED
 
74
        * If the type is BIBLE or COMMENTARY the reference is an OSIS ref
 
75
        * in the other cases it's the key name, for books /Chapter/Subsection
 
76
        * for Lexicons just the plain key, e.g. "ADAM".
 
77
        * e.g.
 
78
        *               [KJV] [BIBLE]   Gen.1.1
 
79
        *               [MHC] [COMMENTARY]  Gen.1.1
 
80
        *               [ISBE] [LEXICON]  REDEMPTION
 
81
        * @return The reference displayed in the currently active module window. Empty if none is active.
 
82
        */
 
83
        virtual QString getCurrentReference() = 0;
 
84
        /** Seach the searchText in the specified module.
 
85
        * @param moduleName The module to search in
 
86
        * @param searchText Search for this in the modules
 
87
        * @return The search result. It's in the format [modulename] osis_ref_of_the_found_key. For example "[KJV] Gen.1.1".
 
88
        */
 
89
        virtual QStringList searchInModule(const QString& moduleName, const QString& searchText) = 0;
 
90
        /** Search in all open modules and return the search result.
 
91
        * The result is in the same format as searchInModule
 
92
        * @param searchText Search for this in the modules
 
93
        * @return The search result for a searchin all opened module windows
 
94
        * @see searchInModule For the search result format.
 
95
        */
 
96
        virtual QStringList searchInOpenModules(const QString& searchText) = 0;
 
97
        /** Search in the default Bible module and return the search result.
 
98
        * The result is in the same format as searchInModule
 
99
        * @param searchText Search for this in the modules
 
100
        * @return The search result for a search in the default Bible
 
101
        * @see searchInModule
 
102
        */
 
103
        virtual QStringList searchInDefaultBible(const QString& searchText) = 0;
 
104
        /** Return a list of modules of the given type.
 
105
        * @param type One of BIBLES, COMMENTARIES, LEXICONS, BOOKS
 
106
        * @return The list of modules of the given type, may be empty
 
107
        */
 
108
        virtual QStringList getModulesOfType(const QString& type) = 0;
 
109
};
 
110
 
 
111
#endif