Diffstat (limited to 'pwmanager/pwmanager/commentbox.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | pwmanager/pwmanager/commentbox.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pwmanager/pwmanager/commentbox.h b/pwmanager/pwmanager/commentbox.h index 3103353..d14ba13 100644 --- a/pwmanager/pwmanager/commentbox.h +++ b/pwmanager/pwmanager/commentbox.h @@ -1,124 +1,124 @@ /*************************************************************************** * * * copyright (C) 2004 by Michael Buesch * * email: mbuesch@freenet.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License version 2 * * as published by the Free Software Foundation. * * * ***************************************************************************/ /*************************************************************************** * copyright (C) 2004 by Ulf Schenk * This file is originaly based on version 1.0.1 of pwmanager * and was modified to run on embedded devices that run microkde * * $Id$ **************************************************************************/ #ifndef COMMENTBOX_H #define COMMENTBOX_H #include <qstring.h> #include <qsize.h> class QWidget; -class QTextEdit; +class Q3TextEdit; class KHTMLPart; #ifndef PWM_EMBEDDED class CommentBox { protected: enum commentBoxMode { mode_notSet = 0, mode_text, mode_html }; public: CommentBox(QWidget *_parentWidget); ~CommentBox(); /** clear all data in the comment box */ void clear(); /** show the comment box */ void show(); /** hide the comment box */ void hide(); /** resize the comment box */ void resize(const QSize &size); void resize(int w, int h) { resize(QSize(w, h)); } /** get the size of the comment box */ QSize size(); /** if neccessary switch to text-mode and * insert this text into the comment box */ void setText(const QString &text); /** get the text of the comment box. * If it's not in text-mode it returns false */ bool getText(QString *text); /** if neccessary switch to HTML-mode and * insert this html code into the comment box */ void setHtml(QString code); /** checks "dta" for its type, sets the correct * mode and writes "dta" to the comment box */ void setContent(const QString &dta); protected: /** switch the current mode */ void switchTo(commentBoxMode newMode); /** clear all text data */ void clearText(); /** clear all HTML data */ void clearHtml(); protected: /** parent widget for this comment box */ QWidget *parentWidget; /** current comment box usage type */ commentBoxMode mode; /** if the comment box is a normal textbox, data is stored here */ - QTextEdit *textDta; + Q3TextEdit *textDta; /** if the comment box is a HTML box, data is stored here */ KHTMLPart *htmlDta; }; #else -#include <qtextbrowser.h> +#include <q3textbrowser.h> /** Implementation of the advanced HTML comment box */ //US ENH: CommentBox must be derived from QWidget, to allow the splitter to set a initial size // without conflicting with the two display modes -class CommentBox : public QTextBrowser +class CommentBox : public Q3TextBrowser { public: CommentBox(QWidget *_parentWidget); ~CommentBox(); /** clear all data in the comment box */ void clear(); /** if neccessary switch to text-mode and * insert this text into the comment box */ void setText(const QString &text); /** get the text of the comment box. * If it's not in text-mode it returns false */ bool getText(QString *text); /** if neccessary switch to HTML-mode and * insert this html code into the comment box */ void setContent(const QString &dta); }; #endif #endif |