Diffstat (limited to 'pwmanager/pwmanager/advcommeditimpl.h') (more/less context) (show whitespace changes)
-rw-r--r-- | pwmanager/pwmanager/advcommeditimpl.h | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/pwmanager/pwmanager/advcommeditimpl.h b/pwmanager/pwmanager/advcommeditimpl.h new file mode 100644 index 0000000..67f3ac6 --- a/dev/null +++ b/pwmanager/pwmanager/advcommeditimpl.h | |||
@@ -0,0 +1,79 @@ | |||
1 | /*************************************************************************** | ||
2 | * * | ||
3 | * copyright (C) 2004 by Michael Buesch * | ||
4 | * email: mbuesch@freenet.de * | ||
5 | * * | ||
6 | * This program is free software; you can redistribute it and/or modify * | ||
7 | * it under the terms of the GNU General Public License version 2 * | ||
8 | * as published by the Free Software Foundation. * | ||
9 | * * | ||
10 | ***************************************************************************/ | ||
11 | |||
12 | /*************************************************************************** | ||
13 | * copyright (C) 2004 by Ulf Schenk | ||
14 | * This file is originaly based on version 1.0.1 of pwmanager | ||
15 | * and was modified to run on embedded devices that run microkde | ||
16 | * | ||
17 | * $Id$ | ||
18 | **************************************************************************/ | ||
19 | |||
20 | #ifndef ADVCOMMEDITIMPL_H | ||
21 | #define ADVCOMMEDITIMPL_H | ||
22 | |||
23 | #include <qlistbox.h> | ||
24 | |||
25 | #include "advcommedit.h" | ||
26 | |||
27 | class HtmlComment; | ||
28 | class KHTMLPart; | ||
29 | |||
30 | class AdvCommEditImpl : public advCommEdit | ||
31 | { | ||
32 | Q_OBJECT | ||
33 | public: | ||
34 | AdvCommEditImpl(QWidget* parent = 0, | ||
35 | const char* name = 0, | ||
36 | WFlags fl = 0); | ||
37 | ~AdvCommEditImpl(); | ||
38 | |||
39 | /** returns the HTML data for the comment */ | ||
40 | QString getHtmlDta(); | ||
41 | /** sets the HTML data, parses and displays it */ | ||
42 | void setHtmlDta(const QString &str); | ||
43 | |||
44 | public slots: | ||
45 | /** sync preview with dta */ | ||
46 | void updatePreview(); | ||
47 | /** ok button pressed */ | ||
48 | void okButton_slot(); | ||
49 | /** cancel button pressed */ | ||
50 | void cancelButton_slot(); | ||
51 | /** add subtbl button pressed */ | ||
52 | void addSubtblButton_slot(); | ||
53 | /** edit button pressed */ | ||
54 | void editButton_slot(); | ||
55 | /** delete button pressed */ | ||
56 | void delButton_slot(); | ||
57 | |||
58 | protected slots: | ||
59 | |||
60 | protected: | ||
61 | /** read the title from the line-edit and update dta */ | ||
62 | void updateTitle(); | ||
63 | /** returns the index of the currently selected entry */ | ||
64 | int curIndex() | ||
65 | #ifndef PWM_EMBEDDED | ||
66 | { return entryListBox->index(entryListBox->selectedItem()); } | ||
67 | #else | ||
68 | { return entryListBox->currentItem(); } | ||
69 | #endif | ||
70 | protected: | ||
71 | /** current internal representation structure | ||
72 | * of the comment | ||
73 | */ | ||
74 | HtmlComment *dta; | ||
75 | /** preview browser */ | ||
76 | KHTMLPart *preview; | ||
77 | }; | ||
78 | |||
79 | #endif | ||