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) (side-by-side diff)
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) (show 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 @@
-
+#ifndef PWM_EMBEDDED
AddEntryWndImpl::AddEntryWndImpl()
-#ifdef PWM_EMBEDDED
: addEntryWnd( 0, "AddEntryWndImpl", TRUE)
+#else
+AddEntryWndImpl::AddEntryWndImpl( QWidget* parent, const char* name)
+ : addEntryWnd( parent, name)
#endif
@@ -55,2 +57,25 @@ AddEntryWndImpl::~AddEntryWndImpl()
+#ifdef PWM_EMBEDDED
+void AddEntryWndImpl::slotOk()
+{
+ slotApply();
+
+ if (pwLineEdit->text().isEmpty()) {
+ KMessageBox::error(this,
+ i18n("Sorry, you haven't set a password."),
+ i18n("no password"));
+ return;
+ }
+
+ if (descLineEdit->text().isEmpty()) {
+ KMessageBox::error(this,
+ i18n("You haven't set a \"Description\"."),
+ i18n("Description not set"));
+ return;
+ }
+
+ KDialogBase::slotOk();
+}
+#else
+
void AddEntryWndImpl::okButton_slot()
@@ -77,2 +102,3 @@ void AddEntryWndImpl::cancelButton_slot()
}
+#endif
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 @@
-#include "addentrywnd.h"
-#include <qlineedit.h>
#ifndef PWM_EMBEDDED
+#include <qlineedit.h>
#include <qtextedit.h>
+#include <qcombobox.h>
+#include "addentrywnd.h"
#else
+#include <klineedit.h>
+#include <kcombobox.h>
#include <qmultilineedit.h>
+#include "addentrywnd_emb.h"
#endif
-#include <qcombobox.h>
#include <qpushbutton.h>
@@ -41,3 +44,7 @@ class AddEntryWndImpl : public addEntryWnd
public:
+#ifndef PWM_EMBEDDED
AddEntryWndImpl();
+#else
+ AddEntryWndImpl( QWidget* parent = 0, const char* name = 0);
+#endif
~AddEntryWndImpl();
@@ -80,2 +87,4 @@ public:
public slots:
+#ifndef PWM_EMBEDDED
+//MOC_SKIP_BEGIN
/** OK button pressed */
@@ -84,2 +93,6 @@ public slots:
void cancelButton_slot();
+//MOC_SKIP_END
+#else
+ virtual void slotOk();
+#endif
/** 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 @@
+#ifndef PWM_EMBEDDED
PwGenWndImpl::PwGenWndImpl(QWidget *parent,
@@ -40,2 +41,9 @@ PwGenWndImpl::PwGenWndImpl(QWidget *parent,
+#else
+PwGenWndImpl::PwGenWndImpl( QWidget* parent, const char* name)
+ : pwGenWnd( parent, name)
+{
+}
+#endif
+
PwGenWndImpl::~PwGenWndImpl()
@@ -44,4 +52,18 @@ PwGenWndImpl::~PwGenWndImpl()
+#ifdef PWM_EMBEDDED
+void PwGenWndImpl::slotOk()
+{
+ // internal generator
+ if (!optionsSanityIntGen())
+ return;
+ if (!startIntGen())
+ return;
+
+ KDialogBase::slotOk();
+}
+#endif
+
void PwGenWndImpl::genButton_slot()
{
+#ifndef PWM_EMBEDDED
// internal generator
@@ -54,2 +76,3 @@ exit_success:
done(1);
+#endif
}
@@ -58,3 +81,5 @@ void PwGenWndImpl::cancelButton_slot()
{
+#ifndef PWM_EMBEDDED
done(0);
+#endif
}
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 @@
+#ifndef PWM_EMBEDDED
#include "pwgenwnd.h"
+#else
+#include "pwgenwnd_emb.h"
+#endif
@@ -27,2 +31,3 @@ class PwGenWndImpl : public pwGenWnd
public:
+#ifndef PWM_EMBEDDED
PwGenWndImpl(QWidget *parent = 0,
@@ -31,2 +36,6 @@ public:
WFlags fl = 0);
+#else
+ PwGenWndImpl( QWidget* parent = 0, const char* name = 0);
+#endif
+
~PwGenWndImpl();
@@ -39,2 +48,5 @@ protected slots:
void genButton_slot();
+#ifdef PWM_EMBEDDED
+ virtual void slotOk();
+#endif
/** 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)
doc->timer()->getLock(DocTimer::id_autoLockTimer);
+#ifndef PWM_EMBEDDED
AddEntryWndImpl w;
+#else
+ AddEntryWndImpl w(this, "addentrywndimpl");
+#endif
+
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)
HEADERS = \
-addentrywnd.h \
+addentrywnd_emb.h \
addentrywndimpl.h \
@@ -64,3 +64,3 @@ listviewpwm.h \
printtext.h \
-pwgenwnd.h \
+pwgenwnd_emb.h \
pwgenwndimpl.h \
@@ -105,3 +105,3 @@ kcmconfigs/pwmconfigwidget.h \
SOURCES = \
-addentrywnd.cpp \
+addentrywnd_emb.cpp \
addentrywndimpl.cpp \
@@ -126,3 +126,3 @@ listviewpwm.cpp \
main.cpp \
-pwgenwnd.cpp \
+pwgenwnd_emb.cpp \
pwgenwndimpl.cpp \