3
* This file is part of BibleTime's source code, http://www.bibletime.info/.
5
* Copyright 1999-2006 by the BibleTime developers.
6
* The BibleTime source code is licensed under the GNU General Public License version 2.0.
12
#ifndef CWRITEWINDOW_H
13
#define CWRITEWINDOW_H
16
#include "frontend/display/cwritedisplay.h"
17
#include "cdisplaywindow.h"
22
/**The base class for all write-only display windows.
23
*@author The BibleTime team
26
class CWriteWindow : public CDisplayWindow {
29
static void insertKeyboardActions( KActionCollection* const a );
31
CWriteWindow(ListCSwordModuleInfo modules, CMDIArea* parent, const char *name=0);
32
virtual ~CWriteWindow();
34
* Store the settings of this window in the given CProfileWindow object.
36
virtual void storeProfileSettings(Profile::CProfileWindow * const settings);
38
* Store the settings of this window in the given CProfileWindow object.
40
virtual void applyProfileSettings(Profile::CProfileWindow * const settings);
42
* Returns the write display widget used by this window.
44
CWriteDisplay* const displayWidget();
45
virtual void initConnections();
46
virtual void initActions();
50
* Look up the given key and display the text. In our case we offer to edit the text.
52
virtual void lookup( CSwordKey* key );
55
protected: // Protected methods
57
* Saves the given text as text of the given key. Use this function
58
* as backend in each write window implementation.
60
void setDisplayWidget( CWriteDisplay* display );
61
virtual const CDisplayWindow::WriteWindowType writeWindowType() = 0;
62
virtual bool queryClose();
63
virtual void saveCurrentText( const QString& key ) = 0;
66
/** Save text to the module
68
void saveCurrentText() {
70
saveCurrentText(key()->key());
73
virtual void beforeKeyChange(const QString&);
76
CWriteDisplay* m_writeDisplay;