summaryrefslogtreecommitdiffabout
path: root/pwmanager/pwmanager/pwm.h
Unidiff
Diffstat (limited to 'pwmanager/pwmanager/pwm.h') (more/less context) (ignore whitespace changes)
-rw-r--r--pwmanager/pwmanager/pwm.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/pwmanager/pwmanager/pwm.h b/pwmanager/pwmanager/pwm.h
index c4bbb4e..450d13f 100644
--- a/pwmanager/pwmanager/pwm.h
+++ b/pwmanager/pwmanager/pwm.h
@@ -7,81 +7,86 @@
7 * it under the terms of the GNU General Public License version 2 * 7 * it under the terms of the GNU General Public License version 2 *
8 * as published by the Free Software Foundation. * 8 * as published by the Free Software Foundation. *
9 * * 9 * *
10 ***************************************************************************/ 10 ***************************************************************************/
11 11
12/*************************************************************************** 12/***************************************************************************
13 * copyright (C) 2004 by Ulf Schenk 13 * copyright (C) 2004 by Ulf Schenk
14 * This file is originaly based on version 1.0.1 of pwmanager 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 15 * and was modified to run on embedded devices that run microkde
16 * 16 *
17 * $Id$ 17 * $Id$
18 **************************************************************************/ 18 **************************************************************************/
19 19
20#ifndef __PWM_H 20#ifndef __PWM_H
21#define __PWM_H 21#define __PWM_H
22 22
23 23
24#include <kpopupmenu.h> 24#include <kpopupmenu.h>
25#include <klistview.h> 25#include <klistview.h>
26#include <kmainwindow.h> 26#include <kmainwindow.h>
27 27
28#ifndef PWM_EMBEDDED 28#ifndef PWM_EMBEDDED
29#include <kwin.h> 29#include <kwin.h>
30#include <kapp.h> 30#include <kapp.h>
31#include <kdeversion.h> 31#include <kdeversion.h>
32#else 32#else
33#include <ksyncmanager.h> 33#include <ksyncmanager.h>
34#endif 34#endif
35 35
36#include <kaction.h> 36#include <kaction.h>
37 37
38#include <qglobal.h> 38#include <qglobal.h>
39//Added by qt3to4:
40#include <QCloseEvent>
41#include <QFocusEvent>
42#include <Q3PopupMenu>
43#include <QHideEvent>
39 44
40#include "pwmview.h" 45#include "pwmview.h"
41#include "pwmexception.h" 46#include "pwmexception.h"
42 47
43 48
44/** timeout for displaying a message on the status-bar (in seconds) */ 49/** timeout for displaying a message on the status-bar (in seconds) */
45 #define STATUSBAR_MSG_TIMEOUT5 50 #define STATUSBAR_MSG_TIMEOUT5
46 51
47 52
48class PwMInit; 53class PwMInit;
49class KSyncManager; 54class KSyncManager;
50 55
51/** PwM is the base class of the project */ 56/** PwM is the base class of the project */
52#ifndef PWM_EMBEDDED 57#ifndef PWM_EMBEDDED
53//MOC_SKIP_BEGIN 58#ifndef Q_MOC_RUN
54class PwM : public KMainWindow 59class PwM : public KMainWindow
55//MOC_SKIP_END 60#endif
56#else 61#else
57class PwM : public KMainWindow, public KSyncInterface 62class PwM : public KMainWindow, public KSyncInterface
58#endif 63#endif
59{ 64{
60 Q_OBJECT 65 Q_OBJECT
61public: 66public:
62 friend class PwMView; 67 friend class PwMView;
63 /** construtor */ 68 /** construtor */
64 PwM(PwMInit *_init, PwMDoc *doc, 69 PwM(PwMInit *_init, PwMDoc *doc,
65 bool virginity = true, 70 bool virginity = true,
66 QWidget* parent = 0, const char *name = 0); 71 QWidget* parent = 0, const char *name = 0);
67 /** destructor */ 72 /** destructor */
68 ~PwM(); 73 ~PwM();
69 74
70 /** copy some text to the global clipboard */ 75 /** copy some text to the global clipboard */
71 static void copyToClipboard(const QString &s); 76 static void copyToClipboard(const QString &s);
72 77
73 /** returns pointer to the view */ 78 /** returns pointer to the view */
74 PwMView * curView() 79 PwMView * curView()
75 { return view; } 80 { return view; }
76 /** returns pointer to the currently using document. */ 81 /** returns pointer to the currently using document. */
77 PwMDoc * curDoc() 82 PwMDoc * curDoc()
78 { return curView()->document(); } 83 { return curView()->document(); }
79 /** open a new doc with the given filename */ 84 /** open a new doc with the given filename */
80 PwMDoc * openDoc(QString filename, bool openDeepLocked = false); 85 PwMDoc * openDoc(QString filename, bool openDeepLocked = false);
81 /** show a message on the global status bar. 86 /** show a message on the global status bar.
82 * The message times out after some seconds. 87 * The message times out after some seconds.
83 */ 88 */
84 void showStatMsg(const QString &msg); 89 void showStatMsg(const QString &msg);
85 /** ask the user where to save the doc (if it has not been saved, yet) 90 /** ask the user where to save the doc (if it has not been saved, yet)
86 * and write the data to disk. 91 * and write the data to disk.
87 */ 92 */
@@ -255,46 +260,46 @@ protected:
255 /** "manage" popup-menu */ 260 /** "manage" popup-menu */
256 KPopupMenu *managePopup; 261 KPopupMenu *managePopup;
257#ifdef CONFIG_KEYCARD 262#ifdef CONFIG_KEYCARD
258 /** "chipcard" popup-menu */ 263 /** "chipcard" popup-menu */
259 KPopupMenu *chipcardPopup; 264 KPopupMenu *chipcardPopup;
260#endif // CONFIG_KEYCARD 265#endif // CONFIG_KEYCARD
261 /** "view" popup-menu */ 266 /** "view" popup-menu */
262 KPopupMenu *viewPopup; 267 KPopupMenu *viewPopup;
263 /** "options" popup-menu */ 268 /** "options" popup-menu */
264 KPopupMenu *optionsPopup; 269 KPopupMenu *optionsPopup;
265 /** "help" popup-menu */ 270 /** "help" popup-menu */
266 KPopupMenu *helpPopup; 271 KPopupMenu *helpPopup;
267 /** "export" popup-menu */ 272 /** "export" popup-menu */
268 KPopupMenu *exportPopup; 273 KPopupMenu *exportPopup;
269 /** "import" popup-menu */ 274 /** "import" popup-menu */
270 KPopupMenu *importPopup; 275 KPopupMenu *importPopup;
271 /** force quit this window? */ 276 /** force quit this window? */
272 bool forceQuit; 277 bool forceQuit;
273 /** force minimize this window to the tray */ 278 /** force minimize this window to the tray */
274 bool forceMinimizeToTray; 279 bool forceMinimizeToTray;
275 280
276 281
277 282
278 283
279 private: 284 private:
280#ifdef PWM_EMBEDDED 285#ifdef PWM_EMBEDDED
281 //this are the overwritten callbackmethods from the syncinterface 286 //this are the overwritten callbackmethods from the syncinterface
282 virtual bool sync(KSyncManager* manager, QString filename, int mode,QString resource); 287 virtual bool sync(KSyncManager* manager, QString filename, int mode,QString resource);
283 virtual void removeSyncInfo( QString syncProfile); 288 virtual void removeSyncInfo( QString syncProfile);
284 289
285 // LR ******************************* 290 // LR *******************************
286 // sync stuff! 291 // sync stuff!
287 QPopupMenu *syncPopup; 292 Q3PopupMenu *syncPopup;
288 KSyncManager* syncManager; 293 KSyncManager* syncManager;
289#endif 294#endif
290 295
291 296
292 297
293 298
294 299
295 300
296 301
297 302
298}; 303};
299 304
300#endif 305#endif