summaryrefslogtreecommitdiffabout
path: root/pwmanager
authorulf69 <ulf69>2004-09-23 19:33:54 (UTC)
committer ulf69 <ulf69>2004-09-23 19:33:54 (UTC)
commit15c6615421bc50d6d54dc334c90944749c347d9e (patch) (unidiff)
tree9843c16340d2681dc529cca410472136ea1123fd /pwmanager
parentccf18890228a471d048d591c0d488e63c2de1ccc (diff)
downloadkdepimpi-15c6615421bc50d6d54dc334c90944749c347d9e.zip
kdepimpi-15c6615421bc50d6d54dc334c90944749c347d9e.tar.gz
kdepimpi-15c6615421bc50d6d54dc334c90944749c347d9e.tar.bz2
modified the add password dialog to fit on embedded devices
Diffstat (limited to 'pwmanager') (more/less context) (ignore whitespace changes)
-rw-r--r--pwmanager/pwmanager/addentrywndimpl.cpp30
-rw-r--r--pwmanager/pwmanager/addentrywndimpl.h19
-rw-r--r--pwmanager/pwmanager/pwgenwndimpl.cpp25
-rw-r--r--pwmanager/pwmanager/pwgenwndimpl.h12
-rw-r--r--pwmanager/pwmanager/pwm.cpp5
-rw-r--r--pwmanager/pwmanager/pwmanagerE.pro8
6 files changed, 90 insertions, 9 deletions
diff --git a/pwmanager/pwmanager/addentrywndimpl.cpp b/pwmanager/pwmanager/addentrywndimpl.cpp
index 73ba36c..ffd301f 100644
--- a/pwmanager/pwmanager/addentrywndimpl.cpp
+++ b/pwmanager/pwmanager/addentrywndimpl.cpp
@@ -36,6 +36,8 @@
36 36
37 37#ifndef PWM_EMBEDDED
38AddEntryWndImpl::AddEntryWndImpl() 38AddEntryWndImpl::AddEntryWndImpl()
39#ifdef PWM_EMBEDDED
40 : addEntryWnd( 0, "AddEntryWndImpl", TRUE) 39 : addEntryWnd( 0, "AddEntryWndImpl", TRUE)
40#else
41AddEntryWndImpl::AddEntryWndImpl( QWidget* parent, const char* name)
42 : addEntryWnd( parent, name)
41#endif 43#endif
@@ -55,2 +57,25 @@ AddEntryWndImpl::~AddEntryWndImpl()
55 57
58#ifdef PWM_EMBEDDED
59void AddEntryWndImpl::slotOk()
60{
61 slotApply();
62
63 if (pwLineEdit->text().isEmpty()) {
64 KMessageBox::error(this,
65 i18n("Sorry, you haven't set a password."),
66 i18n("no password"));
67 return;
68 }
69
70 if (descLineEdit->text().isEmpty()) {
71 KMessageBox::error(this,
72 i18n("You haven't set a \"Description\"."),
73 i18n("Description not set"));
74 return;
75 }
76
77 KDialogBase::slotOk();
78}
79#else
80
56void AddEntryWndImpl::okButton_slot() 81void AddEntryWndImpl::okButton_slot()
@@ -77,2 +102,3 @@ void AddEntryWndImpl::cancelButton_slot()
77} 102}
103#endif
78 104
diff --git a/pwmanager/pwmanager/addentrywndimpl.h b/pwmanager/pwmanager/addentrywndimpl.h
index c0bfcee..622e9d2 100644
--- a/pwmanager/pwmanager/addentrywndimpl.h
+++ b/pwmanager/pwmanager/addentrywndimpl.h
@@ -22,12 +22,15 @@
22 22
23#include "addentrywnd.h"
24 23
25#include <qlineedit.h>
26#ifndef PWM_EMBEDDED 24#ifndef PWM_EMBEDDED
25#include <qlineedit.h>
27#include <qtextedit.h> 26#include <qtextedit.h>
27#include <qcombobox.h>
28#include "addentrywnd.h"
28#else 29#else
30#include <klineedit.h>
31#include <kcombobox.h>
29#include <qmultilineedit.h> 32#include <qmultilineedit.h>
33#include "addentrywnd_emb.h"
30#endif 34#endif
31 35
32#include <qcombobox.h>
33#include <qpushbutton.h> 36#include <qpushbutton.h>
@@ -41,3 +44,7 @@ class AddEntryWndImpl : public addEntryWnd
41public: 44public:
45#ifndef PWM_EMBEDDED
42 AddEntryWndImpl(); 46 AddEntryWndImpl();
47#else
48 AddEntryWndImpl( QWidget* parent = 0, const char* name = 0);
49#endif
43 ~AddEntryWndImpl(); 50 ~AddEntryWndImpl();
@@ -80,2 +87,4 @@ public:
80public slots: 87public slots:
88#ifndef PWM_EMBEDDED
89//MOC_SKIP_BEGIN
81 /** OK button pressed */ 90 /** OK button pressed */
@@ -84,2 +93,6 @@ public slots:
84 void cancelButton_slot(); 93 void cancelButton_slot();
94//MOC_SKIP_END
95#else
96 virtual void slotOk();
97#endif
85 /** Reveal button pressed */ 98 /** Reveal button pressed */
diff --git a/pwmanager/pwmanager/pwgenwndimpl.cpp b/pwmanager/pwmanager/pwgenwndimpl.cpp
index 01f5740..5313060 100644
--- a/pwmanager/pwmanager/pwgenwndimpl.cpp
+++ b/pwmanager/pwmanager/pwgenwndimpl.cpp
@@ -32,2 +32,3 @@
32 32
33#ifndef PWM_EMBEDDED
33PwGenWndImpl::PwGenWndImpl(QWidget *parent, 34PwGenWndImpl::PwGenWndImpl(QWidget *parent,
@@ -40,2 +41,9 @@ PwGenWndImpl::PwGenWndImpl(QWidget *parent,
40 41
42#else
43PwGenWndImpl::PwGenWndImpl( QWidget* parent, const char* name)
44 : pwGenWnd( parent, name)
45{
46}
47#endif
48
41PwGenWndImpl::~PwGenWndImpl() 49PwGenWndImpl::~PwGenWndImpl()
@@ -44,4 +52,18 @@ PwGenWndImpl::~PwGenWndImpl()
44 52
53#ifdef PWM_EMBEDDED
54void PwGenWndImpl::slotOk()
55{
56 // internal generator
57 if (!optionsSanityIntGen())
58 return;
59 if (!startIntGen())
60 return;
61
62 KDialogBase::slotOk();
63}
64#endif
65
45void PwGenWndImpl::genButton_slot() 66void PwGenWndImpl::genButton_slot()
46{ 67{
68#ifndef PWM_EMBEDDED
47 // internal generator 69 // internal generator
@@ -54,2 +76,3 @@ exit_success:
54 done(1); 76 done(1);
77#endif
55} 78}
@@ -58,3 +81,5 @@ void PwGenWndImpl::cancelButton_slot()
58{ 81{
82#ifndef PWM_EMBEDDED
59 done(0); 83 done(0);
84#endif
60} 85}
diff --git a/pwmanager/pwmanager/pwgenwndimpl.h b/pwmanager/pwmanager/pwgenwndimpl.h
index 5c25643..994ff2f 100644
--- a/pwmanager/pwmanager/pwgenwndimpl.h
+++ b/pwmanager/pwmanager/pwgenwndimpl.h
@@ -22,3 +22,7 @@
22 22
23#ifndef PWM_EMBEDDED
23#include "pwgenwnd.h" 24#include "pwgenwnd.h"
25#else
26#include "pwgenwnd_emb.h"
27#endif
24 28
@@ -27,2 +31,3 @@ class PwGenWndImpl : public pwGenWnd
27public: 31public:
32#ifndef PWM_EMBEDDED
28 PwGenWndImpl(QWidget *parent = 0, 33 PwGenWndImpl(QWidget *parent = 0,
@@ -31,2 +36,6 @@ public:
31 WFlags fl = 0); 36 WFlags fl = 0);
37#else
38 PwGenWndImpl( QWidget* parent = 0, const char* name = 0);
39#endif
40
32 ~PwGenWndImpl(); 41 ~PwGenWndImpl();
@@ -39,2 +48,5 @@ protected slots:
39 void genButton_slot(); 48 void genButton_slot();
49#ifdef PWM_EMBEDDED
50 virtual void slotOk();
51#endif
40 /** cancel button pressed */ 52 /** cancel button pressed */
diff --git a/pwmanager/pwmanager/pwm.cpp b/pwmanager/pwmanager/pwm.cpp
index 08fcb25..107e845 100644
--- a/pwmanager/pwmanager/pwm.cpp
+++ b/pwmanager/pwmanager/pwm.cpp
@@ -570,3 +570,8 @@ void PwM::addPwd_slot(QString *pw, PwMDoc *_doc)
570 doc->timer()->getLock(DocTimer::id_autoLockTimer); 570 doc->timer()->getLock(DocTimer::id_autoLockTimer);
571#ifndef PWM_EMBEDDED
571 AddEntryWndImpl w; 572 AddEntryWndImpl w;
573#else
574 AddEntryWndImpl w(this, "addentrywndimpl");
575#endif
576
572 vector<string> catList; 577 vector<string> catList;
diff --git a/pwmanager/pwmanager/pwmanagerE.pro b/pwmanager/pwmanager/pwmanagerE.pro
index 5c29ea4..87142b7 100644
--- a/pwmanager/pwmanager/pwmanagerE.pro
+++ b/pwmanager/pwmanager/pwmanagerE.pro
@@ -41,3 +41,3 @@ LIBS += $(QTOPIALIB)
41HEADERS = \ 41HEADERS = \
42addentrywnd.h \ 42addentrywnd_emb.h \
43addentrywndimpl.h \ 43addentrywndimpl.h \
@@ -64,3 +64,3 @@ listviewpwm.h \
64printtext.h \ 64printtext.h \
65pwgenwnd.h \ 65pwgenwnd_emb.h \
66pwgenwndimpl.h \ 66pwgenwndimpl.h \
@@ -105,3 +105,3 @@ kcmconfigs/pwmconfigwidget.h \
105SOURCES = \ 105SOURCES = \
106addentrywnd.cpp \ 106addentrywnd_emb.cpp \
107addentrywndimpl.cpp \ 107addentrywndimpl.cpp \
@@ -126,3 +126,3 @@ listviewpwm.cpp \
126main.cpp \ 126main.cpp \
127pwgenwnd.cpp \ 127pwgenwnd_emb.cpp \
128pwgenwndimpl.cpp \ 128pwgenwndimpl.cpp \