21 files changed, 699 insertions, 38 deletions
diff --git a/pwmanager/pwmanager/addentrywnd_emb.cpp b/pwmanager/pwmanager/addentrywnd_emb.cpp index 3a40cfc..ed02e6d 100644 --- a/pwmanager/pwmanager/addentrywnd_emb.cpp +++ b/pwmanager/pwmanager/addentrywnd_emb.cpp | |||
@@ -33,25 +33,25 @@ $Id$ | |||
33 | #include <kcombobox.h> | 33 | #include <kcombobox.h> |
34 | #include <klineedit.h> | 34 | #include <klineedit.h> |
35 | #include <qpushbutton.h> | 35 | #include <qpushbutton.h> |
36 | 36 | ||
37 | /* | 37 | /* |
38 | * Constructs a addEntryWnd as a child of 'parent', with the | 38 | * Constructs a addEntryWnd as a child of 'parent', with the |
39 | * name 'name' and widget flags set to 'f'. | 39 | * name 'name' and widget flags set to 'f'. |
40 | * | 40 | * |
41 | * The dialog will by default be modeless, unless you set 'modal' to | 41 | * The dialog will by default be modeless, unless you set 'modal' to |
42 | * TRUE to construct a modal dialog. | 42 | * TRUE to construct a modal dialog. |
43 | */ | 43 | */ |
44 | addEntryWnd::addEntryWnd( QWidget* parent, const char* name) | 44 | addEntryWnd::addEntryWnd( QWidget* parent, const char* name) |
45 | : KDialogBase( KDialogBase::Plain, i18n( "Edit Password" ), | 45 | : KDialogBase( KDialogBase::Plain, i18n( "edit/add a password entry" ), |
46 | KDialogBase::Ok | KDialogBase::Cancel, | 46 | KDialogBase::Ok | KDialogBase::Cancel, |
47 | KDialogBase::Ok, parent, name, true ) | 47 | KDialogBase::Ok, parent, name, true ) |
48 | { | 48 | { |
49 | QWidget *page = plainPage(); | 49 | QWidget *page = plainPage(); |
50 | QVBoxLayout *pageLayout = new QVBoxLayout( page ); | 50 | QVBoxLayout *pageLayout = new QVBoxLayout( page ); |
51 | 51 | ||
52 | QTabWidget* mTabWidget = new QTabWidget( page ); | 52 | QTabWidget* mTabWidget = new QTabWidget( page ); |
53 | pageLayout->addWidget( mTabWidget ); | 53 | pageLayout->addWidget( mTabWidget ); |
54 | 54 | ||
55 | //////////////////////////////////////////////////////////////////// | 55 | //////////////////////////////////////////////////////////////////// |
56 | // This is the Password tab | 56 | // This is the Password tab |
57 | QWidget *tab1 = new QWidget( mTabWidget ); | 57 | QWidget *tab1 = new QWidget( mTabWidget ); |
diff --git a/pwmanager/pwmanager/findwnd_emb.cpp b/pwmanager/pwmanager/findwnd_emb.cpp new file mode 100644 index 0000000..6db2684 --- a/dev/null +++ b/pwmanager/pwmanager/findwnd_emb.cpp | |||
@@ -0,0 +1,123 @@ | |||
1 | /* | ||
2 | This file is part of PwManager/Platform independent. | ||
3 | Copyright (c) 2004 Ulf Schenk | ||
4 | |||
5 | This program is free software; you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published by | ||
7 | the Free Software Foundation; either version 2 of the License, or | ||
8 | (at your option) any later version. | ||
9 | |||
10 | This program is distributed in the hope that it will be useful, | ||
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | GNU General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU General Public License | ||
16 | along with this program; if not, write to the Free Software | ||
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
18 | |||
19 | As a special exception, permission is given to link this program | ||
20 | with any edition of Qt, and distribute the resulting executable, | ||
21 | without including the source code for Qt in the source distribution. | ||
22 | |||
23 | $Id$ | ||
24 | */ | ||
25 | |||
26 | #include "findwnd_emb.h" | ||
27 | |||
28 | #include <klocale.h> | ||
29 | |||
30 | #include <qcheckbox.h> | ||
31 | #include <qbuttongroup.h> | ||
32 | #include <qradiobutton.h> | ||
33 | #include <qlayout.h> | ||
34 | #include <klineedit.h> | ||
35 | #include <qlabel.h> | ||
36 | |||
37 | /* | ||
38 | #include <qvariant.h> | ||
39 | #include <qlabel.h> | ||
40 | #include <qlineedit.h> | ||
41 | #include <qpushbutton.h> | ||
42 | #include <qcheckbox.h> | ||
43 | #include <qbuttongroup.h> | ||
44 | #include <qradiobutton.h> | ||
45 | #include <qlayout.h> | ||
46 | #include <qtooltip.h> | ||
47 | #include <qwhatsthis.h> | ||
48 | */ | ||
49 | |||
50 | /* | ||
51 | * Constructs a findWnd as a child of 'parent', with the | ||
52 | * name 'name'. | ||
53 | */ | ||
54 | findWnd::findWnd( QWidget* parent, const char* name ) | ||
55 | : KDialogBase( KDialogBase::Plain, i18n( "Find" ), | ||
56 | KDialogBase::Ok | KDialogBase::Cancel, | ||
57 | KDialogBase::Ok, parent, name, true ) | ||
58 | { | ||
59 | QWidget *page = plainPage(); | ||
60 | QVBoxLayout *layout = new QVBoxLayout( page ); | ||
61 | layout->setMargin( KDialogBase::marginHint() ); | ||
62 | layout->setSpacing( KDialogBase::spacingHint() ); | ||
63 | |||
64 | exactCheckBox = new QCheckBox( i18n( "&Exact match" ), page ); | ||
65 | layout->addWidget( exactCheckBox ); | ||
66 | |||
67 | caseSensCheckBox = new QCheckBox( i18n( "&Case sensitive" ), page ); | ||
68 | layout->addWidget( caseSensCheckBox ); | ||
69 | |||
70 | |||
71 | QButtonGroup* buttonGroup1 = new QButtonGroup(1, Qt::Horizontal, i18n( "Search in Column" ), page ); | ||
72 | layout->addWidget( buttonGroup1 ); | ||
73 | |||
74 | descRadioButton = new QRadioButton( i18n( "&Description" ), buttonGroup1 ); | ||
75 | pwRadioButton = new QRadioButton( i18n( "&Password" ), buttonGroup1 ); | ||
76 | commentRadioButton = new QRadioButton( i18n( "C&omment" ), buttonGroup1 ); | ||
77 | nameRadioButton = new QRadioButton( i18n( "&Username" ), buttonGroup1 ); | ||
78 | urlRadioButton = new QRadioButton( i18n( "U&RL" ), buttonGroup1 ); | ||
79 | launcherRadioButton = new QRadioButton( i18n( "&Launcher" ), buttonGroup1 ); | ||
80 | descRadioButton->setChecked( TRUE ); | ||
81 | |||
82 | findLineEdit = new KLineEdit( page ); | ||
83 | QLabel* label = new QLabel( findLineEdit, i18n( "Find:" ), page ); | ||
84 | layout->addWidget( label ); | ||
85 | layout->addWidget( findLineEdit ); | ||
86 | |||
87 | setButtonText( KDialogBase::Ok, "&Find" ); | ||
88 | setButtonText( KDialogBase::Cancel, "&Close" ); | ||
89 | |||
90 | |||
91 | // resize( QSize(200, 150) ); | ||
92 | |||
93 | |||
94 | connect( buttonGroup1, SIGNAL( clicked(int) ), this, SLOT( selectionChanged_slot() ) ); | ||
95 | connect( findLineEdit, SIGNAL( textChanged(const QString&) ), this, SLOT( selectionChanged_slot() ) ); | ||
96 | connect( caseSensCheckBox, SIGNAL( stateChanged(int) ), this, SLOT( selectionChanged_slot() ) ); | ||
97 | connect( exactCheckBox, SIGNAL( stateChanged(int) ), this, SLOT( selectionChanged_slot() ) ); | ||
98 | |||
99 | } | ||
100 | |||
101 | /* | ||
102 | * Destroys the object and frees any allocated resources | ||
103 | */ | ||
104 | findWnd::~findWnd() | ||
105 | { | ||
106 | // no need to delete child widgets, Qt does it all for us | ||
107 | } | ||
108 | |||
109 | void findWnd::findButton_slot() | ||
110 | { | ||
111 | qWarning( "findWnd::findButton_slot(): Not implemented yet" ); | ||
112 | } | ||
113 | |||
114 | void findWnd::selectionChanged_slot() | ||
115 | { | ||
116 | qWarning( "findWnd::selectionChanged_slot(): Not implemented yet" ); | ||
117 | } | ||
118 | |||
119 | void findWnd::closeButton_slot() | ||
120 | { | ||
121 | qWarning( "findWnd::closeButton_slot(): Not implemented yet" ); | ||
122 | } | ||
123 | |||
diff --git a/pwmanager/pwmanager/findwnd_emb.h b/pwmanager/pwmanager/findwnd_emb.h new file mode 100644 index 0000000..9ad5a73 --- a/dev/null +++ b/pwmanager/pwmanager/findwnd_emb.h | |||
@@ -0,0 +1,62 @@ | |||
1 | /* | ||
2 | This file is part of PwManager/Platform independent. | ||
3 | Copyright (c) 2004 Ulf Schenk | ||
4 | |||
5 | This program is free software; you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published by | ||
7 | the Free Software Foundation; either version 2 of the License, or | ||
8 | (at your option) any later version. | ||
9 | |||
10 | This program is distributed in the hope that it will be useful, | ||
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | GNU General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU General Public License | ||
16 | along with this program; if not, write to the Free Software | ||
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
18 | |||
19 | As a special exception, permission is given to link this program | ||
20 | with any edition of Qt, and distribute the resulting executable, | ||
21 | without including the source code for Qt in the source distribution. | ||
22 | |||
23 | $Id$ | ||
24 | */ | ||
25 | |||
26 | |||
27 | #ifndef FINDWND_EMB_H | ||
28 | #define FINDWND_EMB_H | ||
29 | |||
30 | #include <kdialogbase.h> | ||
31 | |||
32 | |||
33 | class QLineEdit; | ||
34 | class QCheckBox; | ||
35 | class QRadioButton; | ||
36 | |||
37 | |||
38 | class findWnd : public KDialogBase | ||
39 | { | ||
40 | Q_OBJECT | ||
41 | |||
42 | public: | ||
43 | findWnd( QWidget* parent = 0, const char* name = 0 ); | ||
44 | ~findWnd(); | ||
45 | |||
46 | QLineEdit* findLineEdit; | ||
47 | QCheckBox* exactCheckBox; | ||
48 | QCheckBox* caseSensCheckBox; | ||
49 | QRadioButton* descRadioButton; | ||
50 | QRadioButton* pwRadioButton; | ||
51 | QRadioButton* commentRadioButton; | ||
52 | QRadioButton* nameRadioButton; | ||
53 | QRadioButton* urlRadioButton; | ||
54 | QRadioButton* launcherRadioButton; | ||
55 | |||
56 | public slots: | ||
57 | virtual void findButton_slot(); | ||
58 | virtual void selectionChanged_slot(); | ||
59 | virtual void closeButton_slot(); | ||
60 | }; | ||
61 | |||
62 | #endif // FINDWND_H | ||
diff --git a/pwmanager/pwmanager/findwndimpl.cpp b/pwmanager/pwmanager/findwndimpl.cpp index fec1a6a..059219f 100644 --- a/pwmanager/pwmanager/findwndimpl.cpp +++ b/pwmanager/pwmanager/findwndimpl.cpp | |||
@@ -99,27 +99,40 @@ void FindWndImpl::findButton_slot() | |||
99 | } | 99 | } |
100 | currFoundPos = 0; | 100 | currFoundPos = 0; |
101 | } | 101 | } |
102 | 102 | ||
103 | int lvp = doc->getListViewPos(parent->getCurrentCategory(), | 103 | int lvp = doc->getListViewPos(parent->getCurrentCategory(), |
104 | foundPositions[currFoundPos++]); | 104 | foundPositions[currFoundPos++]); |
105 | emit foundAt(numEntries - 1 - lvp); | 105 | emit foundAt(numEntries - 1 - lvp); |
106 | 106 | ||
107 | if (currFoundPos + 1 > static_cast<int>(foundPositions.size())) | 107 | if (currFoundPos + 1 > static_cast<int>(foundPositions.size())) |
108 | currFoundPos = 0; | 108 | currFoundPos = 0; |
109 | } | 109 | } |
110 | 110 | ||
111 | |||
112 | #ifdef PWM_EMBEDDED | ||
113 | void FindWndImpl::slotOk() | ||
114 | { | ||
115 | findButton_slot(); | ||
116 | |||
117 | //do not call KDialogBase::slotOk() here | ||
118 | // user should press the close button instead | ||
119 | } | ||
120 | #endif | ||
121 | |||
111 | void FindWndImpl::closeButton_slot() | 122 | void FindWndImpl::closeButton_slot() |
112 | { | 123 | { |
124 | #ifndef PWM_EMBEDDED | ||
113 | done(0); | 125 | done(0); |
126 | #endif | ||
114 | } | 127 | } |
115 | 128 | ||
116 | void FindWndImpl::selectionChanged_slot() | 129 | void FindWndImpl::selectionChanged_slot() |
117 | { | 130 | { |
118 | fAt = 0; | 131 | fAt = 0; |
119 | refVal = 0; | 132 | refVal = 0; |
120 | currFoundPos = -1; | 133 | currFoundPos = -1; |
121 | } | 134 | } |
122 | 135 | ||
123 | #ifndef PWM_EMBEDDED | 136 | #ifndef PWM_EMBEDDED |
124 | #include "findwndimpl.moc" | 137 | #include "findwndimpl.moc" |
125 | #endif | 138 | #endif |
diff --git a/pwmanager/pwmanager/findwndimpl.h b/pwmanager/pwmanager/findwndimpl.h index d8cb65d..b601390 100644 --- a/pwmanager/pwmanager/findwndimpl.h +++ b/pwmanager/pwmanager/findwndimpl.h | |||
@@ -11,47 +11,55 @@ | |||
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 FINDWNDIMPL_H | 20 | #ifndef FINDWNDIMPL_H |
21 | #define FINDWNDIMPL_H | 21 | #define FINDWNDIMPL_H |
22 | 22 | ||
23 | #ifndef PWM_EMBEDDED | ||
23 | #include "findwnd.h" | 24 | #include "findwnd.h" |
25 | #else | ||
26 | #include "findwnd_emb.h" | ||
27 | #endif | ||
24 | 28 | ||
25 | class PwMView; | 29 | class PwMView; |
26 | 30 | ||
27 | /** "add" Window */ | 31 | /** "add" Window */ |
28 | class FindWndImpl : public findWnd | 32 | class FindWndImpl : public findWnd |
29 | { | 33 | { |
30 | Q_OBJECT | 34 | Q_OBJECT |
31 | public: | 35 | public: |
32 | FindWndImpl(PwMView *_parent); | 36 | FindWndImpl(PwMView *_parent); |
33 | ~FindWndImpl(); | 37 | ~FindWndImpl(); |
34 | 38 | ||
35 | signals: | 39 | signals: |
36 | void foundAt(int index); | 40 | void foundAt(int index); |
37 | 41 | ||
38 | public slots: | 42 | public slots: |
39 | /** find button pressed */ | 43 | /** find button pressed */ |
40 | void findButton_slot(); | 44 | void findButton_slot(); |
41 | /** close button pressed */ | 45 | /** close button pressed */ |
42 | void closeButton_slot(); | 46 | void closeButton_slot(); |
43 | /** selection of one of the radio buttons changed */ | 47 | /** selection of one of the radio buttons changed */ |
44 | void selectionChanged_slot(); | 48 | void selectionChanged_slot(); |
45 | 49 | ||
50 | #ifdef PWM_EMBEDDED | ||
51 | virtual void slotOk(); | ||
52 | #endif | ||
53 | |||
46 | protected: | 54 | protected: |
47 | /** parent view */ | 55 | /** parent view */ |
48 | PwMView *parent; | 56 | PwMView *parent; |
49 | /** entry found at */ | 57 | /** entry found at */ |
50 | unsigned int fAt; | 58 | unsigned int fAt; |
51 | /** reference value */ | 59 | /** reference value */ |
52 | unsigned int refVal; | 60 | unsigned int refVal; |
53 | /** current position in the found-items-vector */ | 61 | /** current position in the found-items-vector */ |
54 | int currFoundPos; | 62 | int currFoundPos; |
55 | /** the number of entries in the current category */ | 63 | /** the number of entries in the current category */ |
56 | unsigned int numEntries; | 64 | unsigned int numEntries; |
57 | /** index number of the current category */ | 65 | /** index number of the current category */ |
diff --git a/pwmanager/pwmanager/getmasterpwwnd_emb.cpp b/pwmanager/pwmanager/getmasterpwwnd_emb.cpp new file mode 100644 index 0000000..3519de8 --- a/dev/null +++ b/pwmanager/pwmanager/getmasterpwwnd_emb.cpp | |||
@@ -0,0 +1,86 @@ | |||
1 | /* | ||
2 | This file is part of PwManager/Platform independent. | ||
3 | Copyright (c) 2004 Ulf Schenk | ||
4 | |||
5 | This program is free software; you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published by | ||
7 | the Free Software Foundation; either version 2 of the License, or | ||
8 | (at your option) any later version. | ||
9 | |||
10 | This program is distributed in the hope that it will be useful, | ||
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | GNU General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU General Public License | ||
16 | along with this program; if not, write to the Free Software | ||
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
18 | |||
19 | As a special exception, permission is given to link this program | ||
20 | with any edition of Qt, and distribute the resulting executable, | ||
21 | without including the source code for Qt in the source distribution. | ||
22 | |||
23 | $Id$ | ||
24 | */ | ||
25 | |||
26 | #include "getmasterpwwnd_emb.h" | ||
27 | |||
28 | #include "klocale.h" | ||
29 | /* | ||
30 | #include <qvariant.h> | ||
31 | #include <qpushbutton.h> | ||
32 | #include <qlabel.h> | ||
33 | #include <qlineedit.h> | ||
34 | #include <qlayout.h> | ||
35 | #include <qtooltip.h> | ||
36 | #include <qwhatsthis.h> | ||
37 | */ | ||
38 | |||
39 | #include <qwidget.h> | ||
40 | #include <qlayout.h> | ||
41 | #include <qlabel.h> | ||
42 | #include <qlineedit.h> | ||
43 | |||
44 | /* | ||
45 | * Constructs a getMasterPwWnd as a child of 'parent', with the | ||
46 | * name 'name' | ||
47 | */ | ||
48 | getMasterPwWnd::getMasterPwWnd( QWidget* parent, const char* name) | ||
49 | : KDialogBase( KDialogBase::Plain, i18n( "Master-password" ), | ||
50 | KDialogBase::Ok | KDialogBase::Cancel, | ||
51 | KDialogBase::Ok, parent, name, true ) | ||
52 | { | ||
53 | QWidget *page = plainPage(); | ||
54 | QVBoxLayout *pageLayout = new QVBoxLayout( page ); | ||
55 | |||
56 | pwLineEdit = new QLineEdit( page, "pwLineEdit" ); | ||
57 | pwLineEdit->setEchoMode( QLineEdit::Password ); | ||
58 | |||
59 | QLabel* textLabel1 = new QLabel( pwLineEdit, i18n("Please enter the master-password:"), page, "textLabel1" ); | ||
60 | textLabel1->setAlignment( int( QLabel::WordBreak | QLabel::AlignCenter ) ); | ||
61 | pageLayout->addWidget(textLabel1); | ||
62 | pageLayout->addWidget(pwLineEdit); | ||
63 | |||
64 | |||
65 | resize( QSize(200, 100) ); | ||
66 | |||
67 | } | ||
68 | |||
69 | /* | ||
70 | * Destroys the object and frees any allocated resources | ||
71 | */ | ||
72 | getMasterPwWnd::~getMasterPwWnd() | ||
73 | { | ||
74 | // no need to delete child widgets, Qt does it all for us | ||
75 | } | ||
76 | |||
77 | void getMasterPwWnd::okButton_slot() | ||
78 | { | ||
79 | qWarning( "getMasterPwWnd::okButton_slot(): Not implemented yet" ); | ||
80 | } | ||
81 | |||
82 | void getMasterPwWnd::cancelButton_slot() | ||
83 | { | ||
84 | qWarning( "getMasterPwWnd::cancelButton_slot(): Not implemented yet" ); | ||
85 | } | ||
86 | |||
diff --git a/pwmanager/pwmanager/getmasterpwwnd_emb.h b/pwmanager/pwmanager/getmasterpwwnd_emb.h new file mode 100644 index 0000000..64121c4 --- a/dev/null +++ b/pwmanager/pwmanager/getmasterpwwnd_emb.h | |||
@@ -0,0 +1,48 @@ | |||
1 | /* | ||
2 | This file is part of PwManager/Platform independent. | ||
3 | Copyright (c) 2004 Ulf Schenk | ||
4 | |||
5 | This program is free software; you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published by | ||
7 | the Free Software Foundation; either version 2 of the License, or | ||
8 | (at your option) any later version. | ||
9 | |||
10 | This program is distributed in the hope that it will be useful, | ||
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | GNU General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU General Public License | ||
16 | along with this program; if not, write to the Free Software | ||
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
18 | |||
19 | As a special exception, permission is given to link this program | ||
20 | with any edition of Qt, and distribute the resulting executable, | ||
21 | without including the source code for Qt in the source distribution. | ||
22 | |||
23 | $Id$ | ||
24 | */ | ||
25 | |||
26 | #ifndef GETMASTERPWWND_EMB_H | ||
27 | #define GETMASTERPWWND_EMB_H | ||
28 | |||
29 | #include <kdialogbase.h> | ||
30 | |||
31 | class QLineEdit; | ||
32 | |||
33 | class getMasterPwWnd : public KDialogBase | ||
34 | { | ||
35 | Q_OBJECT | ||
36 | |||
37 | public: | ||
38 | getMasterPwWnd( QWidget* parent = 0, const char* name = 0); | ||
39 | ~getMasterPwWnd(); | ||
40 | |||
41 | QLineEdit* pwLineEdit; | ||
42 | |||
43 | public slots: | ||
44 | virtual void okButton_slot(); | ||
45 | virtual void cancelButton_slot(); | ||
46 | }; | ||
47 | |||
48 | #endif // GETMASTERPWWND_H | ||
diff --git a/pwmanager/pwmanager/getmasterpwwndimpl.cpp b/pwmanager/pwmanager/getmasterpwwndimpl.cpp index db0223e..6be9618 100644 --- a/pwmanager/pwmanager/getmasterpwwndimpl.cpp +++ b/pwmanager/pwmanager/getmasterpwwndimpl.cpp | |||
@@ -23,24 +23,38 @@ | |||
23 | 23 | ||
24 | GetMasterPwWndImpl::GetMasterPwWndImpl(QWidget * parent, const char *name) | 24 | GetMasterPwWndImpl::GetMasterPwWndImpl(QWidget * parent, const char *name) |
25 | : getMasterPwWnd(parent, name) | 25 | : getMasterPwWnd(parent, name) |
26 | { | 26 | { |
27 | } | 27 | } |
28 | 28 | ||
29 | GetMasterPwWndImpl::~GetMasterPwWndImpl() | 29 | GetMasterPwWndImpl::~GetMasterPwWndImpl() |
30 | { | 30 | { |
31 | } | 31 | } |
32 | 32 | ||
33 | void GetMasterPwWndImpl::okButton_slot() | 33 | void GetMasterPwWndImpl::okButton_slot() |
34 | { | 34 | { |
35 | #ifndef PWM_EMBEDDED | ||
35 | if (pwLineEdit->text() != "") | 36 | if (pwLineEdit->text() != "") |
36 | done(1); | 37 | done(1); |
38 | #endif | ||
37 | } | 39 | } |
38 | 40 | ||
39 | void GetMasterPwWndImpl::cancelButton_slot() | 41 | void GetMasterPwWndImpl::cancelButton_slot() |
40 | { | 42 | { |
43 | #ifndef PWM_EMBEDDED | ||
41 | done(2); | 44 | done(2); |
45 | #endif | ||
46 | } | ||
47 | |||
48 | #ifdef PWM_EMBEDDED | ||
49 | void GetMasterPwWndImpl::slotOk() | ||
50 | { | ||
51 | if (pwLineEdit->text() != "") | ||
52 | getMasterPwWnd::slotOk(); | ||
53 | else | ||
54 | return; | ||
42 | } | 55 | } |
56 | #endif | ||
43 | 57 | ||
44 | #ifndef PWM_EMBEDDED | 58 | #ifndef PWM_EMBEDDED |
45 | #include "getmasterpwwndimpl.moc" | 59 | #include "getmasterpwwndimpl.moc" |
46 | #endif | 60 | #endif |
diff --git a/pwmanager/pwmanager/getmasterpwwndimpl.h b/pwmanager/pwmanager/getmasterpwwndimpl.h index 28aa427..8a4c03e 100644 --- a/pwmanager/pwmanager/getmasterpwwndimpl.h +++ b/pwmanager/pwmanager/getmasterpwwndimpl.h | |||
@@ -11,30 +11,37 @@ | |||
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 GETMASTERPWWNDIMPL_H | 20 | #ifndef GETMASTERPWWNDIMPL_H |
21 | #define GETMASTERPWWNDIMPL_H | 21 | #define GETMASTERPWWNDIMPL_H |
22 | 22 | ||
23 | #ifndef PWM_EMBEDDED | ||
23 | #include "getmasterpwwnd.h" | 24 | #include "getmasterpwwnd.h" |
25 | #else | ||
26 | #include "getmasterpwwnd_emb.h" | ||
27 | #endif | ||
24 | 28 | ||
25 | /** set master pw wnd */ | 29 | /** set master pw wnd */ |
26 | class GetMasterPwWndImpl : public getMasterPwWnd | 30 | class GetMasterPwWndImpl : public getMasterPwWnd |
27 | { | 31 | { |
28 | Q_OBJECT | 32 | Q_OBJECT |
29 | public: | 33 | public: |
30 | GetMasterPwWndImpl(QWidget* parent = 0, const char *name = 0); | 34 | GetMasterPwWndImpl(QWidget* parent = 0, const char *name = 0); |
31 | ~GetMasterPwWndImpl(); | 35 | ~GetMasterPwWndImpl(); |
32 | 36 | ||
33 | public slots: | 37 | public slots: |
34 | /** ok button pressed */ | 38 | /** ok button pressed */ |
35 | void okButton_slot(); | 39 | void okButton_slot(); |
36 | /** cancel button pressed */ | 40 | /** cancel button pressed */ |
37 | void cancelButton_slot(); | 41 | void cancelButton_slot(); |
42 | #ifdef PWM_EMBEDDED | ||
43 | virtual void slotOk(); | ||
44 | #endif | ||
38 | }; | 45 | }; |
39 | 46 | ||
40 | #endif | 47 | #endif |
diff --git a/pwmanager/pwmanager/listviewpwm.cpp b/pwmanager/pwmanager/listviewpwm.cpp index b987c9e..c53cfd7 100644 --- a/pwmanager/pwmanager/listviewpwm.cpp +++ b/pwmanager/pwmanager/listviewpwm.cpp | |||
@@ -16,51 +16,62 @@ | |||
16 | * | 16 | * |
17 | * $Id$ | 17 | * $Id$ |
18 | **************************************************************************/ | 18 | **************************************************************************/ |
19 | 19 | ||
20 | #include "listviewpwm.h" | 20 | #include "listviewpwm.h" |
21 | #include "pwmexception.h" | 21 | #include "pwmexception.h" |
22 | 22 | ||
23 | #include <qpainter.h> | 23 | #include <qpainter.h> |
24 | #include <qpixmap.h> | 24 | #include <qpixmap.h> |
25 | 25 | ||
26 | #include <kiconloader.h> | 26 | #include <kiconloader.h> |
27 | 27 | ||
28 | #ifdef PWM_EMBEDDED | ||
29 | #include <kglobal.h> | ||
30 | #endif | ||
28 | 31 | ||
29 | ListViewPwM::ListViewPwM(QWidget *parent, const char *name) | 32 | ListViewPwM::ListViewPwM(QWidget *parent, const char *name) |
30 | : KListView(parent, name) | 33 | : KListView(parent, name) |
31 | { | 34 | { |
32 | //setResizeMode(QListView::AllColumns); | 35 | //setResizeMode(QListView::AllColumns); |
33 | } | 36 | } |
34 | 37 | ||
35 | bool ListViewPwM::event(QEvent *e) | 38 | bool ListViewPwM::event(QEvent *e) |
36 | { | 39 | { |
37 | if (e->type() == QEvent::LayoutHint) | 40 | if (e->type() == QEvent::LayoutHint) |
38 | emit layoutChanged(); | 41 | emit layoutChanged(); |
39 | return KListView::event(e); | 42 | return KListView::event(e); |
40 | } | 43 | } |
41 | 44 | ||
42 | 45 | ||
43 | QPixmap * ListViewItemPwM::onPix = 0; | 46 | QPixmap * ListViewItemPwM::onPix = 0; |
44 | QPixmap * ListViewItemPwM::offPix = 0; | 47 | QPixmap * ListViewItemPwM::offPix = 0; |
45 | 48 | ||
46 | ListViewItemPwM::ListViewItemPwM(QListView *parent) | 49 | ListViewItemPwM::ListViewItemPwM(QListView *parent) |
47 | : QCheckListItem(parent, "", QCheckListItem::CheckBox) | 50 | : QCheckListItem(parent, "", QCheckListItem::CheckBox) |
48 | { | 51 | { |
49 | if (!onPix) { | 52 | if (!onPix) { |
50 | PWM_ASSERT(!offPix); | 53 | PWM_ASSERT(!offPix); |
54 | KIconLoader* picons; | ||
55 | #ifndef PWM_EMBEDDED | ||
56 | KIconLoader il; | ||
57 | picons = &il; | ||
58 | #else | ||
59 | picons = KGlobal::iconLoader(); | ||
60 | #endif | ||
61 | |||
51 | KIconLoader il; | 62 | KIconLoader il; |
52 | static QPixmap onP(il.loadIcon("button_ok", KIcon::Small)); | 63 | static QPixmap onP(picons->loadIcon("button_ok", KIcon::Small)); |
53 | onPix = &onP; | 64 | onPix = &onP; |
54 | static QPixmap offP(il.loadIcon("encrypted", KIcon::Small)); | 65 | static QPixmap offP(picons->loadIcon("encrypted", KIcon::Small)); |
55 | offPix = &offP; | 66 | offPix = &offP; |
56 | } | 67 | } |
57 | } | 68 | } |
58 | 69 | ||
59 | void ListViewItemPwM::paintCell(QPainter *p, const QColorGroup &cg, | 70 | void ListViewItemPwM::paintCell(QPainter *p, const QColorGroup &cg, |
60 | int column, int width, int align) | 71 | int column, int width, int align) |
61 | { | 72 | { |
62 | if (!p) | 73 | if (!p) |
63 | return; | 74 | return; |
64 | if (column != 0) { | 75 | if (column != 0) { |
65 | QCheckListItem::paintCell(p, cg, column, width, align); | 76 | QCheckListItem::paintCell(p, cg, column, width, align); |
66 | return; | 77 | return; |
diff --git a/pwmanager/pwmanager/main.cpp b/pwmanager/pwmanager/main.cpp index d720e1f..3ae4d55 100644 --- a/pwmanager/pwmanager/main.cpp +++ b/pwmanager/pwmanager/main.cpp | |||
@@ -13,24 +13,25 @@ | |||
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_EMBEDDED | 20 | #ifndef PWM_EMBEDDED |
21 | #include <kcmdlineargs.h> | 21 | #include <kcmdlineargs.h> |
22 | #include <kaboutdata.h> | 22 | #include <kaboutdata.h> |
23 | #else | 23 | #else |
24 | #include <qdir.h> | 24 | #include <qdir.h> |
25 | #include <kpimglobalprefs.h> | ||
25 | #endif | 26 | #endif |
26 | 27 | ||
27 | #include <klocale.h> | 28 | #include <klocale.h> |
28 | #include <kstandarddirs.h> | 29 | #include <kstandarddirs.h> |
29 | 30 | ||
30 | #include "pwmexception.h" | 31 | #include "pwmexception.h" |
31 | #include "pwminit.h" | 32 | #include "pwminit.h" |
32 | 33 | ||
33 | #define LICENSE_FILE(::locate("data", "pwmanager/pwmanager_license_text")) | 34 | #define LICENSE_FILE(::locate("data", "pwmanager/pwmanager_license_text")) |
34 | 35 | ||
35 | int PwMApplication::newInstance() | 36 | int PwMApplication::newInstance() |
36 | { | 37 | { |
@@ -176,24 +177,25 @@ int main(int argc, char *argv[]) | |||
176 | //US if ( QApplication::desktop()->width() > 320 ) | 177 | //US if ( QApplication::desktop()->width() > 320 ) |
177 | //US KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/pwmanager/icons22/"); | 178 | //US KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/pwmanager/icons22/"); |
178 | //US else | 179 | //US else |
179 | KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/pwmanager/icons16/"); | 180 | KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/pwmanager/icons16/"); |
180 | #else | 181 | #else |
181 | QString fileName ; | 182 | QString fileName ; |
182 | fileName = qApp->applicationDirPath () + "/kdepim/pwmanager/icons22/"; | 183 | fileName = qApp->applicationDirPath () + "/kdepim/pwmanager/icons22/"; |
183 | KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); | 184 | KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); |
184 | QApplication::addLibraryPath ( qApp->applicationDirPath () ); | 185 | QApplication::addLibraryPath ( qApp->applicationDirPath () ); |
185 | 186 | ||
186 | #endif | 187 | #endif |
187 | KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "pwmanager"))); | 188 | KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "pwmanager"))); |
189 | KPimGlobalPrefs::instance()->setGlobalConfig(); | ||
188 | 190 | ||
189 | a.newInstance(); | 191 | a.newInstance(); |
190 | 192 | ||
191 | //US KAddressBookMain m ; | 193 | //US KAddressBookMain m ; |
192 | 194 | ||
193 | //US QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); | 195 | //US QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); |
194 | /*US | 196 | /*US |
195 | #ifndef DESKTOP_VERSION | 197 | #ifndef DESKTOP_VERSION |
196 | a.showMainWidget( &m ); | 198 | a.showMainWidget( &m ); |
197 | #else | 199 | #else |
198 | a.setMainWidget( &m ); | 200 | a.setMainWidget( &m ); |
199 | m.resize (640, 480 ); | 201 | m.resize (640, 480 ); |
diff --git a/pwmanager/pwmanager/pwgenwnd_emb.cpp b/pwmanager/pwmanager/pwgenwnd_emb.cpp index 9655e9f..429904c 100644 --- a/pwmanager/pwmanager/pwgenwnd_emb.cpp +++ b/pwmanager/pwmanager/pwgenwnd_emb.cpp | |||
@@ -36,27 +36,24 @@ $Id$ | |||
36 | #include "klocale.h" | 36 | #include "klocale.h" |
37 | 37 | ||
38 | /* | 38 | /* |
39 | * Constructs a pwGenWnd as a child of 'parent', with the | 39 | * Constructs a pwGenWnd as a child of 'parent', with the |
40 | * name 'name'. | 40 | * name 'name'. |
41 | * | 41 | * |
42 | */ | 42 | */ |
43 | pwGenWnd::pwGenWnd( QWidget* parent, const char* name) | 43 | pwGenWnd::pwGenWnd( QWidget* parent, const char* name) |
44 | : KDialogBase( KDialogBase::Plain, i18n( "Password generator" ), | 44 | : KDialogBase( KDialogBase::Plain, i18n( "Password generator" ), |
45 | KDialogBase::Ok | KDialogBase::Cancel, | 45 | KDialogBase::Ok | KDialogBase::Cancel, |
46 | KDialogBase::Ok, parent, name, true ) | 46 | KDialogBase::Ok, parent, name, true ) |
47 | { | 47 | { |
48 | if ( !name ) | ||
49 | setName( "pwGenWnd" ); | ||
50 | |||
51 | QWidget *page = plainPage(); | 48 | QWidget *page = plainPage(); |
52 | QVBoxLayout* pwGenWndLayout = new QVBoxLayout( page, 11, 6, "pwGenWndLayout"); | 49 | QVBoxLayout* pwGenWndLayout = new QVBoxLayout( page, 11, 6, "pwGenWndLayout"); |
53 | 50 | ||
54 | QGroupBox* groupBox1 = new QGroupBox( page, "groupBox1" ); | 51 | QGroupBox* groupBox1 = new QGroupBox( page, "groupBox1" ); |
55 | groupBox1->setTitle( i18n( "Character set:" ) ); | 52 | groupBox1->setTitle( i18n( "Character set:" ) ); |
56 | groupBox1->setColumnLayout(0, Qt::Vertical ); | 53 | groupBox1->setColumnLayout(0, Qt::Vertical ); |
57 | groupBox1->layout()->setSpacing( 6 ); | 54 | groupBox1->layout()->setSpacing( 6 ); |
58 | groupBox1->layout()->setMargin( 11 ); | 55 | groupBox1->layout()->setMargin( 11 ); |
59 | QVBoxLayout* groupBox1Layout = new QVBoxLayout( groupBox1->layout() ); | 56 | QVBoxLayout* groupBox1Layout = new QVBoxLayout( groupBox1->layout() ); |
60 | groupBox1Layout->setAlignment( Qt::AlignTop ); | 57 | groupBox1Layout->setAlignment( Qt::AlignTop ); |
61 | 58 | ||
62 | int_charLowerCheckBox = new QCheckBox( i18n("Lowercase (abc)"), groupBox1, "int_charLowerCheckBox" ); | 59 | int_charLowerCheckBox = new QCheckBox( i18n("Lowercase (abc)"), groupBox1, "int_charLowerCheckBox" ); |
diff --git a/pwmanager/pwmanager/pwm.cpp b/pwmanager/pwmanager/pwm.cpp index 107e845..bd07c80 100644 --- a/pwmanager/pwmanager/pwm.cpp +++ b/pwmanager/pwmanager/pwm.cpp | |||
@@ -348,31 +348,36 @@ void PwM::initMenubar() | |||
348 | } | 348 | } |
349 | 349 | ||
350 | void PwM::initToolbar() | 350 | void PwM::initToolbar() |
351 | { | 351 | { |
352 | KIconLoader* picons; | 352 | KIconLoader* picons; |
353 | #ifndef PWM_EMBEDDED | 353 | #ifndef PWM_EMBEDDED |
354 | KIconLoader icons; | 354 | KIconLoader icons; |
355 | picons = &icons; | 355 | picons = &icons; |
356 | #else | 356 | #else |
357 | picons = KGlobal::iconLoader(); | 357 | picons = KGlobal::iconLoader(); |
358 | #endif | 358 | #endif |
359 | 359 | ||
360 | #ifdef PWM_EMBEDDED | ||
361 | if ( QApplication::desktop()->width() > 320 ) | ||
362 | #endif | ||
363 | { | ||
360 | toolBar()->insertButton(picons->loadIcon("filenew", KIcon::Toolbar), | 364 | toolBar()->insertButton(picons->loadIcon("filenew", KIcon::Toolbar), |
361 | BUTTON_TOOL_NEW, SIGNAL(clicked(int)), this, | 365 | BUTTON_TOOL_NEW, SIGNAL(clicked(int)), this, |
362 | SLOT(new_slot()), true, i18n("New")); | 366 | SLOT(new_slot()), true, i18n("New")); |
363 | toolBar()->insertButton(picons->loadIcon("fileopen", KIcon::Toolbar), | 367 | toolBar()->insertButton(picons->loadIcon("fileopen", KIcon::Toolbar), |
364 | BUTTON_TOOL_OPEN, SIGNAL(clicked(int)), this, | 368 | BUTTON_TOOL_OPEN, SIGNAL(clicked(int)), this, |
365 | SLOT(open_slot()), true, i18n("Open")); | 369 | SLOT(open_slot()), true, i18n("Open")); |
366 | toolBar()->insertSeparator(); | 370 | toolBar()->insertSeparator(); |
371 | } | ||
367 | toolBar()->insertButton(picons->loadIcon("filesave", KIcon::Toolbar), | 372 | toolBar()->insertButton(picons->loadIcon("filesave", KIcon::Toolbar), |
368 | BUTTON_TOOL_SAVE, SIGNAL(clicked(int)), this, | 373 | BUTTON_TOOL_SAVE, SIGNAL(clicked(int)), this, |
369 | SLOT(save_slot()), true, i18n("Save")); | 374 | SLOT(save_slot()), true, i18n("Save")); |
370 | toolBar()->insertButton(picons->loadIcon("filesaveas", KIcon::Toolbar), | 375 | toolBar()->insertButton(picons->loadIcon("filesaveas", KIcon::Toolbar), |
371 | BUTTON_TOOL_SAVEAS, SIGNAL(clicked(int)), this, | 376 | BUTTON_TOOL_SAVEAS, SIGNAL(clicked(int)), this, |
372 | SLOT(saveAs_slot()), true, i18n("Save as")); | 377 | SLOT(saveAs_slot()), true, i18n("Save as")); |
373 | toolBar()->insertButton(picons->loadIcon("fileprint", KIcon::Toolbar), | 378 | toolBar()->insertButton(picons->loadIcon("fileprint", KIcon::Toolbar), |
374 | BUTTON_TOOL_PRINT, SIGNAL(clicked(int)), this, | 379 | BUTTON_TOOL_PRINT, SIGNAL(clicked(int)), this, |
375 | SLOT(print_slot()), true, i18n("Print...")); | 380 | SLOT(print_slot()), true, i18n("Print...")); |
376 | toolBar()->insertSeparator(); | 381 | toolBar()->insertSeparator(); |
377 | toolBar()->insertButton(picons->loadIcon("pencil", KIcon::Toolbar), | 382 | toolBar()->insertButton(picons->loadIcon("pencil", KIcon::Toolbar), |
378 | BUTTON_TOOL_ADD, SIGNAL(clicked(int)), this, | 383 | BUTTON_TOOL_ADD, SIGNAL(clicked(int)), this, |
@@ -716,26 +721,26 @@ void PwM::deletePwd_slot() | |||
716 | } | 721 | } |
717 | 722 | ||
718 | PwMDataItem currItem; | 723 | PwMDataItem currItem; |
719 | QString curCategory = view->getCurrentCategory(); | 724 | QString curCategory = view->getCurrentCategory(); |
720 | if (!curDoc()->getEntry(curCategory, curEntryIndex, &currItem)) { | 725 | if (!curDoc()->getEntry(curCategory, curEntryIndex, &currItem)) { |
721 | printDebug("couldn't get entry"); | 726 | printDebug("couldn't get entry"); |
722 | curDoc()->timer()->putLock(DocTimer::id_autoLockTimer); | 727 | curDoc()->timer()->putLock(DocTimer::id_autoLockTimer); |
723 | return; | 728 | return; |
724 | } | 729 | } |
725 | if (KMessageBox:: | 730 | if (KMessageBox:: |
726 | questionYesNo(this, | 731 | questionYesNo(this, |
727 | i18n | 732 | i18n |
728 | ("Do you really want to delete the selected entry") + | 733 | ("Do you really want to delete\nthe selected entry") + |
729 | " \"" + QString(currItem.desc.c_str()) | 734 | " \n\"" + QString(currItem.desc.c_str()) |
730 | + "\" ?", i18n("delete?")) | 735 | + "\" ?", i18n("delete?")) |
731 | == KMessageBox::Yes) { | 736 | == KMessageBox::Yes) { |
732 | 737 | ||
733 | curDoc()->delEntry(curCategory, curEntryIndex); | 738 | curDoc()->delEntry(curCategory, curEntryIndex); |
734 | } | 739 | } |
735 | curDoc()->timer()->putLock(DocTimer::id_autoLockTimer); | 740 | curDoc()->timer()->putLock(DocTimer::id_autoLockTimer); |
736 | } | 741 | } |
737 | 742 | ||
738 | void PwM::changeMasterPwd_slot() | 743 | void PwM::changeMasterPwd_slot() |
739 | { | 744 | { |
740 | PWM_ASSERT(curDoc()); | 745 | PWM_ASSERT(curDoc()); |
741 | curDoc()->changeCurrentPw(); | 746 | curDoc()->changeCurrentPw(); |
@@ -1273,37 +1278,33 @@ void PwM::createAboutData_slot() | |||
1273 | QMessageBox::about( this, "About PwManager/Pi", | 1278 | QMessageBox::about( this, "About PwManager/Pi", |
1274 | "PwManager/Platform-independent\n" | 1279 | "PwManager/Platform-independent\n" |
1275 | "(PWM/Pi) " +version + " - " + | 1280 | "(PWM/Pi) " +version + " - " + |
1276 | #ifdef DESKTOP_VERSION | 1281 | #ifdef DESKTOP_VERSION |
1277 | "Desktop Edition\n" | 1282 | "Desktop Edition\n" |
1278 | #else | 1283 | #else |
1279 | "PDA-Edition\n" | 1284 | "PDA-Edition\n" |
1280 | "for: Zaurus 5500 / 7x0 / 8x0\n" | 1285 | "for: Zaurus 5500 / 7x0 / 8x0\n" |
1281 | #endif | 1286 | #endif |
1282 | 1287 | ||
1283 | "(c) 2004 Ulf Schenk\n" | 1288 | "(c) 2004 Ulf Schenk\n" |
1284 | "(c) 2004 Lutz Rogowski\n" | 1289 | "(c) 2004 Lutz Rogowski\n" |
1285 | "(c) 1997-2003, The KDE PIM Team\n" | 1290 | "(c) 1997-2004, The KDE PIM Team\n" |
1286 | 1291 | ||
1287 | "Michael Buesch - main programming and current maintainer\nmbuesch@freenet.de\n" | 1292 | "(c) Michael Buesch - main programming\nand current maintainer\nmbuesch@freenet.de\n" |
1288 | "Matt Scifo - original implementaion of \n" | 1293 | "Matt Scifo - mscifo@o1.com\n" |
1289 | "\"categories\" and the password-tree \n" | 1294 | "Elias Probst - elias.probst@gmx.de\n" |
1290 | "in the system-tray. Original implementations of \n" | 1295 | "George Staikos - staikos@kde.org\n" |
1291 | "numerous view-improvements.\n" | 1296 | "Matthew Palmer - mjp16@uow.edu.au\n" |
1292 | "mscifo@o1.com\n" | 1297 | "Olivier Sessink - gpasman@nl.linux.org\n" |
1293 | "Elias Probst - Gentoo ebuild maintainer.\nelias.probst@gmx.de\n" | 1298 | "The libgcrypt developers -\nBlowfish and SHA1 algorithms\nftp://ftp.gnupg.org/gcrypt/alpha/libgcrypt/\n" |
1294 | "George Staikos - KWallet\nstaikos@kde.org\n" | 1299 | "Troy Engel - tengel@sonic.net\n" |
1295 | "Matthew Palmer - rc2 code\nmjp16@uow.edu.au\n" | 1300 | "Wickey - wickey@gmx.at\n" |
1296 | "Olivier Sessink - gpasman\ngpasman@nl.linux.org\n" | ||
1297 | "The libgcrypt developers - Blowfish and SHA1 algorithms\nftp://ftp.gnupg.org/gcrypt/alpha/libgcrypt/\n" | ||
1298 | "Troy Engel - kpasman\n tengel@sonic.net\n" | ||
1299 | "Wickey - graphics-design in older versions\nwickey@gmx.at\n" | ||
1300 | "Ian MacGregor - original documentation author.\n" | 1301 | "Ian MacGregor - original documentation author.\n" |
1301 | ); | 1302 | ); |
1302 | } | 1303 | } |
1303 | 1304 | ||
1304 | #endif | 1305 | #endif |
1305 | 1306 | ||
1306 | 1307 | ||
1307 | #ifndef PWM_EMBEDDED | 1308 | #ifndef PWM_EMBEDDED |
1308 | #include "pwm.moc" | 1309 | #include "pwm.moc" |
1309 | #endif | 1310 | #endif |
diff --git a/pwmanager/pwmanager/pwmanagerE.pro b/pwmanager/pwmanager/pwmanagerE.pro index 87142b7..b0c9236 100644 --- a/pwmanager/pwmanager/pwmanagerE.pro +++ b/pwmanager/pwmanager/pwmanagerE.pro | |||
@@ -39,29 +39,29 @@ LIBS += $(QTOPIALIB) | |||
39 | #selftest.h | 39 | #selftest.h |
40 | 40 | ||
41 | HEADERS = \ | 41 | HEADERS = \ |
42 | addentrywnd_emb.h \ | 42 | addentrywnd_emb.h \ |
43 | addentrywndimpl.h \ | 43 | addentrywndimpl.h \ |
44 | base64.h \ | 44 | base64.h \ |
45 | binentrygen.h \ | 45 | binentrygen.h \ |
46 | blowfish.h \ | 46 | blowfish.h \ |
47 | commentbox.h \ | 47 | commentbox.h \ |
48 | compiler.h \ | 48 | compiler.h \ |
49 | compressbzip2.h \ | 49 | compressbzip2.h \ |
50 | compressgzip.h \ | 50 | compressgzip.h \ |
51 | findwnd.h \ | 51 | findwnd_emb.h \ |
52 | findwndimpl.h \ | 52 | findwndimpl.h \ |
53 | genpasswd.h \ | 53 | genpasswd.h \ |
54 | getkeycardwnd.h \ | 54 | getkeycardwnd.h \ |
55 | getmasterpwwnd.h \ | 55 | getmasterpwwnd_emb.h \ |
56 | getmasterpwwndimpl.h \ | 56 | getmasterpwwndimpl.h \ |
57 | globalstuff.h \ | 57 | globalstuff.h \ |
58 | gpasmanfile.h \ | 58 | gpasmanfile.h \ |
59 | htmlgen.h \ | 59 | htmlgen.h \ |
60 | htmlparse.h \ | 60 | htmlparse.h \ |
61 | ipc.h \ | 61 | ipc.h \ |
62 | listobjselectwnd.h \ | 62 | listobjselectwnd.h \ |
63 | listviewpwm.h \ | 63 | listviewpwm.h \ |
64 | printtext.h \ | 64 | printtext.h \ |
65 | pwgenwnd_emb.h \ | 65 | pwgenwnd_emb.h \ |
66 | pwgenwndimpl.h \ | 66 | pwgenwndimpl.h \ |
67 | pwmdoc.h \ | 67 | pwmdoc.h \ |
@@ -71,25 +71,25 @@ pwm.h \ | |||
71 | pwminit.h \ | 71 | pwminit.h \ |
72 | pwmprefs.h \ | 72 | pwmprefs.h \ |
73 | pwmprint.h \ | 73 | pwmprint.h \ |
74 | pwmtray.h \ | 74 | pwmtray.h \ |
75 | pwmview.h \ | 75 | pwmview.h \ |
76 | pwmviewstyle_0.h \ | 76 | pwmviewstyle_0.h \ |
77 | pwmviewstyle_1.h \ | 77 | pwmviewstyle_1.h \ |
78 | pwmviewstyle.h \ | 78 | pwmviewstyle.h \ |
79 | randomizer.h \ | 79 | randomizer.h \ |
80 | rc2.h \ | 80 | rc2.h \ |
81 | rencatwnd.h \ | 81 | rencatwnd.h \ |
82 | serializer.h \ | 82 | serializer.h \ |
83 | setmasterpwwnd.h \ | 83 | setmasterpwwnd_emb.h \ |
84 | setmasterpwwndimpl.h \ | 84 | setmasterpwwndimpl.h \ |
85 | sha1.h \ | 85 | sha1.h \ |
86 | subtbledit.h \ | 86 | subtbledit.h \ |
87 | subtbleditimpl.h \ | 87 | subtbleditimpl.h \ |
88 | waitwnd.h \ | 88 | waitwnd.h \ |
89 | kcmconfigs/kcmpwmconfig.h \ | 89 | kcmconfigs/kcmpwmconfig.h \ |
90 | kcmconfigs/pwmconfigwidget.h \ | 90 | kcmconfigs/pwmconfigwidget.h \ |
91 | 91 | ||
92 | #sources that need not be build | 92 | #sources that need not be build |
93 | #SOURCES = \ | 93 | #SOURCES = \ |
94 | #advcommeditimpl.cpp \ | 94 | #advcommeditimpl.cpp \ |
95 | #configuration.cpp \ | 95 | #configuration.cpp \ |
@@ -102,29 +102,29 @@ kcmconfigs/pwmconfigwidget.h \ | |||
102 | #pwmprint.cpp \ | 102 | #pwmprint.cpp \ |
103 | #spinforsignal.cpp | 103 | #spinforsignal.cpp |
104 | 104 | ||
105 | SOURCES = \ | 105 | SOURCES = \ |
106 | addentrywnd_emb.cpp \ | 106 | addentrywnd_emb.cpp \ |
107 | addentrywndimpl.cpp \ | 107 | addentrywndimpl.cpp \ |
108 | base64.cpp \ | 108 | base64.cpp \ |
109 | binentrygen.cpp \ | 109 | binentrygen.cpp \ |
110 | blowfish.cpp \ | 110 | blowfish.cpp \ |
111 | commentbox.cpp \ | 111 | commentbox.cpp \ |
112 | compressbzip2.cpp \ | 112 | compressbzip2.cpp \ |
113 | compressgzip.cpp \ | 113 | compressgzip.cpp \ |
114 | findwnd.cpp \ | 114 | findwnd_emb.cpp \ |
115 | findwndimpl.cpp \ | 115 | findwndimpl.cpp \ |
116 | genpasswd.cpp \ | 116 | genpasswd.cpp \ |
117 | getkeycardwnd.cpp \ | 117 | getkeycardwnd.cpp \ |
118 | getmasterpwwnd.cpp \ | 118 | getmasterpwwnd_emb.cpp \ |
119 | getmasterpwwndimpl.cpp \ | 119 | getmasterpwwndimpl.cpp \ |
120 | globalstuff.cpp \ | 120 | globalstuff.cpp \ |
121 | gpasmanfile.cpp \ | 121 | gpasmanfile.cpp \ |
122 | htmlgen.cpp \ | 122 | htmlgen.cpp \ |
123 | ipc.cpp \ | 123 | ipc.cpp \ |
124 | listobjselectwnd.cpp \ | 124 | listobjselectwnd.cpp \ |
125 | listviewpwm.cpp \ | 125 | listviewpwm.cpp \ |
126 | main.cpp \ | 126 | main.cpp \ |
127 | pwgenwnd_emb.cpp \ | 127 | pwgenwnd_emb.cpp \ |
128 | pwgenwndimpl.cpp \ | 128 | pwgenwndimpl.cpp \ |
129 | pwm.cpp \ | 129 | pwm.cpp \ |
130 | pwmdoc.cpp \ | 130 | pwmdoc.cpp \ |
@@ -132,22 +132,22 @@ pwmdocui.cpp \ | |||
132 | pwmexception.cpp \ | 132 | pwmexception.cpp \ |
133 | pwminit.cpp \ | 133 | pwminit.cpp \ |
134 | pwmprefs.cpp \ | 134 | pwmprefs.cpp \ |
135 | pwmtray.cpp \ | 135 | pwmtray.cpp \ |
136 | pwmview.cpp \ | 136 | pwmview.cpp \ |
137 | pwmviewstyle_0.cpp \ | 137 | pwmviewstyle_0.cpp \ |
138 | pwmviewstyle_1.cpp \ | 138 | pwmviewstyle_1.cpp \ |
139 | pwmviewstyle.cpp \ | 139 | pwmviewstyle.cpp \ |
140 | randomizer.cpp \ | 140 | randomizer.cpp \ |
141 | rc2.cpp \ | 141 | rc2.cpp \ |
142 | rencatwnd.cpp \ | 142 | rencatwnd.cpp \ |
143 | serializer.cpp \ | 143 | serializer.cpp \ |
144 | setmasterpwwnd.cpp \ | 144 | setmasterpwwnd_emb.cpp \ |
145 | setmasterpwwndimpl.cpp \ | 145 | setmasterpwwndimpl.cpp \ |
146 | sha1.cpp \ | 146 | sha1.cpp \ |
147 | subtbledit.cpp \ | 147 | subtbledit.cpp \ |
148 | subtbleditimpl.cpp \ | 148 | subtbleditimpl.cpp \ |
149 | waitwnd.cpp \ | 149 | waitwnd.cpp \ |
150 | kcmconfigs/kcmpwmconfig.cpp \ | 150 | kcmconfigs/kcmpwmconfig.cpp \ |
151 | kcmconfigs/pwmconfigwidget.cpp \ | 151 | kcmconfigs/pwmconfigwidget.cpp \ |
152 | 152 | ||
153 | 153 | ||
diff --git a/pwmanager/pwmanager/pwmdocui.cpp b/pwmanager/pwmanager/pwmdocui.cpp index 3993fa8..e42dd9d 100644 --- a/pwmanager/pwmanager/pwmdocui.cpp +++ b/pwmanager/pwmanager/pwmdocui.cpp | |||
@@ -70,48 +70,50 @@ QString PwMDocUi::requestMpw(bool chipcard) | |||
70 | spinner, SLOT(u32_str_slot(uint32_t, const string &))); | 70 | spinner, SLOT(u32_str_slot(uint32_t, const string &))); |
71 | keyCard->getKey(); | 71 | keyCard->getKey(); |
72 | spinner->spin(&id, &ret); | 72 | spinner->spin(&id, &ret); |
73 | disconnect(keyCard, SIGNAL(keyAvailable(uint32_t, const string &)), | 73 | disconnect(keyCard, SIGNAL(keyAvailable(uint32_t, const string &)), |
74 | spinner, SLOT(u32_str_slot(uint32_t, const string &))); | 74 | spinner, SLOT(u32_str_slot(uint32_t, const string &))); |
75 | if (ret == "") | 75 | if (ret == "") |
76 | return ""; | 76 | return ""; |
77 | pw = ret.c_str(); | 77 | pw = ret.c_str(); |
78 | #else // CONFIG_KEYCARD | 78 | #else // CONFIG_KEYCARD |
79 | no_keycard_support_msg_box(currentView); | 79 | no_keycard_support_msg_box(currentView); |
80 | #endif // CONFIG_KEYCARD | 80 | #endif // CONFIG_KEYCARD |
81 | } else { | 81 | } else { |
82 | GetMasterPwWndImpl pwWnd; | ||
83 | #ifndef PWM_EMBEDDED | 82 | #ifndef PWM_EMBEDDED |
83 | GetMasterPwWndImpl pwWnd; | ||
84 | KWin::setState(pwWnd.winId(), NET::StaysOnTop); | 84 | KWin::setState(pwWnd.winId(), NET::StaysOnTop); |
85 | #else | ||
86 | GetMasterPwWndImpl pwWnd; | ||
85 | #endif | 87 | #endif |
86 | if (pwWnd.exec() != 1) | 88 | if (pwWnd.exec() != 1) |
87 | return ""; | 89 | return ""; |
88 | pw = pwWnd.pwLineEdit->text(); | 90 | pw = pwWnd.pwLineEdit->text(); |
89 | } | 91 | } |
90 | 92 | ||
91 | return pw; | 93 | return pw; |
92 | } | 94 | } |
93 | 95 | ||
94 | QString PwMDocUi::requestNewMpw(bool *chipcard) | 96 | QString PwMDocUi::requestNewMpw(bool *chipcard) |
95 | { | 97 | { |
96 | QString pw; | 98 | QString pw; |
97 | SetMasterPwWndImpl pwWnd(currentView); | 99 | SetMasterPwWndImpl pwWnd(currentView); |
98 | pwWnd.setPwMKeyCard(keyCard); | 100 | pwWnd.setPwMKeyCard(keyCard); |
99 | #ifndef PWM_EMBEDDED | ||
100 | if (!chipcard) { | 101 | if (!chipcard) { |
102 | #ifndef PWM_EMBEDDED | ||
101 | pwWnd.mainTab->removePage(pwWnd.mainTab->page(1)); | 103 | pwWnd.mainTab->removePage(pwWnd.mainTab->page(1)); |
102 | } | ||
103 | #else | 104 | #else |
104 | qDebug("PwMDocUi::requestNewMpw must be implemented"); | 105 | pwWnd.mainTab->removePage(pwWnd.tab_2); |
105 | #endif | 106 | #endif |
107 | } | ||
106 | 108 | ||
107 | if (pwWnd.exec() != 1) | 109 | if (pwWnd.exec() != 1) |
108 | return ""; | 110 | return ""; |
109 | pw = pwWnd.getPw(chipcard).c_str(); | 111 | pw = pwWnd.getPw(chipcard).c_str(); |
110 | 112 | ||
111 | return pw; | 113 | return pw; |
112 | } | 114 | } |
113 | 115 | ||
114 | QString PwMDocUi::requestMpwChange(const QString *currentPw, bool *chipcard) | 116 | QString PwMDocUi::requestMpwChange(const QString *currentPw, bool *chipcard) |
115 | { | 117 | { |
116 | QString pw(requestMpw(*chipcard)); | 118 | QString pw(requestMpw(*chipcard)); |
117 | if (pw == "") | 119 | if (pw == "") |
@@ -128,25 +130,25 @@ QString PwMDocUi::requestMpwChange(const QString *currentPw, bool *chipcard) | |||
128 | } | 130 | } |
129 | 131 | ||
130 | void PwMDocUi::wrongMpwMsgBox(bool chipcard, QString prefix, QString postfix) | 132 | void PwMDocUi::wrongMpwMsgBox(bool chipcard, QString prefix, QString postfix) |
131 | { | 133 | { |
132 | QString msg; | 134 | QString msg; |
133 | if (prefix != "") { | 135 | if (prefix != "") { |
134 | msg += prefix; | 136 | msg += prefix; |
135 | msg += "\n"; | 137 | msg += "\n"; |
136 | } | 138 | } |
137 | 139 | ||
138 | if (chipcard) { | 140 | if (chipcard) { |
139 | msg += i18n("Wrong key-card!\n" | 141 | msg += i18n("Wrong key-card!\n" |
140 | "Please try again with the " | 142 | "Please try again with the\n" |
141 | "correct key-card."); | 143 | "correct key-card."); |
142 | } else { | 144 | } else { |
143 | msg += i18n("Wrong master-password!\n" | 145 | msg += i18n("Wrong master-password!\n" |
144 | "Please try again."); | 146 | "Please try again."); |
145 | } | 147 | } |
146 | 148 | ||
147 | if (postfix != "") { | 149 | if (postfix != "") { |
148 | msg += "\n"; | 150 | msg += "\n"; |
149 | msg += postfix; | 151 | msg += postfix; |
150 | } | 152 | } |
151 | KMessageBox::error(currentView, msg, | 153 | KMessageBox::error(currentView, msg, |
152 | (chipcard) ? (i18n("wrong chipcard")) | 154 | (chipcard) ? (i18n("wrong chipcard")) |
@@ -154,25 +156,25 @@ void PwMDocUi::wrongMpwMsgBox(bool chipcard, QString prefix, QString postfix) | |||
154 | } | 156 | } |
155 | 157 | ||
156 | void PwMDocUi::noMpwMsgBox(bool chipcard, QString prefix, QString postfix) | 158 | void PwMDocUi::noMpwMsgBox(bool chipcard, QString prefix, QString postfix) |
157 | { | 159 | { |
158 | QString msg; | 160 | QString msg; |
159 | if (prefix != "") { | 161 | if (prefix != "") { |
160 | msg += prefix; | 162 | msg += prefix; |
161 | msg += "\n"; | 163 | msg += "\n"; |
162 | } | 164 | } |
163 | 165 | ||
164 | if (chipcard) { | 166 | if (chipcard) { |
165 | msg += i18n("No key-card found!\n" | 167 | msg += i18n("No key-card found!\n" |
166 | "Please insert the " | 168 | "Please insert the\n" |
167 | "correct key-card."); | 169 | "correct key-card."); |
168 | } else { | 170 | } else { |
169 | msg += i18n("No master-password given!"); | 171 | msg += i18n("No master-password given!"); |
170 | } | 172 | } |
171 | 173 | ||
172 | if (postfix != "") { | 174 | if (postfix != "") { |
173 | msg += "\n"; | 175 | msg += "\n"; |
174 | msg += postfix; | 176 | msg += postfix; |
175 | } | 177 | } |
176 | KMessageBox::error(currentView, msg, | 178 | KMessageBox::error(currentView, msg, |
177 | (chipcard) ? (i18n("no chipcard")) | 179 | (chipcard) ? (i18n("no chipcard")) |
178 | : (i18n("password error"))); | 180 | : (i18n("password error"))); |
@@ -351,24 +353,25 @@ bool PwMDocUi::openDocUi(PwMDoc *doc, | |||
351 | while (true) { | 353 | while (true) { |
352 | int lockStat = -1; | 354 | int lockStat = -1; |
353 | if (openDeepLocked) { | 355 | if (openDeepLocked) { |
354 | lockStat = 2; | 356 | lockStat = 2; |
355 | } else { | 357 | } else { |
356 | if (conf()->confGlobUnlockOnOpen()) { | 358 | if (conf()->confGlobUnlockOnOpen()) { |
357 | lockStat = 0; | 359 | lockStat = 0; |
358 | } else { | 360 | } else { |
359 | lockStat = 1; | 361 | lockStat = 1; |
360 | } | 362 | } |
361 | } | 363 | } |
362 | ret = doc->openDoc(&filename, lockStat); | 364 | ret = doc->openDoc(&filename, lockStat); |
365 | qDebug("pwmdocui::OpenDocui %i", ret); | ||
363 | if (ret != e_success) { | 366 | if (ret != e_success) { |
364 | if (ret == e_readFile || ret == e_openFile) { | 367 | if (ret == e_readFile || ret == e_openFile) { |
365 | KMessageBox::error(getCurrentView(), | 368 | KMessageBox::error(getCurrentView(), |
366 | i18n("Could not read file!") | 369 | i18n("Could not read file!") |
367 | + "\n" | 370 | + "\n" |
368 | + filename, | 371 | + filename, |
369 | i18n("file error")); | 372 | i18n("file error")); |
370 | goto cancelOpen; | 373 | goto cancelOpen; |
371 | } | 374 | } |
372 | if (ret == e_alreadyOpen) { | 375 | if (ret == e_alreadyOpen) { |
373 | KMessageBox::error(getCurrentView(), | 376 | KMessageBox::error(getCurrentView(), |
374 | i18n("This file is already open."), | 377 | i18n("This file is already open."), |
diff --git a/pwmanager/pwmanager/pwmviewstyle.cpp b/pwmanager/pwmanager/pwmviewstyle.cpp index 67b5197..51d8f6c 100644 --- a/pwmanager/pwmanager/pwmviewstyle.cpp +++ b/pwmanager/pwmanager/pwmviewstyle.cpp | |||
@@ -16,36 +16,44 @@ | |||
16 | * and was modified to run on embedded devices that run microkde | 16 | * and was modified to run on embedded devices that run microkde |
17 | * | 17 | * |
18 | * $Id$ | 18 | * $Id$ |
19 | **************************************************************************/ | 19 | **************************************************************************/ |
20 | 20 | ||
21 | #include "pwmviewstyle.h" | 21 | #include "pwmviewstyle.h" |
22 | #include "pwmexception.h" | 22 | #include "pwmexception.h" |
23 | #include "pwmviewstyle_0.h" | 23 | #include "pwmviewstyle_0.h" |
24 | #include "pwmviewstyle_1.h" | 24 | #include "pwmviewstyle_1.h" |
25 | #include "listviewpwm.h" | 25 | #include "listviewpwm.h" |
26 | #include "pwmview.h" | 26 | #include "pwmview.h" |
27 | #include "commentbox.h" | 27 | #include "commentbox.h" |
28 | 28 | #ifndef PWM_EMBEDDED | |
29 | #include "configuration.h" | ||
30 | #else | ||
31 | #include "pwmprefs.h" | ||
32 | #endif | ||
29 | 33 | ||
30 | PwMViewStyle::PwMViewStyle(QWidget *parent, const char *name) | 34 | PwMViewStyle::PwMViewStyle(QWidget *parent, const char *name) |
31 | : QWidget(parent, name) | 35 | : QWidget(parent, name) |
32 | { | 36 | { |
33 | curStyle = style_notset; | 37 | curStyle = style_notset; |
34 | s0 = 0; | 38 | s0 = 0; |
35 | s1 = 0; | 39 | s1 = 0; |
36 | } | 40 | } |
37 | 41 | ||
38 | PwMViewStyle::~PwMViewStyle() | 42 | PwMViewStyle::~PwMViewStyle() |
39 | { | 43 | { |
44 | //US ENH : load and store the size of the listviewcolumns | ||
45 | lv->saveLayout(conf()->getConfig(), "listview"); | ||
46 | conf()->getConfig()->sync(); | ||
47 | |||
40 | delete_ifnot_null(s0); | 48 | delete_ifnot_null(s0); |
41 | delete_ifnot_null(s1); | 49 | delete_ifnot_null(s1); |
42 | } | 50 | } |
43 | 51 | ||
44 | void PwMViewStyle::initStyle(style_t style) | 52 | void PwMViewStyle::initStyle(style_t style) |
45 | { | 53 | { |
46 | printDebug(string("initializing style ") + tostr(style)); | 54 | printDebug(string("initializing style ") + tostr(style)); |
47 | bool wasMaximized = v->isMaximized(); | 55 | bool wasMaximized = v->isMaximized(); |
48 | if (v->isVisible()) | 56 | if (v->isVisible()) |
49 | v->hide(); | 57 | v->hide(); |
50 | switch (style) { | 58 | switch (style) { |
51 | case style_0: | 59 | case style_0: |
@@ -70,24 +78,28 @@ void PwMViewStyle::initStyle(style_t style) | |||
70 | connect(lv, SIGNAL(pressed(QListViewItem *)), | 78 | connect(lv, SIGNAL(pressed(QListViewItem *)), |
71 | v, SLOT(handleToggle(QListViewItem *))); | 79 | v, SLOT(handleToggle(QListViewItem *))); |
72 | connect(lv, SIGNAL(rightButtonClicked(QListViewItem *, const QPoint &, int)), | 80 | connect(lv, SIGNAL(rightButtonClicked(QListViewItem *, const QPoint &, int)), |
73 | v, SLOT(handleRightClick(QListViewItem *, const QPoint &, int))); | 81 | v, SLOT(handleRightClick(QListViewItem *, const QPoint &, int))); |
74 | connect(lv, SIGNAL(clicked(QListViewItem *)), | 82 | connect(lv, SIGNAL(clicked(QListViewItem *)), |
75 | v, SLOT(refreshCommentTextEdit(QListViewItem *))); | 83 | v, SLOT(refreshCommentTextEdit(QListViewItem *))); |
76 | lv->addColumn(i18n("Description"), 180); | 84 | lv->addColumn(i18n("Description"), 180); |
77 | lv->addColumn(i18n("Username"), 150); | 85 | lv->addColumn(i18n("Username"), 150); |
78 | lv->addColumn(i18n("Password"), 150); | 86 | lv->addColumn(i18n("Password"), 150); |
79 | lv->addColumn(i18n("URL"), 180); | 87 | lv->addColumn(i18n("URL"), 180); |
80 | lv->addColumn(i18n("Launcher"), 120); | 88 | lv->addColumn(i18n("Launcher"), 120); |
81 | v->tmpReEnableSort(); | 89 | v->tmpReEnableSort(); |
90 | |||
91 | //US ENH : load and store the size of the listviewcolumns | ||
92 | lv->restoreLayout(conf()->getConfig(), "listview"); | ||
93 | |||
82 | resizeView(v->size()); | 94 | resizeView(v->size()); |
83 | v->updateView(); | 95 | v->updateView(); |
84 | if (wasMaximized) { | 96 | if (wasMaximized) { |
85 | v->showMaximized(); | 97 | v->showMaximized(); |
86 | } else { | 98 | } else { |
87 | v->show(); | 99 | v->show(); |
88 | } | 100 | } |
89 | connect(lv, SIGNAL(layoutChanged()), | 101 | connect(lv, SIGNAL(layoutChanged()), |
90 | v, SLOT(reorgLp())); | 102 | v, SLOT(reorgLp())); |
91 | } | 103 | } |
92 | 104 | ||
93 | void PwMViewStyle::resizeView(const QSize &size) | 105 | void PwMViewStyle::resizeView(const QSize &size) |
diff --git a/pwmanager/pwmanager/serializer.cpp b/pwmanager/pwmanager/serializer.cpp index f29ef6c..2810b48 100644 --- a/pwmanager/pwmanager/serializer.cpp +++ b/pwmanager/pwmanager/serializer.cpp | |||
@@ -18,25 +18,25 @@ | |||
18 | * $Id$ | 18 | * $Id$ |
19 | **************************************************************************/ | 19 | **************************************************************************/ |
20 | 20 | ||
21 | #include "serializer.h" | 21 | #include "serializer.h" |
22 | #include "pwmexception.h" | 22 | #include "pwmexception.h" |
23 | 23 | ||
24 | #ifdef PWM_EMBEDDED | 24 | #ifdef PWM_EMBEDDED |
25 | #include <kglobal.h> | 25 | #include <kglobal.h> |
26 | #include <klocale.h> | 26 | #include <klocale.h> |
27 | #endif | 27 | #endif |
28 | 28 | ||
29 | /* enable/disable serializer debugging (0/1) */ | 29 | /* enable/disable serializer debugging (0/1) */ |
30 | #define SERIALIZER_DEBUG0 | 30 | #define SERIALIZER_DEBUG1 |
31 | /* use the old xml tags for writing (0/1) */ | 31 | /* use the old xml tags for writing (0/1) */ |
32 | #define USE_OLD_TAGS 0 | 32 | #define USE_OLD_TAGS 0 |
33 | /* write a CDATA section (0/1) */ | 33 | /* write a CDATA section (0/1) */ |
34 | #define WRITE_CDATA_SEC 0 | 34 | #define WRITE_CDATA_SEC 0 |
35 | 35 | ||
36 | 36 | ||
37 | #define META_CREATE_DATE"c" | 37 | #define META_CREATE_DATE"c" |
38 | #define META_VALID_DATE "v" | 38 | #define META_VALID_DATE "v" |
39 | #define META_EXPIRE_DATE"e" | 39 | #define META_EXPIRE_DATE"e" |
40 | #define META_UPDATE_DATE"u" | 40 | #define META_UPDATE_DATE"u" |
41 | #define META_UPDATE_INT "i" | 41 | #define META_UPDATE_INT "i" |
42 | //US ENH : uniqueid | 42 | //US ENH : uniqueid |
diff --git a/pwmanager/pwmanager/setmasterpwwnd_emb.cpp b/pwmanager/pwmanager/setmasterpwwnd_emb.cpp new file mode 100644 index 0000000..e6471e6 --- a/dev/null +++ b/pwmanager/pwmanager/setmasterpwwnd_emb.cpp | |||
@@ -0,0 +1,163 @@ | |||
1 | /* | ||
2 | This file is part of PwManager/Platform independent. | ||
3 | Copyright (c) 2004 Ulf Schenk | ||
4 | |||
5 | This program is free software; you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published by | ||
7 | the Free Software Foundation; either version 2 of the License, or | ||
8 | (at your option) any later version. | ||
9 | |||
10 | This program is distributed in the hope that it will be useful, | ||
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | GNU General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU General Public License | ||
16 | along with this program; if not, write to the Free Software | ||
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
18 | |||
19 | As a special exception, permission is given to link this program | ||
20 | with any edition of Qt, and distribute the resulting executable, | ||
21 | without including the source code for Qt in the source distribution. | ||
22 | |||
23 | $Id$ | ||
24 | */ | ||
25 | |||
26 | #include "setmasterpwwnd_emb.h" | ||
27 | |||
28 | #include <qpushbutton.h> | ||
29 | #include <qtabwidget.h> | ||
30 | #include <qwidget.h> | ||
31 | #include <qlabel.h> | ||
32 | #include <qlineedit.h> | ||
33 | #include <qlayout.h> | ||
34 | |||
35 | #include <klocale.h> | ||
36 | |||
37 | /*US | ||
38 | #include <qvariant.h> | ||
39 | #include <qpushbutton.h> | ||
40 | #include <qtabwidget.h> | ||
41 | #include <qwidget.h> | ||
42 | #include <qlabel.h> | ||
43 | #include <qlineedit.h> | ||
44 | #include <qlayout.h> | ||
45 | #include <qtooltip.h> | ||
46 | #include <qwhatsthis.h> | ||
47 | */ | ||
48 | |||
49 | /* | ||
50 | * Constructs a setMasterPwWnd as a child of 'parent', with the | ||
51 | * name 'name' | ||
52 | * | ||
53 | */ | ||
54 | setMasterPwWnd::setMasterPwWnd( QWidget* parent, const char* name ) | ||
55 | : KDialogBase( KDialogBase::Plain, i18n( "Set master-password" ), | ||
56 | KDialogBase::Ok | KDialogBase::Cancel, | ||
57 | KDialogBase::Ok, parent, name, true ) | ||
58 | { | ||
59 | QWidget *page = plainPage(); | ||
60 | QVBoxLayout *pageLayout = new QVBoxLayout( page ); | ||
61 | |||
62 | mainTab = new QTabWidget( page ); | ||
63 | pageLayout->addWidget( mainTab ); | ||
64 | |||
65 | |||
66 | if ( !name ) | ||
67 | setName( "setMasterPwWnd" ); | ||
68 | |||
69 | //////////////////////////////////////////////////////////////////// | ||
70 | // This is the Password tab1 | ||
71 | tab = new QWidget( mainTab ); | ||
72 | |||
73 | QGridLayout *layout = new QGridLayout( tab, 5, 1 ); | ||
74 | layout->setMargin( KDialogBase::marginHint() ); | ||
75 | layout->setSpacing( KDialogBase::spacingHint() ); | ||
76 | |||
77 | QLabel* label = new QLabel( i18n( "Using a normal password-string to encrypt the data." ), tab ); | ||
78 | label->setAlignment( int( QLabel::WordBreak | QLabel::AlignCenter ) ); | ||
79 | layout->addWidget(label, 0, 0); | ||
80 | |||
81 | pwEdit_1 = new QLineEdit( tab, "pwEdit_1" ); | ||
82 | pwEdit_1->setEchoMode( QLineEdit::Password ); | ||
83 | |||
84 | label = new QLabel( pwEdit_1, i18n( "Please enter the new master-password:" ), tab ); | ||
85 | layout->addWidget(label, 1, 0); | ||
86 | layout->addWidget(pwEdit_1, 2, 0); | ||
87 | |||
88 | pwEdit_2 = new QLineEdit( tab, "pwEdit_2" ); | ||
89 | pwEdit_2->setEchoMode( QLineEdit::Password ); | ||
90 | |||
91 | label = new QLabel( pwEdit_2, i18n( "Please enter the password again:" ), tab ); | ||
92 | layout->addWidget(label, 3, 0); | ||
93 | layout->addWidget(pwEdit_2, 4, 0); | ||
94 | |||
95 | mainTab->insertTab( tab, i18n("Normal password") ); | ||
96 | |||
97 | |||
98 | //////////////////////////////////////////////////////////////////// | ||
99 | // This is the Password tab2 | ||
100 | tab_2 = new QWidget( mainTab ); | ||
101 | |||
102 | layout = new QGridLayout( tab_2, 5, 1 ); | ||
103 | layout->setMargin( KDialogBase::marginHint() ); | ||
104 | layout->setSpacing( KDialogBase::spacingHint() ); | ||
105 | |||
106 | label = new QLabel( i18n( "Using a PwM key-card to encrypt the data." ), tab_2 ); | ||
107 | label->setAlignment( int( QLabel::WordBreak | QLabel::AlignCenter ) ); | ||
108 | layout->addWidget(label, 0, 0); | ||
109 | |||
110 | label = new QLabel( i18n( "selected card:" ), tab_2 ); | ||
111 | label->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); | ||
112 | layout->addWidget(label, 1, 0); | ||
113 | |||
114 | selCardButton = new QPushButton( i18n( "&Select the currently inserted card as key-card" ), tab_2 ); | ||
115 | layout->addWidget(selCardButton, 2, 0); | ||
116 | |||
117 | genCardButton = new QPushButton( i18n( "&generate new key-card") , tab_2 ); | ||
118 | layout->addWidget(genCardButton, 3, 0); | ||
119 | |||
120 | curCardIdLabel = new QLabel( QString("") , tab_2 ); | ||
121 | layout->addWidget(curCardIdLabel, 4, 0); | ||
122 | |||
123 | mainTab->insertTab( tab_2, i18n("Key-card (chipcard)" ) ); | ||
124 | |||
125 | |||
126 | // resize( QSize(411, 313).expandedTo(minimumSizeHint()) ); | ||
127 | |||
128 | // signals and slots connections | ||
129 | // connect( okButton, SIGNAL( clicked() ), this, SLOT( okButton_slot() ) ); | ||
130 | // connect( cancelButton, SIGNAL( clicked() ), this, SLOT( cancelButton_slot() ) ); | ||
131 | connect( genCardButton, SIGNAL( clicked() ), this, SLOT( genCardButton_slot() ) ); | ||
132 | connect( selCardButton, SIGNAL( clicked() ), this, SLOT( selCardButton_slot() ) ); | ||
133 | |||
134 | } | ||
135 | |||
136 | /* | ||
137 | * Destroys the object and frees any allocated resources | ||
138 | */ | ||
139 | setMasterPwWnd::~setMasterPwWnd() | ||
140 | { | ||
141 | // no need to delete child widgets, Qt does it all for us | ||
142 | } | ||
143 | |||
144 | void setMasterPwWnd::okButton_slot() | ||
145 | { | ||
146 | qWarning( "setMasterPwWnd::okButton_slot(): Not implemented yet" ); | ||
147 | } | ||
148 | |||
149 | void setMasterPwWnd::cancelButton_slot() | ||
150 | { | ||
151 | qWarning( "setMasterPwWnd::cancelButton_slot(): Not implemented yet" ); | ||
152 | } | ||
153 | |||
154 | void setMasterPwWnd::genCardButton_slot() | ||
155 | { | ||
156 | qWarning( "setMasterPwWnd::genCardButton_slot(): Not implemented yet" ); | ||
157 | } | ||
158 | |||
159 | void setMasterPwWnd::selCardButton_slot() | ||
160 | { | ||
161 | qWarning( "setMasterPwWnd::selCardButton_slot(): Not implemented yet" ); | ||
162 | } | ||
163 | |||
diff --git a/pwmanager/pwmanager/setmasterpwwnd_emb.h b/pwmanager/pwmanager/setmasterpwwnd_emb.h new file mode 100644 index 0000000..c8ddec6 --- a/dev/null +++ b/pwmanager/pwmanager/setmasterpwwnd_emb.h | |||
@@ -0,0 +1,62 @@ | |||
1 | /* | ||
2 | This file is part of PwManager/Platform independent. | ||
3 | Copyright (c) 2004 Ulf Schenk | ||
4 | |||
5 | This program is free software; you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published by | ||
7 | the Free Software Foundation; either version 2 of the License, or | ||
8 | (at your option) any later version. | ||
9 | |||
10 | This program is distributed in the hope that it will be useful, | ||
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | GNU General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU General Public License | ||
16 | along with this program; if not, write to the Free Software | ||
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
18 | |||
19 | As a special exception, permission is given to link this program | ||
20 | with any edition of Qt, and distribute the resulting executable, | ||
21 | without including the source code for Qt in the source distribution. | ||
22 | |||
23 | $Id$ | ||
24 | */ | ||
25 | |||
26 | #ifndef SETMASTERPWWND_EMB_H | ||
27 | #define SETMASTERPWWND_EMB_H | ||
28 | |||
29 | #include <kdialogbase.h> | ||
30 | |||
31 | class QLineEdit; | ||
32 | class QPushButton; | ||
33 | class QLabel; | ||
34 | class QTabWidget; | ||
35 | class QWidget; | ||
36 | |||
37 | class setMasterPwWnd : public KDialogBase | ||
38 | { | ||
39 | Q_OBJECT | ||
40 | |||
41 | public: | ||
42 | setMasterPwWnd( QWidget* parent = 0, const char* name = 0 ); | ||
43 | ~setMasterPwWnd(); | ||
44 | |||
45 | QTabWidget* mainTab; | ||
46 | QWidget* tab; | ||
47 | QWidget* tab_2; | ||
48 | QLineEdit* pwEdit_1; | ||
49 | QLineEdit* pwEdit_2; | ||
50 | QPushButton* selCardButton; | ||
51 | QPushButton* genCardButton; | ||
52 | QLabel* curCardIdLabel; | ||
53 | |||
54 | public slots: | ||
55 | virtual void okButton_slot(); | ||
56 | virtual void cancelButton_slot(); | ||
57 | virtual void genCardButton_slot(); | ||
58 | virtual void selCardButton_slot(); | ||
59 | |||
60 | }; | ||
61 | |||
62 | #endif // SETMASTERPWWND_H | ||
diff --git a/pwmanager/pwmanager/setmasterpwwndimpl.cpp b/pwmanager/pwmanager/setmasterpwwndimpl.cpp index aac0408..3482643 100644 --- a/pwmanager/pwmanager/setmasterpwwndimpl.cpp +++ b/pwmanager/pwmanager/setmasterpwwndimpl.cpp | |||
@@ -37,36 +37,38 @@ | |||
37 | #define STRING_CARD_NONE(SetMasterPwWndImpl::string_cardNone()) | 37 | #define STRING_CARD_NONE(SetMasterPwWndImpl::string_cardNone()) |
38 | 38 | ||
39 | 39 | ||
40 | SetMasterPwWndImpl::SetMasterPwWndImpl(QWidget * parent, const char *name) | 40 | SetMasterPwWndImpl::SetMasterPwWndImpl(QWidget * parent, const char *name) |
41 | : setMasterPwWnd(parent, name) | 41 | : setMasterPwWnd(parent, name) |
42 | { | 42 | { |
43 | #ifdef CONFIG_KEYCARD | 43 | #ifdef CONFIG_KEYCARD |
44 | curCardIdLabel->setText(STRING_CARD_NONE); | 44 | curCardIdLabel->setText(STRING_CARD_NONE); |
45 | #else // CONFIG_KEYCARD | 45 | #else // CONFIG_KEYCARD |
46 | #ifndef PWM_EMBEDDED | 46 | #ifndef PWM_EMBEDDED |
47 | mainTab->removePage(mainTab->page(1)); | 47 | mainTab->removePage(mainTab->page(1)); |
48 | #else | 48 | #else |
49 | qDebug("SetMasterPwWndImpl::SetMasterPwWndImpl has to be fixed"); | 49 | mainTab->removePage(tab_2); |
50 | #endif | 50 | #endif |
51 | |||
51 | #endif // CONFIG_KEYCARD | 52 | #endif // CONFIG_KEYCARD |
52 | keyCard = 0; | 53 | keyCard = 0; |
53 | } | 54 | } |
54 | 55 | ||
55 | SetMasterPwWndImpl::~SetMasterPwWndImpl() | 56 | SetMasterPwWndImpl::~SetMasterPwWndImpl() |
56 | { | 57 | { |
57 | } | 58 | } |
58 | 59 | ||
59 | void SetMasterPwWndImpl::okButton_slot() | 60 | void SetMasterPwWndImpl::okButton_slot() |
60 | { | 61 | { |
62 | #ifndef PWM_EMBEDDED | ||
61 | int index = mainTab->currentPageIndex(); | 63 | int index = mainTab->currentPageIndex(); |
62 | if (index == 0) { | 64 | if (index == 0) { |
63 | // normal password | 65 | // normal password |
64 | if (pwEdit_1->text() != pwEdit_2->text()) { | 66 | if (pwEdit_1->text() != pwEdit_2->text()) { |
65 | KMessageBox::error(this, | 67 | KMessageBox::error(this, |
66 | i18n | 68 | i18n |
67 | ("The two passwords you have entered don't match.\n" | 69 | ("The two passwords you have entered don't match.\n" |
68 | "Please try entering them again."), | 70 | "Please try entering them again."), |
69 | i18n("Different passwords")); | 71 | i18n("Different passwords")); |
70 | return; | 72 | return; |
71 | } | 73 | } |
72 | if (pwEdit_1->text() == "") { | 74 | if (pwEdit_1->text() == "") { |
@@ -79,31 +81,70 @@ void SetMasterPwWndImpl::okButton_slot() | |||
79 | } | 81 | } |
80 | } else { | 82 | } else { |
81 | // key-card | 83 | // key-card |
82 | if (curCardIdLabel->text() == STRING_CARD_NONE) { | 84 | if (curCardIdLabel->text() == STRING_CARD_NONE) { |
83 | KMessageBox::error(this, | 85 | KMessageBox::error(this, |
84 | i18n("You didn't select a card as " | 86 | i18n("You didn't select a card as " |
85 | "PwM-key-card."), | 87 | "PwM-key-card."), |
86 | i18n("no card")); | 88 | i18n("no card")); |
87 | return; | 89 | return; |
88 | } | 90 | } |
89 | } | 91 | } |
90 | done(1); | 92 | done(1); |
93 | #endif | ||
91 | } | 94 | } |
92 | 95 | ||
93 | void SetMasterPwWndImpl::cancelButton_slot() | 96 | void SetMasterPwWndImpl::cancelButton_slot() |
94 | { | 97 | { |
98 | #ifndef PWM_EMBEDDED | ||
95 | done(2); | 99 | done(2); |
100 | #endif | ||
101 | } | ||
102 | |||
103 | void SetMasterPwWndImpl::slotOk() | ||
104 | { | ||
105 | int index = mainTab->currentPageIndex(); | ||
106 | if (index == 0) { | ||
107 | // normal password | ||
108 | if (pwEdit_1->text() != pwEdit_2->text()) { | ||
109 | KMessageBox::error(this, | ||
110 | i18n | ||
111 | ("The two passwords you have entered\ndon't match.\n" | ||
112 | "Please try entering them again."), | ||
113 | i18n("Different passwords")); | ||
114 | return; | ||
115 | } | ||
116 | if (pwEdit_1->text() == "") { | ||
117 | KMessageBox::error(this, | ||
118 | i18n("No password entered.\n" | ||
119 | "Please type in a password,\nthat " | ||
120 | "you want to use for\nthe encryption."), | ||
121 | i18n("no password")); | ||
122 | return; | ||
123 | } | ||
124 | } else { | ||
125 | // key-card | ||
126 | if (curCardIdLabel->text() == STRING_CARD_NONE) { | ||
127 | KMessageBox::error(this, | ||
128 | i18n("You didn't select a card as\n" | ||
129 | "PwM-key-card."), | ||
130 | i18n("no card")); | ||
131 | return; | ||
132 | } | ||
133 | } | ||
134 | |||
135 | setMasterPwWnd::slotOk(); | ||
96 | } | 136 | } |
97 | 137 | ||
138 | |||
98 | void SetMasterPwWndImpl::genCardButton_slot() | 139 | void SetMasterPwWndImpl::genCardButton_slot() |
99 | { | 140 | { |
100 | #ifdef CONFIG_KEYCARD | 141 | #ifdef CONFIG_KEYCARD |
101 | PWM_ASSERT(keyCard); | 142 | PWM_ASSERT(keyCard); |
102 | keyCard->genNewCard(); | 143 | keyCard->genNewCard(); |
103 | #endif // CONFIG_KEYCARD | 144 | #endif // CONFIG_KEYCARD |
104 | } | 145 | } |
105 | 146 | ||
106 | void SetMasterPwWndImpl::selCardButton_slot() | 147 | void SetMasterPwWndImpl::selCardButton_slot() |
107 | { | 148 | { |
108 | #ifdef CONFIG_KEYCARD | 149 | #ifdef CONFIG_KEYCARD |
109 | PWM_ASSERT(keyCard); | 150 | PWM_ASSERT(keyCard); |
diff --git a/pwmanager/pwmanager/setmasterpwwndimpl.h b/pwmanager/pwmanager/setmasterpwwndimpl.h index 56effc1..3203d4d 100644 --- a/pwmanager/pwmanager/setmasterpwwndimpl.h +++ b/pwmanager/pwmanager/setmasterpwwndimpl.h | |||
@@ -12,25 +12,29 @@ | |||
12 | 12 | ||
13 | /*************************************************************************** | 13 | /*************************************************************************** |
14 | * copyright (C) 2004 by Ulf Schenk | 14 | * copyright (C) 2004 by Ulf Schenk |
15 | * This file is originaly based on version 1.0.1 of pwmanager | 15 | * This file is originaly based on version 1.0.1 of pwmanager |
16 | * and was modified to run on embedded devices that run microkde | 16 | * and was modified to run on embedded devices that run microkde |
17 | * | 17 | * |
18 | * $Id$ | 18 | * $Id$ |
19 | **************************************************************************/ | 19 | **************************************************************************/ |
20 | 20 | ||
21 | #ifndef SETMASTERPWWNDIMPL_H | 21 | #ifndef SETMASTERPWWNDIMPL_H |
22 | #define SETMASTERPWWNDIMPL_H | 22 | #define SETMASTERPWWNDIMPL_H |
23 | 23 | ||
24 | #ifndef PWM_EMBEDDED | ||
24 | #include "setmasterpwwnd.h" | 25 | #include "setmasterpwwnd.h" |
26 | #else | ||
27 | #include "setmasterpwwnd_emb.h" | ||
28 | #endif | ||
25 | 29 | ||
26 | #include <klocale.h> | 30 | #include <klocale.h> |
27 | 31 | ||
28 | #include <stdint.h> | 32 | #include <stdint.h> |
29 | #include <string> | 33 | #include <string> |
30 | using std::string; | 34 | using std::string; |
31 | 35 | ||
32 | class PwMKeyCard; | 36 | class PwMKeyCard; |
33 | 37 | ||
34 | /** set master pw wnd */ | 38 | /** set master pw wnd */ |
35 | class SetMasterPwWndImpl : public setMasterPwWnd | 39 | class SetMasterPwWndImpl : public setMasterPwWnd |
36 | { | 40 | { |
@@ -49,24 +53,28 @@ public: | |||
49 | { keyCard = _keyCard; } | 53 | { keyCard = _keyCard; } |
50 | 54 | ||
51 | public slots: | 55 | public slots: |
52 | /** ok button pressed */ | 56 | /** ok button pressed */ |
53 | void okButton_slot(); | 57 | void okButton_slot(); |
54 | /** cancel button pressed */ | 58 | /** cancel button pressed */ |
55 | void cancelButton_slot(); | 59 | void cancelButton_slot(); |
56 | /** "generate a new card" button pressed */ | 60 | /** "generate a new card" button pressed */ |
57 | void genCardButton_slot(); | 61 | void genCardButton_slot(); |
58 | /** "select current card" button pressed */ | 62 | /** "select current card" button pressed */ |
59 | void selCardButton_slot(); | 63 | void selCardButton_slot(); |
60 | 64 | ||
65 | #ifdef PWM_EMBEDDED | ||
66 | virtual void slotOk(); | ||
67 | #endif | ||
68 | |||
61 | protected slots: | 69 | protected slots: |
62 | /** key from PwMKeyCard is available */ | 70 | /** key from PwMKeyCard is available */ |
63 | void keyAvailable_slot(uint32_t cardId, const string &key); | 71 | void keyAvailable_slot(uint32_t cardId, const string &key); |
64 | 72 | ||
65 | protected: | 73 | protected: |
66 | /** key of currently inserted card */ | 74 | /** key of currently inserted card */ |
67 | string curCardKey; | 75 | string curCardKey; |
68 | /** pointer to the keycard-access object */ | 76 | /** pointer to the keycard-access object */ |
69 | PwMKeyCard *keyCard; | 77 | PwMKeyCard *keyCard; |
70 | }; | 78 | }; |
71 | 79 | ||
72 | #endif | 80 | #endif |