Diffstat (limited to 'pwmanager/pwmanager/pwmview.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | pwmanager/pwmanager/pwmview.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/pwmanager/pwmanager/pwmview.h b/pwmanager/pwmanager/pwmview.h index e42b17a..8f60063 100644 --- a/pwmanager/pwmanager/pwmview.h +++ b/pwmanager/pwmanager/pwmview.h | |||
@@ -32,25 +32,29 @@ | |||
32 | 32 | ||
33 | #include "listviewpwm.h" | 33 | #include "listviewpwm.h" |
34 | #include "pwmdoc.h" | 34 | #include "pwmdoc.h" |
35 | #include "pwmviewstyle.h" | 35 | #include "pwmviewstyle.h" |
36 | 36 | ||
37 | #include <kconfig.h> | 37 | #include <kconfig.h> |
38 | #include <klocale.h> | 38 | #include <klocale.h> |
39 | #include <kdialogbase.h> | 39 | #include <kdialogbase.h> |
40 | 40 | ||
41 | #include <qevent.h> | 41 | #include <qevent.h> |
42 | #include <qfont.h> | 42 | #include <qfont.h> |
43 | #include <qobject.h> | 43 | #include <qobject.h> |
44 | #include <qtextbrowser.h> | 44 | #include <q3textbrowser.h> |
45 | //Added by qt3to4: | ||
46 | #include <QResizeEvent> | ||
47 | #include <QKeyEvent> | ||
48 | #include <Q3PopupMenu> | ||
45 | 49 | ||
46 | #include <vector> | 50 | #include <vector> |
47 | #include <string> | 51 | #include <string> |
48 | 52 | ||
49 | using std::string; | 53 | using std::string; |
50 | using std::vector; | 54 | using std::vector; |
51 | 55 | ||
52 | class PwM; | 56 | class PwM; |
53 | class ConfFile; | 57 | class ConfFile; |
54 | class PwMStatusBar; | 58 | class PwMStatusBar; |
55 | 59 | ||
56 | 60 | ||
@@ -68,72 +72,72 @@ public: | |||
68 | 72 | ||
69 | /** returns pointer to the document */ | 73 | /** returns pointer to the document */ |
70 | PwMDoc* document() | 74 | PwMDoc* document() |
71 | { return doc; } | 75 | { return doc; } |
72 | /** returns the index of the currently selected entry. | 76 | /** returns the index of the currently selected entry. |
73 | * (index as represented in PwMDoc !) | 77 | * (index as represented in PwMDoc !) |
74 | */ | 78 | */ |
75 | bool getCurEntryIndex(unsigned int *index); | 79 | bool getCurEntryIndex(unsigned int *index); |
76 | /** returns the position of the given item in the document | 80 | /** returns the position of the given item in the document |
77 | * Note: This func only serches in the current category. | 81 | * Note: This func only serches in the current category. |
78 | */ | 82 | */ |
79 | bool getDocEntryIndex(unsigned int *index, | 83 | bool getDocEntryIndex(unsigned int *index, |
80 | const QListViewItem *item); | 84 | const Q3ListViewItem *item); |
81 | 85 | ||
82 | public slots: | 86 | public slots: |
83 | /** update the view (call if dirty) */ | 87 | /** update the view (call if dirty) */ |
84 | void updateView() | 88 | void updateView() |
85 | { | 89 | { |
86 | updateCategories(); | 90 | updateCategories(); |
87 | shiftToView(); | 91 | shiftToView(); |
88 | } | 92 | } |
89 | /** (re)sort all items and (re)shift them to listView. */ | 93 | /** (re)sort all items and (re)shift them to listView. */ |
90 | void shiftToView(); | 94 | void shiftToView(); |
91 | /** handle clicking on an item */ | 95 | /** handle clicking on an item */ |
92 | void handleToggle(QListViewItem *item); | 96 | void handleToggle(Q3ListViewItem *item); |
93 | /** handle right-clicking on an item */ | 97 | /** handle right-clicking on an item */ |
94 | void handleRightClick(QListViewItem *item, const QPoint &point, int); | 98 | void handleRightClick(Q3ListViewItem *item, const QPoint &point, int); |
95 | /** selects the item at "index" */ | 99 | /** selects the item at "index" */ |
96 | void selAt(int index); | 100 | void selAt(int index); |
97 | /** rename category button pressed */ | 101 | /** rename category button pressed */ |
98 | void renCatButton_slot(); | 102 | void renCatButton_slot(); |
99 | /** delete category button pressed */ | 103 | /** delete category button pressed */ |
100 | void delCatButton_slot(); | 104 | void delCatButton_slot(); |
101 | 105 | ||
102 | protected: | 106 | protected: |
103 | /** right-click context-menu */ | 107 | /** right-click context-menu */ |
104 | QPopupMenu *ctxMenu; | 108 | Q3PopupMenu *ctxMenu; |
105 | 109 | ||
106 | protected: | 110 | protected: |
107 | /** update the categories from document */ | 111 | /** update the categories from document */ |
108 | void updateCategories(); | 112 | void updateCategories(); |
109 | /** widget resize event */ | 113 | /** widget resize event */ |
110 | void resizeEvent(QResizeEvent *); | 114 | void resizeEvent(QResizeEvent *); |
111 | /** initialize context-menu */ | 115 | /** initialize context-menu */ |
112 | void initCtxMenu(); | 116 | void initCtxMenu(); |
113 | /** tempoarly disable auto-sorting and user-sorting */ | 117 | /** tempoarly disable auto-sorting and user-sorting */ |
114 | void tmpDisableSort() | 118 | void tmpDisableSort() |
115 | { lv->setSorting(-1); } | 119 | { lv->setSorting(-1); } |
116 | /** re-enable tempoarly disabled sorting */ | 120 | /** re-enable tempoarly disabled sorting */ |
117 | void tmpReEnableSort() | 121 | void tmpReEnableSort() |
118 | { | 122 | { |
119 | lv->setSorting(lv->columns() + 1, | 123 | lv->setSorting(lv->columns() + 1, |
120 | true/*lv->sortOrder() == Qt::Ascending*/); | 124 | true/*lv->sortOrder() == Qt::Ascending*/); |
121 | } | 125 | } |
122 | /** The user pressed and released a key. */ | 126 | /** The user pressed and released a key. */ |
123 | void keyReleaseEvent(QKeyEvent *e); | 127 | void keyReleaseEvent(QKeyEvent *e); |
124 | 128 | ||
125 | protected slots: | 129 | protected slots: |
126 | /** changes the comment text-edit, because a new item has been selected */ | 130 | /** changes the comment text-edit, because a new item has been selected */ |
127 | void refreshCommentTextEdit(QListViewItem *curItem); | 131 | void refreshCommentTextEdit(Q3ListViewItem *curItem); |
128 | /** copy pw to clipboard */ | 132 | /** copy pw to clipboard */ |
129 | void copyPwToClip(); | 133 | void copyPwToClip(); |
130 | /** copy name to clipboard */ | 134 | /** copy name to clipboard */ |
131 | void copyNameToClip(); | 135 | void copyNameToClip(); |
132 | /** copy desc to clipboard */ | 136 | /** copy desc to clipboard */ |
133 | void copyDescToClip(); | 137 | void copyDescToClip(); |
134 | /** copy url to clipboard */ | 138 | /** copy url to clipboard */ |
135 | void copyUrlToClip(); | 139 | void copyUrlToClip(); |
136 | /** copy launcher to clipboard */ | 140 | /** copy launcher to clipboard */ |
137 | void copyLauncherToClip(); | 141 | void copyLauncherToClip(); |
138 | /** copy comment to clipboard */ | 142 | /** copy comment to clipboard */ |
139 | void copyCommentToClip(); | 143 | void copyCommentToClip(); |
@@ -143,25 +147,25 @@ protected slots: | |||
143 | void reorgLp(); | 147 | void reorgLp(); |
144 | 148 | ||
145 | private: | 149 | private: |
146 | /** document */ | 150 | /** document */ |
147 | PwMDoc *doc; | 151 | PwMDoc *doc; |
148 | /** pointer to the main class "PwM" */ | 152 | /** pointer to the main class "PwM" */ |
149 | PwM *mainClass; | 153 | PwM *mainClass; |
150 | }; | 154 | }; |
151 | 155 | ||
152 | 156 | ||
153 | //US ENH basic widget to view an password entry. We need it for the sync stuff. | 157 | //US ENH basic widget to view an password entry. We need it for the sync stuff. |
154 | //But might be oif interest for other functionalities as well. | 158 | //But might be oif interest for other functionalities as well. |
155 | class PwMDataItemView : public QTextBrowser | 159 | class PwMDataItemView : public Q3TextBrowser |
156 | { | 160 | { |
157 | public: | 161 | public: |
158 | PwMDataItemView( QWidget *parent = 0, const char *name = 0 ); | 162 | PwMDataItemView( QWidget *parent = 0, const char *name = 0 ); |
159 | 163 | ||
160 | /** | 164 | /** |
161 | Sets the PwMDataItem object. It is displayed immediately. | 165 | Sets the PwMDataItem object. It is displayed immediately. |
162 | 166 | ||
163 | @param a The PwMDataItem object. | 167 | @param a The PwMDataItem object. |
164 | */ | 168 | */ |
165 | void setPwMDataItem( const PwMDataItem& a ); | 169 | void setPwMDataItem( const PwMDataItem& a ); |
166 | 170 | ||
167 | /** | 171 | /** |