-rw-r--r-- | pwmanager/pwmanager/pwm.cpp | 68 |
1 files changed, 37 insertions, 31 deletions
diff --git a/pwmanager/pwmanager/pwm.cpp b/pwmanager/pwmanager/pwm.cpp index 8373850..694fb13 100644 --- a/pwmanager/pwmanager/pwm.cpp +++ b/pwmanager/pwmanager/pwm.cpp | |||
@@ -25,6 +25,12 @@ | |||
25 | #include <kmessagebox.h> | 25 | #include <kmessagebox.h> |
26 | 26 | ||
27 | #include <qstatusbar.h> | 27 | #include <qstatusbar.h> |
28 | #include <QDesktopWidget> | ||
29 | //Added by qt3to4: | ||
30 | #include <Q3ValueList> | ||
31 | #include <QHideEvent> | ||
32 | #include <QFocusEvent> | ||
33 | #include <QCloseEvent> | ||
28 | 34 | ||
29 | #ifndef PWM_EMBEDDED | 35 | #ifndef PWM_EMBEDDED |
30 | #include <kmenubar.h> | 36 | #include <kmenubar.h> |
@@ -186,7 +192,7 @@ PwM::PwM(PwMInit *_init, PwMDoc *doc, | |||
186 | initToolbar(); | 192 | initToolbar(); |
187 | initMetrics(); | 193 | initMetrics(); |
188 | setVirgin(virginity); | 194 | setVirgin(virginity); |
189 | setFocusPolicy(QWidget::WheelFocus); | 195 | setFocusPolicy(Qt::WheelFocus); |
190 | #ifndef PWM_EMBEDDED | 196 | #ifndef PWM_EMBEDDED |
191 | statusBar()->show(); | 197 | statusBar()->show(); |
192 | #endif | 198 | #endif |
@@ -240,20 +246,20 @@ void PwM::initMenubar() | |||
240 | optionsPopup = new KPopupMenu(this); | 246 | optionsPopup = new KPopupMenu(this); |
241 | 247 | ||
242 | // "file" popup menu | 248 | // "file" popup menu |
243 | filePopup->insertItem(QIconSet(picons->loadIcon("filenew", KIcon::Small)), | 249 | filePopup->insertItem(QIcon(picons->loadIcon("filenew", KIcon::Small)), |
244 | i18n("&New"), this, | 250 | i18n("&New"), this, |
245 | SLOT(new_slot()), 0, BUTTON_POPUP_FILE_NEW); | 251 | SLOT(new_slot()), 0, BUTTON_POPUP_FILE_NEW); |
246 | filePopup->insertItem(QIconSet(picons->loadIcon("fileopen", KIcon::Small)), | 252 | filePopup->insertItem(QIcon(picons->loadIcon("fileopen", KIcon::Small)), |
247 | i18n("&Open"), this, | 253 | i18n("&Open"), this, |
248 | SLOT(open_slot()), 0, BUTTON_POPUP_FILE_OPEN); | 254 | SLOT(open_slot()), 0, BUTTON_POPUP_FILE_OPEN); |
249 | filePopup->insertItem(QIconSet(picons->loadIcon("fileclose", KIcon::Small)), | 255 | filePopup->insertItem(QIcon(picons->loadIcon("fileclose", KIcon::Small)), |
250 | i18n("&Close"), this, | 256 | i18n("&Close"), this, |
251 | SLOT(close_slot()), 0, BUTTON_POPUP_FILE_CLOSE); | 257 | SLOT(close_slot()), 0, BUTTON_POPUP_FILE_CLOSE); |
252 | filePopup->insertSeparator(); | 258 | filePopup->insertSeparator(); |
253 | filePopup->insertItem(QIconSet(picons->loadIcon("filesave", KIcon::Small)), | 259 | filePopup->insertItem(QIcon(picons->loadIcon("filesave", KIcon::Small)), |
254 | i18n("&Save"), this, | 260 | i18n("&Save"), this, |
255 | SLOT(save_slot()), 0, BUTTON_POPUP_FILE_SAVE); | 261 | SLOT(save_slot()), 0, BUTTON_POPUP_FILE_SAVE); |
256 | filePopup->insertItem(QIconSet(picons->loadIcon("filesaveas", KIcon::Small)), | 262 | filePopup->insertItem(QIcon(picons->loadIcon("filesaveas", KIcon::Small)), |
257 | i18n("Save &as..."), | 263 | i18n("Save &as..."), |
258 | this, SLOT(saveAs_slot()), 0, | 264 | this, SLOT(saveAs_slot()), 0, |
259 | BUTTON_POPUP_FILE_SAVEAS); | 265 | BUTTON_POPUP_FILE_SAVEAS); |
@@ -269,7 +275,7 @@ void PwM::initMenubar() | |||
269 | exportPopup->insertItem(i18n("&KWallet..."), this, | 275 | exportPopup->insertItem(i18n("&KWallet..."), this, |
270 | SLOT(exportToKWallet()), 0, BUTTON_POPUP_EXPORT_KWALLET); | 276 | SLOT(exportToKWallet()), 0, BUTTON_POPUP_EXPORT_KWALLET); |
271 | #endif | 277 | #endif |
272 | filePopup->insertItem(QIconSet(picons->loadIcon("fileexport", KIcon::Small)), | 278 | filePopup->insertItem(QIcon(picons->loadIcon("fileexport", KIcon::Small)), |
273 | i18n("E&xport"), exportPopup, | 279 | i18n("E&xport"), exportPopup, |
274 | BUTTON_POPUP_FILE_EXPORT); | 280 | BUTTON_POPUP_FILE_EXPORT); |
275 | // "file/import" popup menu | 281 | // "file/import" popup menu |
@@ -283,87 +289,87 @@ void PwM::initMenubar() | |||
283 | importPopup->insertItem(i18n("&KWallet..."), this, | 289 | importPopup->insertItem(i18n("&KWallet..."), this, |
284 | SLOT(importKWallet()), 0, BUTTON_POPUP_IMPORT_KWALLET); | 290 | SLOT(importKWallet()), 0, BUTTON_POPUP_IMPORT_KWALLET); |
285 | #endif | 291 | #endif |
286 | filePopup->insertItem(QIconSet(picons->loadIcon("fileimport", KIcon::Small)), | 292 | filePopup->insertItem(QIcon(picons->loadIcon("fileimport", KIcon::Small)), |
287 | i18n("I&mport"), importPopup, | 293 | i18n("I&mport"), importPopup, |
288 | BUTTON_POPUP_FILE_IMPORT); | 294 | BUTTON_POPUP_FILE_IMPORT); |
289 | filePopup->insertSeparator(); | 295 | filePopup->insertSeparator(); |
290 | #if 0 | 296 | #if 0 |
291 | filePopup->insertItem(QIconSet(picons->loadIcon("fileprint", KIcon::Small)), | 297 | filePopup->insertItem(QIcon(picons->loadIcon("fileprint", KIcon::Small)), |
292 | i18n("&Print..."), this, | 298 | i18n("&Print..."), this, |
293 | SLOT(print_slot()), 0, BUTTON_POPUP_FILE_PRINT); | 299 | SLOT(print_slot()), 0, BUTTON_POPUP_FILE_PRINT); |
294 | filePopup->insertSeparator(); | 300 | filePopup->insertSeparator(); |
295 | #endif | 301 | #endif |
296 | filePopup->insertItem(QIconSet(picons->loadIcon("exit", KIcon::Small)), | 302 | filePopup->insertItem(QIcon(picons->loadIcon("exit", KIcon::Small)), |
297 | i18n("&Quit"), this, | 303 | i18n("&Quit"), this, |
298 | SLOT(quitButton_slot()), 0, BUTTON_POPUP_FILE_QUIT); | 304 | SLOT(quitButton_slot()), 0, BUTTON_POPUP_FILE_QUIT); |
299 | menuBar()->insertItem(i18n("&File"), filePopup); | 305 | menuBar()->insertItem(i18n("&File"), filePopup); |
300 | // "manage" popup menu | 306 | // "manage" popup menu |
301 | managePopup->insertItem(QIconSet(picons->loadIcon("pencil", KIcon::Small)), | 307 | managePopup->insertItem(QIcon(picons->loadIcon("pencil", KIcon::Small)), |
302 | i18n("&Add password"), this, | 308 | i18n("&Add password"), this, |
303 | SLOT(addPwd_slot()), 0, | 309 | SLOT(addPwd_slot()), 0, |
304 | BUTTON_POPUP_MANAGE_ADD); | 310 | BUTTON_POPUP_MANAGE_ADD); |
305 | managePopup->insertSeparator(); | 311 | managePopup->insertSeparator(); |
306 | managePopup->insertItem(QIconSet(picons->loadIcon("edit", KIcon::Small)), | 312 | managePopup->insertItem(QIcon(picons->loadIcon("edit", KIcon::Small)), |
307 | i18n("&Edit"), this, SLOT(editPwd_slot()), 0, | 313 | i18n("&Edit"), this, SLOT(editPwd_slot()), 0, |
308 | BUTTON_POPUP_MANAGE_EDIT); | 314 | BUTTON_POPUP_MANAGE_EDIT); |
309 | managePopup->insertItem(QIconSet(picons->loadIcon("editdelete", KIcon::Small)), | 315 | managePopup->insertItem(QIcon(picons->loadIcon("editdelete", KIcon::Small)), |
310 | i18n("&Delete"), this, SLOT(deletePwd_slot()), | 316 | i18n("&Delete"), this, SLOT(deletePwd_slot()), |
311 | 0, BUTTON_POPUP_MANAGE_DEL); | 317 | 0, BUTTON_POPUP_MANAGE_DEL); |
312 | managePopup->insertSeparator(); | 318 | managePopup->insertSeparator(); |
313 | managePopup->insertItem(QIconSet(picons->loadIcon("rotate", KIcon::Small)), | 319 | managePopup->insertItem(QIcon(picons->loadIcon("rotate", KIcon::Small)), |
314 | i18n("Change &Master Password"), this, | 320 | i18n("Change &Master Password"), this, |
315 | SLOT(changeMasterPwd_slot()), 0, | 321 | SLOT(changeMasterPwd_slot()), 0, |
316 | BUTTON_POPUP_MANAGE_CHANGEMP); | 322 | BUTTON_POPUP_MANAGE_CHANGEMP); |
317 | menuBar()->insertItem(i18n("&Manage"), managePopup); | 323 | menuBar()->insertItem(i18n("&Manage"), managePopup); |
318 | // "chipcard" popup menu | 324 | // "chipcard" popup menu |
319 | #ifdef CONFIG_KEYCARD | 325 | #ifdef CONFIG_KEYCARD |
320 | chipcardPopup->insertItem(QIconSet(picons->loadIcon("filenew", KIcon::Small)), | 326 | chipcardPopup->insertItem(QIcon(picons->loadIcon("filenew", KIcon::Small)), |
321 | i18n("&Generate new key-card"), this, | 327 | i18n("&Generate new key-card"), this, |
322 | SLOT(genNewCard_slot()), 0, | 328 | SLOT(genNewCard_slot()), 0, |
323 | BUTTON_POPUP_CHIPCARD_GENNEW); | 329 | BUTTON_POPUP_CHIPCARD_GENNEW); |
324 | chipcardPopup->insertItem(QIconSet(picons->loadIcon("editdelete", KIcon::Small)), | 330 | chipcardPopup->insertItem(QIcon(picons->loadIcon("editdelete", KIcon::Small)), |
325 | i18n("&Erase key-card"), this, | 331 | i18n("&Erase key-card"), this, |
326 | SLOT(eraseCard_slot()), 0, | 332 | SLOT(eraseCard_slot()), 0, |
327 | BUTTON_POPUP_CHIPCARD_DEL); | 333 | BUTTON_POPUP_CHIPCARD_DEL); |
328 | chipcardPopup->insertItem(QIconSet(picons->loadIcon("", KIcon::Small)), | 334 | chipcardPopup->insertItem(QIcon(picons->loadIcon("", KIcon::Small)), |
329 | i18n("Read card-&ID"), this, | 335 | i18n("Read card-&ID"), this, |
330 | SLOT(readCardId_slot()), 0, | 336 | SLOT(readCardId_slot()), 0, |
331 | BUTTON_POPUP_CHIPCARD_READID); | 337 | BUTTON_POPUP_CHIPCARD_READID); |
332 | chipcardPopup->insertSeparator(); | 338 | chipcardPopup->insertSeparator(); |
333 | chipcardPopup->insertItem(QIconSet(picons->loadIcon("2rightarrow", KIcon::Small)), | 339 | chipcardPopup->insertItem(QIcon(picons->loadIcon("2rightarrow", KIcon::Small)), |
334 | i18n("&Make card backup-image"), this, | 340 | i18n("&Make card backup-image"), this, |
335 | SLOT(makeCardBackup_slot()), 0, | 341 | SLOT(makeCardBackup_slot()), 0, |
336 | BUTTON_POPUP_CHIPCARD_SAVEBACKUP); | 342 | BUTTON_POPUP_CHIPCARD_SAVEBACKUP); |
337 | chipcardPopup->insertItem(QIconSet(picons->loadIcon("2leftarrow", KIcon::Small)), | 343 | chipcardPopup->insertItem(QIcon(picons->loadIcon("2leftarrow", KIcon::Small)), |
338 | i18n("&Replay card backup-image"), this, | 344 | i18n("&Replay card backup-image"), this, |
339 | SLOT(replayCardBackup_slot()), 0, | 345 | SLOT(replayCardBackup_slot()), 0, |
340 | BUTTON_POPUP_CHIPCARD_REPLAYBACKUP); | 346 | BUTTON_POPUP_CHIPCARD_REPLAYBACKUP); |
341 | menuBar()->insertItem(i18n("&Chipcard manager"), chipcardPopup); | 347 | menuBar()->insertItem(i18n("&Chipcard manager"), chipcardPopup); |
342 | #endif // CONFIG_KEYCARD | 348 | #endif // CONFIG_KEYCARD |
343 | // "view" popup menu | 349 | // "view" popup menu |
344 | viewPopup->insertItem(QIconSet(picons->loadIcon("find", KIcon::Small)), | 350 | viewPopup->insertItem(QIcon(picons->loadIcon("find", KIcon::Small)), |
345 | i18n("&Find"), this, | 351 | i18n("&Find"), this, |
346 | SLOT(find_slot()), 0, BUTTON_POPUP_VIEW_FIND); | 352 | SLOT(find_slot()), 0, BUTTON_POPUP_VIEW_FIND); |
347 | viewPopup->insertSeparator(); | 353 | viewPopup->insertSeparator(); |
348 | viewPopup->insertItem(QIconSet(picons->loadIcon("halfencrypted", KIcon::Small)), | 354 | viewPopup->insertItem(QIcon(picons->loadIcon("halfencrypted", KIcon::Small)), |
349 | i18n("&Lock all entries"), this, | 355 | i18n("&Lock all entries"), this, |
350 | SLOT(lockWnd_slot()), 0, | 356 | SLOT(lockWnd_slot()), 0, |
351 | BUTTON_POPUP_VIEW_LOCK); | 357 | BUTTON_POPUP_VIEW_LOCK); |
352 | viewPopup->insertItem(QIconSet(picons->loadIcon("encrypted", KIcon::Small)), | 358 | viewPopup->insertItem(QIcon(picons->loadIcon("encrypted", KIcon::Small)), |
353 | i18n("&Deep-lock all entries"), this, | 359 | i18n("&Deep-lock all entries"), this, |
354 | SLOT(deepLockWnd_slot()), 0, | 360 | SLOT(deepLockWnd_slot()), 0, |
355 | BUTTON_POPUP_VIEW_DEEPLOCK); | 361 | BUTTON_POPUP_VIEW_DEEPLOCK); |
356 | viewPopup->insertItem(QIconSet(picons->loadIcon("decrypted", KIcon::Small)), | 362 | viewPopup->insertItem(QIcon(picons->loadIcon("decrypted", KIcon::Small)), |
357 | i18n("&Unlock all entries"), this, | 363 | i18n("&Unlock all entries"), this, |
358 | SLOT(unlockWnd_slot()), 0, | 364 | SLOT(unlockWnd_slot()), 0, |
359 | BUTTON_POPUP_VIEW_UNLOCK); | 365 | BUTTON_POPUP_VIEW_UNLOCK); |
360 | menuBar()->insertItem(i18n("&View"), viewPopup); | 366 | menuBar()->insertItem(i18n("&View"), viewPopup); |
361 | // "options" popup menu | 367 | // "options" popup menu |
362 | optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)), | 368 | optionsPopup->insertItem(QIcon(picons->loadIcon("configure", KIcon::Small)), |
363 | i18n("&Configure PwM/Pi..."), this, | 369 | i18n("&Configure PwM/Pi..."), this, |
364 | SLOT(config_slot()),0, | 370 | SLOT(config_slot()),0, |
365 | BUTTON_POPUP_OPTIONS_CONFIG); | 371 | BUTTON_POPUP_OPTIONS_CONFIG); |
366 | optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)), | 372 | optionsPopup->insertItem(QIcon(picons->loadIcon("configure", KIcon::Small)), |
367 | i18n("Global Settings..."), this, | 373 | i18n("Global Settings..."), this, |
368 | SLOT(config_global_slot()),0, | 374 | SLOT(config_global_slot()),0, |
369 | BUTTON_POPUP_OPTIONS_GLOBAL_CONFIG); | 375 | BUTTON_POPUP_OPTIONS_GLOBAL_CONFIG); |
@@ -376,7 +382,7 @@ void PwM::initMenubar() | |||
376 | #ifndef PWM_EMBEDDED | 382 | #ifndef PWM_EMBEDDED |
377 | helpPopup = helpMenu(QString::null, false); | 383 | helpPopup = helpMenu(QString::null, false); |
378 | #else | 384 | #else |
379 | optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)), | 385 | optionsPopup->insertItem(QIcon(picons->loadIcon("configure", KIcon::Small)), |
380 | i18n("C&ategories..."), this, | 386 | i18n("C&ategories..."), this, |
381 | SLOT(category_slot()),0, | 387 | SLOT(category_slot()),0, |
382 | BUTTON_POPUP_OPTIONS_CATEGORY); | 388 | BUTTON_POPUP_OPTIONS_CATEGORY); |
@@ -922,12 +928,12 @@ void PwM::config_slot() | |||
922 | ++i; | 928 | ++i; |
923 | } | 929 | } |
924 | 930 | ||
925 | const QValueList<PwM *> *ml = init->mainWndList(); | 931 | const Q3ValueList<PwM *> *ml = init->mainWndList(); |
926 | #ifndef PWM_EMBEDDED | 932 | #ifndef PWM_EMBEDDED |
927 | QValueList<PwM *>::const_iterator i2 = ml->begin(), | 933 | Q3ValueList<PwM *>::const_iterator i2 = ml->begin(), |
928 | end2 = ml->end(); | 934 | end2 = ml->end(); |
929 | #else | 935 | #else |
930 | QValueList<PwM *>::ConstIterator i2 = ml->begin(), | 936 | Q3ValueList<PwM *>::ConstIterator i2 = ml->begin(), |
931 | end2 = ml->end(); | 937 | end2 = ml->end(); |
932 | #endif | 938 | #endif |
933 | PwM *pwm; | 939 | PwM *pwm; |
@@ -1594,6 +1600,6 @@ void PwM::removeSyncInfo( QString syncProfile) | |||
1594 | #endif | 1600 | #endif |
1595 | 1601 | ||
1596 | 1602 | ||
1597 | #ifndef PWM_EMBEDDED | 1603 | #ifndef PWM_EMBEDDED_ |
1598 | #include "pwm.moc" | 1604 | #include "moc_pwm.cpp" |
1599 | #endif | 1605 | #endif |