summaryrefslogtreecommitdiffabout
path: root/pwmanager/pwmanager/commentbox.h
Side-by-side diff
Diffstat (limited to 'pwmanager/pwmanager/commentbox.h') (more/less context) (ignore whitespace changes)
-rw-r--r--pwmanager/pwmanager/commentbox.h40
1 files changed, 32 insertions, 8 deletions
diff --git a/pwmanager/pwmanager/commentbox.h b/pwmanager/pwmanager/commentbox.h
index a220acd..352867c 100644
--- a/pwmanager/pwmanager/commentbox.h
+++ b/pwmanager/pwmanager/commentbox.h
@@ -22,14 +22,13 @@
#include <qstring.h>
#include <qsize.h>
-
class QWidget;
class QTextEdit;
-class QMultiLineEdit;
class KHTMLPart;
-/** Implementation of the advanced HTML comment box */
-class CommentBox
+#ifndef PWM_EMBEDDED
+
+class CommentBox
{
protected:
enum commentBoxMode
@@ -85,16 +84,41 @@ protected:
QWidget *parentWidget;
/** current comment box usage type */
commentBoxMode mode;
-#ifndef PWM_EMBEDDED
/** if the comment box is a normal textbox, data is stored here */
QTextEdit *textDta;
/** if the comment box is a HTML box, data is stored here */
KHTMLPart *htmlDta;
+};
+
#else
- /** if the comment box is a normal textbox, data is stored here */
- QMultiLineEdit *textDta;
-#endif
+#include <qmultilineedit.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 QMultiLineEdit
+{
+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