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 CHTMLWRITEDISPLAY_H
13
#define CHTMLWRITEDISPLAY_H
16
#include "cplainwritedisplay.h"
20
#include <qtextedit.h>
28
class KFontSizeAction;
32
/** The WYSIWYG implementation of the write display interface.
33
* @author The BibleTime team
35
class CHTMLWriteDisplay : public CPlainWriteDisplay {
39
* Sets the new text for this display widget.
41
virtual void setText( const QString& newText );
43
* Returns the text of this edit widget.
45
virtual const QString plainText();
48
* Creates the necessary action objects and puts them on the toolbar.
50
virtual void setupToolbar(KToolBar * bar, KActionCollection * actionCollection);
53
friend class CDisplay;
54
CHTMLWriteDisplay(CWriteWindow* parentWindow, QWidget* parent);
57
* Reimplementation to show a popup menu if the right mouse butoon was clicked.
59
virtual QPopupMenu* createPopupMenu( const QPoint& pos );
64
void toggleUnderline();
70
void slotFontChanged( const QFont& );
72
* The text's alignment changed. Enable the right buttons.
74
void slotAlignmentChanged( int );
76
* Is called when a new color was selected.
78
void slotColorSelected( const QColor& );
80
* Is called when a text with another color was selected.
82
void slotColorChanged( const QColor& );
87
KToggleAction* italic;
88
KToggleAction* underline;
90
KToggleAction* alignLeft;
91
KToggleAction* alignCenter;
92
KToggleAction* alignRight;
94
KFontAction* fontChooser;
95
KFontSizeAction* fontSizeChooser;
101
KColorButton* m_colorButton;