~ubuntu-branches/ubuntu/jaunty/bibletime/jaunty

« back to all changes in this revision

Viewing changes to bibletime/frontend/displaywindow/cwritewindow.h

  • Committer: Bazaar Package Importer
  • Author(s): Ralph Janke
  • Date: 2008-05-10 15:18:16 UTC
  • mfrom: (1.1.6 upstream) (3.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080510151816-bqp8y1to705zd0fm
Tags: 1.6.5.1-1
* New upstream version (Closes: #441161, #271502)
* fixes for new autotools and gcc 4.3 (Closes: #407291)
* added poxml to Build-Depends
* No DFSG necessary anymore since biblestudy howto has 
  now Commons Licence 
* Added libclucene-dev to dev-depends (Closes: #436677)

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 CWRITEWINDOW_H
 
13
#define CWRITEWINDOW_H
 
14
 
 
15
//BibleTime includes
 
16
#include "frontend/display/cwritedisplay.h"
 
17
#include "cdisplaywindow.h"
 
18
 
 
19
//Qt includes
 
20
#include <qwidget.h>
 
21
 
 
22
/**The base class for all write-only display windows.
 
23
  *@author The BibleTime team
 
24
  */
 
25
 
 
26
class CWriteWindow : public CDisplayWindow  {
 
27
        Q_OBJECT
 
28
public:
 
29
        static void insertKeyboardActions( KActionCollection* const a );
 
30
 
 
31
        CWriteWindow(ListCSwordModuleInfo modules, CMDIArea* parent, const char *name=0);
 
32
        virtual ~CWriteWindow();
 
33
        /**
 
34
        * Store the settings of this window in the given CProfileWindow object.
 
35
        */
 
36
        virtual void storeProfileSettings(Profile::CProfileWindow * const settings);
 
37
        /**
 
38
        * Store the settings of this window in the given CProfileWindow object.
 
39
        */
 
40
        virtual void applyProfileSettings(Profile::CProfileWindow * const settings);
 
41
        /**
 
42
        * Returns the write display widget used by this window.
 
43
        */
 
44
        CWriteDisplay* const displayWidget();
 
45
        virtual void initConnections();
 
46
        virtual void initActions();
 
47
 
 
48
public slots:
 
49
        /**
 
50
        * Look up the given key and display the text. In our case we offer to edit the text.
 
51
        */
 
52
        virtual void lookup( CSwordKey* key );
 
53
 
 
54
 
 
55
protected: // Protected methods
 
56
        /**
 
57
        * Saves the given text as text of the given key. Use this function
 
58
        * as backend in each write window implementation.
 
59
        */
 
60
        void setDisplayWidget( CWriteDisplay* display );
 
61
        virtual const CDisplayWindow::WriteWindowType writeWindowType() = 0;
 
62
        virtual bool queryClose();
 
63
        virtual void saveCurrentText( const QString& key ) = 0;
 
64
 
 
65
protected slots:
 
66
        /** Save text to the module
 
67
        */
 
68
        void saveCurrentText() {
 
69
                if(key()) {
 
70
                        saveCurrentText(key()->key());
 
71
                };
 
72
        };
 
73
        virtual void beforeKeyChange(const QString&);
 
74
 
 
75
private:
 
76
        CWriteDisplay* m_writeDisplay;
 
77
};
 
78
 
 
79
#endif