summaryrefslogtreecommitdiffabout
path: root/pwmanager/pwmanager/commentbox.h
authorulf69 <ulf69>2004-09-29 23:57:50 (UTC)
committer ulf69 <ulf69>2004-09-29 23:57:50 (UTC)
commit1bcba53b99411b8af139c8c62d2a5b26ba4a4721 (patch) (side-by-side diff)
tree6bbe50d7df09e0da3cce98d34e0c2894155bf5a4 /pwmanager/pwmanager/commentbox.h
parent21e794339f8988d9c370bebec45f60f2918fb671 (diff)
downloadkdepimpi-1bcba53b99411b8af139c8c62d2a5b26ba4a4721.zip
kdepimpi-1bcba53b99411b8af139c8c62d2a5b26ba4a4721.tar.gz
kdepimpi-1bcba53b99411b8af139c8c62d2a5b26ba4a4721.tar.bz2
optimization of the commentview. Coordinates are now stored at programend
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