Diffstat (limited to 'pwmanager/pwmanager/commentbox.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | pwmanager/pwmanager/commentbox.h | 40 |
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 @@ | |||
22 | 22 | ||
23 | #include <qstring.h> | 23 | #include <qstring.h> |
24 | #include <qsize.h> | 24 | #include <qsize.h> |
25 | |||
26 | class QWidget; | 25 | class QWidget; |
27 | class QTextEdit; | 26 | class QTextEdit; |
28 | class QMultiLineEdit; | ||
29 | class KHTMLPart; | 27 | class KHTMLPart; |
30 | 28 | ||
31 | /** Implementation of the advanced HTML comment box */ | 29 | #ifndef PWM_EMBEDDED |
32 | class CommentBox | 30 | |
31 | class CommentBox | ||
33 | { | 32 | { |
34 | protected: | 33 | protected: |
35 | enum commentBoxMode | 34 | enum commentBoxMode |
@@ -85,16 +84,41 @@ protected: | |||
85 | QWidget *parentWidget; | 84 | QWidget *parentWidget; |
86 | /** current comment box usage type */ | 85 | /** current comment box usage type */ |
87 | commentBoxMode mode; | 86 | commentBoxMode mode; |
88 | #ifndef PWM_EMBEDDED | ||
89 | /** if the comment box is a normal textbox, data is stored here */ | 87 | /** if the comment box is a normal textbox, data is stored here */ |
90 | QTextEdit *textDta; | 88 | QTextEdit *textDta; |
91 | /** if the comment box is a HTML box, data is stored here */ | 89 | /** if the comment box is a HTML box, data is stored here */ |
92 | KHTMLPart *htmlDta; | 90 | KHTMLPart *htmlDta; |
91 | }; | ||
92 | |||
93 | #else | 93 | #else |
94 | /** if the comment box is a normal textbox, data is stored here */ | 94 | #include <qmultilineedit.h> |
95 | QMultiLineEdit *textDta; | 95 | /** Implementation of the advanced HTML comment box */ |
96 | #endif | 96 | //US ENH: CommentBox must be derived from QWidget, to allow the splitter to set a initial size |
97 | // without conflicting with the two display modes | ||
98 | |||
99 | class CommentBox : public QMultiLineEdit | ||
100 | { | ||
101 | public: | ||
102 | CommentBox(QWidget *_parentWidget); | ||
103 | ~CommentBox(); | ||
104 | |||
105 | /** clear all data in the comment box */ | ||
106 | void clear(); | ||
107 | /** if neccessary switch to text-mode and | ||
108 | * insert this text into the comment box | ||
109 | */ | ||
110 | void setText(const QString &text); | ||
111 | /** get the text of the comment box. | ||
112 | * If it's not in text-mode it returns false | ||
113 | */ | ||
114 | bool getText(QString *text); | ||
115 | /** if neccessary switch to HTML-mode and | ||
116 | * insert this html code into the comment box | ||
117 | */ | ||
118 | void setContent(const QString &dta); | ||
97 | 119 | ||
98 | }; | 120 | }; |
121 | #endif | ||
122 | |||
99 | 123 | ||
100 | #endif | 124 | #endif |