summaryrefslogtreecommitdiffabout
path: root/pwmanager
Unidiff
Diffstat (limited to 'pwmanager') (more/less context) (show whitespace changes)
-rw-r--r--pwmanager/pwmanager/pwm.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/pwmanager/pwmanager/pwm.cpp b/pwmanager/pwmanager/pwm.cpp
index ac0c978..9798e8e 100644
--- a/pwmanager/pwmanager/pwm.cpp
+++ b/pwmanager/pwmanager/pwm.cpp
@@ -27,32 +27,37 @@
27#ifndef PWM_EMBEDDED 27#ifndef PWM_EMBEDDED
28#include <kmenubar.h> 28#include <kmenubar.h>
29#include <kstatusbar.h> 29#include <kstatusbar.h>
30#include <dcopclient.h> 30#include <dcopclient.h>
31#include "configwndimpl.h" 31#include "configwndimpl.h"
32#include "configuration.h" 32#include "configuration.h"
33#else 33#else
34#include <qmenubar.h> 34#include <qmenubar.h>
35#include <qmessagebox.h> 35#include <qmessagebox.h>
36#include <pwmprefs.h> 36#include <pwmprefs.h>
37#include <kpimglobalprefs.h> 37#include <kpimglobalprefs.h>
38#include <kcmconfigs/kcmpwmconfig.h> 38#include <kcmconfigs/kcmpwmconfig.h>
39#include <kcmconfigs/kcmkdepimconfig.h> 39#include <kcmconfigs/kcmkdepimconfig.h>
40#include <kcmultidialog.h> 40#include <kcmultidialog.h>
41#endif 41#endif
42 42
43
44#ifndef DESKTOP_VERSION
45#include <qpe/global.h>
46#endif
47
43#include <qpixmap.h> 48#include <qpixmap.h>
44#include <qcheckbox.h> 49#include <qcheckbox.h>
45#include <qspinbox.h> 50#include <qspinbox.h>
46#include <qlineedit.h> 51#include <qlineedit.h>
47#include <qfileinfo.h> 52#include <qfileinfo.h>
48#include <qclipboard.h> 53#include <qclipboard.h>
49 54
50 55
51#include <stdio.h> 56#include <stdio.h>
52 57
53#include "pwm.h" 58#include "pwm.h"
54#include "pwminit.h" 59#include "pwminit.h"
55#include "pwmprint.h" 60#include "pwmprint.h"
56#include "addentrywndimpl.h" 61#include "addentrywndimpl.h"
57#include "globalstuff.h" 62#include "globalstuff.h"
58#include "findwndimpl.h" 63#include "findwndimpl.h"
@@ -152,32 +157,33 @@ enum {
152 BUTTON_TOOL_EDIT, 157 BUTTON_TOOL_EDIT,
153 BUTTON_TOOL_DEL, 158 BUTTON_TOOL_DEL,
154 BUTTON_TOOL_FIND, 159 BUTTON_TOOL_FIND,
155 BUTTON_TOOL_LOCK, 160 BUTTON_TOOL_LOCK,
156 BUTTON_TOOL_DEEPLOCK, 161 BUTTON_TOOL_DEEPLOCK,
157 BUTTON_TOOL_UNLOCK 162 BUTTON_TOOL_UNLOCK
158}; 163};
159 164
160 165
161PwM::PwM(PwMInit *_init, PwMDoc *doc, 166PwM::PwM(PwMInit *_init, PwMDoc *doc,
162 bool virginity, 167 bool virginity,
163 QWidget *parent, const char *name) 168 QWidget *parent, const char *name)
164 : KMainWindow(parent, "HALLO") 169 : KMainWindow(parent, "HALLO")
165 , forceQuit (false) 170 , forceQuit (false)
166 , forceMinimizeToTray (false) 171 , forceMinimizeToTray (false)
167{ 172{
173 virgin = !virginity;
168 init = _init; 174 init = _init;
169 connect(doc, SIGNAL(docClosed(PwMDoc *)), 175 connect(doc, SIGNAL(docClosed(PwMDoc *)),
170 this, SLOT(docClosed(PwMDoc *))); 176 this, SLOT(docClosed(PwMDoc *)));
171 initMenubar(); 177 initMenubar();
172 initToolbar(); 178 initToolbar();
173 initMetrics(); 179 initMetrics();
174 setVirgin(virginity); 180 setVirgin(virginity);
175 setFocusPolicy(QWidget::WheelFocus); 181 setFocusPolicy(QWidget::WheelFocus);
176#ifndef PWM_EMBEDDED 182#ifndef PWM_EMBEDDED
177 statusBar()->show(); 183 statusBar()->show();
178#endif 184#endif
179 view = makeNewListView(doc); 185 view = makeNewListView(doc);
180 setCentralWidget(view); 186 setCentralWidget(view);
181 updateCaption(); 187 updateCaption();
182 showStatMsg(i18n("Ready.")); 188 showStatMsg(i18n("Ready."));
183} 189}
@@ -1346,32 +1352,35 @@ void PwM::copyToClipboard(const QString &s)
1346 cb->setText(s, QClipboard::Selection); 1352 cb->setText(s, QClipboard::Selection);
1347 cb->setText(s, QClipboard::Clipboard); 1353 cb->setText(s, QClipboard::Clipboard);
1348#else 1354#else
1349 cb->setText(s); 1355 cb->setText(s);
1350 1356
1351#endif 1357#endif
1352 1358
1353} 1359}
1354 1360
1355void PwM::showStatMsg(const QString &msg) 1361void PwM::showStatMsg(const QString &msg)
1356{ 1362{
1357#ifndef PWM_EMBEDDED 1363#ifndef PWM_EMBEDDED
1358 KStatusBar *statBar = statusBar(); 1364 KStatusBar *statBar = statusBar();
1359 statBar->message(msg, STATUSBAR_MSG_TIMEOUT * 1000); 1365 statBar->message(msg, STATUSBAR_MSG_TIMEOUT * 1000);
1360#else 1366#else
1361 qDebug("Statusbar : %s",msg.latin1()); 1367 qDebug("Statusbar : %s",msg.latin1());
1368#ifndef DESKTOP_VERSION
1369 Global::statusMessage(msg);
1370#endif
1362#endif 1371#endif
1363} 1372}
1364 1373
1365void PwM::focusInEvent(QFocusEvent *e) 1374void PwM::focusInEvent(QFocusEvent *e)
1366{ 1375{
1367 if (e->gotFocus()) { 1376 if (e->gotFocus()) {
1368 emit gotFocus(this); 1377 emit gotFocus(this);
1369 } else if (e->lostFocus()) { 1378 } else if (e->lostFocus()) {
1370 emit lostFocus(this); 1379 emit lostFocus(this);
1371 } 1380 }
1372} 1381}
1373 1382
1374 1383
1375#ifdef PWM_EMBEDDED 1384#ifdef PWM_EMBEDDED
1376 1385
1377void PwM::whatsnew_slot() 1386void PwM::whatsnew_slot()