summaryrefslogtreecommitdiffabout
path: root/pwmanager
authorzautrix <zautrix>2004-10-21 22:20:39 (UTC)
committer zautrix <zautrix>2004-10-21 22:20:39 (UTC)
commitd6f9bd535e8cabe653bdff329500f9153e5e11fb (patch) (unidiff)
tree6f83c692713c41896a165e399f259a744f125e5c /pwmanager
parentbb235c5a639b914574e1e247d2de6e479517585f (diff)
downloadkdepimpi-d6f9bd535e8cabe653bdff329500f9153e5e11fb.zip
kdepimpi-d6f9bd535e8cabe653bdff329500f9153e5e11fb.tar.gz
kdepimpi-d6f9bd535e8cabe653bdff329500f9153e5e11fb.tar.bz2
small fixes
Diffstat (limited to 'pwmanager') (more/less context) (ignore whitespace changes)
-rw-r--r--pwmanager/pwmanager/getmasterpwwnd_emb.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/pwmanager/pwmanager/getmasterpwwnd_emb.cpp b/pwmanager/pwmanager/getmasterpwwnd_emb.cpp
index 8b6dfbc..8404c3e 100644
--- a/pwmanager/pwmanager/getmasterpwwnd_emb.cpp
+++ b/pwmanager/pwmanager/getmasterpwwnd_emb.cpp
@@ -13,89 +13,96 @@
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 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 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. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22 22
23$Id$ 23$Id$
24*/ 24*/
25 25
26#include "getmasterpwwnd_emb.h" 26#include "getmasterpwwnd_emb.h"
27 27
28#include "klocale.h" 28#include "klocale.h"
29 29
30/* 30/*
31#include <qvariant.h> 31#include <qvariant.h>
32#include <qpushbutton.h> 32#include <qpushbutton.h>
33#include <qlabel.h> 33#include <qlabel.h>
34#include <qlineedit.h> 34#include <qlineedit.h>
35#include <qlayout.h> 35#include <qlayout.h>
36#include <qtooltip.h> 36#include <qtooltip.h>
37#include <qwhatsthis.h> 37#include <qwhatsthis.h>
38*/ 38*/
39 39
40#include <qwidget.h> 40#include <qwidget.h>
41#include <qlayout.h> 41#include <qlayout.h>
42#include <qlabel.h> 42#include <qlabel.h>
43#include <qlineedit.h> 43#include <qlineedit.h>
44#include <qpushbutton.h> 44#include <qpushbutton.h>
45#include <qapplication.h>
45 46
46/* 47/*
47 * Constructs a getMasterPwWnd as a child of 'parent', with the 48 * Constructs a getMasterPwWnd as a child of 'parent', with the
48 * name 'name' 49 * name 'name'
49 */ 50 */
50getMasterPwWnd::getMasterPwWnd( QWidget* parent, const char* name) 51getMasterPwWnd::getMasterPwWnd( QWidget* parent, const char* name)
51 : KDialogBase( KDialogBase::Plain, i18n( "Master-password" ), 52 : KDialogBase( KDialogBase::Plain, i18n( "Master-password" ),
52 KDialogBase::Ok | KDialogBase::Cancel, 53 KDialogBase::Ok | KDialogBase::Cancel,
53 KDialogBase::Ok, parent, name, true ) 54 KDialogBase::Ok, parent, name, true )
54{ 55{
55 QWidget *page = plainPage(); 56 QWidget *page = plainPage();
56 QVBoxLayout *pageLayout = new QVBoxLayout( page ); 57 QVBoxLayout *pageLayout = new QVBoxLayout( page );
57 58
58 pwLineEdit = new QLineEdit( page, "pwLineEdit" ); 59 pwLineEdit = new QLineEdit( page, "pwLineEdit" );
59 pwLineEdit->setEchoMode( QLineEdit::Password ); 60 pwLineEdit->setEchoMode( QLineEdit::Password );
60 61
61 QLabel* textLabel1 = new QLabel( pwLineEdit, i18n("Please enter the master-password:"), page, "textLabel1" ); 62 QLabel* textLabel1 = new QLabel( pwLineEdit, i18n("Please enter the master-password:"), page, "textLabel1" );
62 textLabel1->setAlignment( int( QLabel::WordBreak | QLabel::AlignCenter ) ); 63 textLabel1->setAlignment( int( QLabel::WordBreak | QLabel::AlignCenter ) );
63 pageLayout->addWidget(textLabel1); 64 pageLayout->addWidget(textLabel1);
64 pageLayout->addWidget(pwLineEdit); 65 pageLayout->addWidget(pwLineEdit);
65 66
66 QWidget* numberBox = new QWidget( page ); 67 QWidget* numberBox = new QWidget( page );
67#ifndef DESKTOP_VERSION 68#ifndef DESKTOP_VERSION
68 numberBox->setFixedHeight(150); 69 if ( QApplication::desktop()->width() > 320 ) {
69 numberBox->setFixedWidth(150); 70 numberBox->setFixedHeight(250);
71 numberBox->setFixedWidth(200);
72 }
73 else{
74 numberBox->setFixedHeight(150);
75 numberBox->setFixedWidth(150);
76 }
70#endif 77#endif
71 78
72 QGridLayout* numberLayout = new QGridLayout( numberBox, 4, 3 ); 79 QGridLayout* numberLayout = new QGridLayout( numberBox, 4, 3 );
73 numberLayout->setMargin( 0 ); 80 numberLayout->setMargin( 0 );
74 numberLayout->setSpacing( 0 ); 81 numberLayout->setSpacing( 0 );
75 82
76 QPushButton* p1 = new QPushButton( i18n("1"), numberBox ); 83 QPushButton* p1 = new QPushButton( i18n("1"), numberBox );
77 numberLayout->addWidget( p1, 0, 0 ); 84 numberLayout->addWidget( p1, 0, 0 );
78 QPushButton* p2 = new QPushButton( i18n("2"), numberBox ); 85 QPushButton* p2 = new QPushButton( i18n("2"), numberBox );
79 numberLayout->addWidget( p2, 0, 1 ); 86 numberLayout->addWidget( p2, 0, 1 );
80 QPushButton* p3 = new QPushButton( i18n("3"), numberBox ); 87 QPushButton* p3 = new QPushButton( i18n("3"), numberBox );
81 numberLayout->addWidget( p3, 0, 2 ); 88 numberLayout->addWidget( p3, 0, 2 );
82 QPushButton* p4 = new QPushButton( i18n("4"), numberBox ); 89 QPushButton* p4 = new QPushButton( i18n("4"), numberBox );
83 numberLayout->addWidget( p4, 1, 0 ); 90 numberLayout->addWidget( p4, 1, 0 );
84 QPushButton* p5 = new QPushButton( i18n("5"), numberBox ); 91 QPushButton* p5 = new QPushButton( i18n("5"), numberBox );
85 numberLayout->addWidget( p5, 1, 1 ); 92 numberLayout->addWidget( p5, 1, 1 );
86 QPushButton* p6 = new QPushButton( i18n("6"), numberBox ); 93 QPushButton* p6 = new QPushButton( i18n("6"), numberBox );
87 numberLayout->addWidget( p6, 1, 2 ); 94 numberLayout->addWidget( p6, 1, 2 );
88 QPushButton* p7 = new QPushButton( i18n("7"), numberBox ); 95 QPushButton* p7 = new QPushButton( i18n("7"), numberBox );
89 numberLayout->addWidget( p7, 2, 0 ); 96 numberLayout->addWidget( p7, 2, 0 );
90 QPushButton* p8 = new QPushButton( i18n("8"), numberBox ); 97 QPushButton* p8 = new QPushButton( i18n("8"), numberBox );
91 numberLayout->addWidget( p8, 2, 1 ); 98 numberLayout->addWidget( p8, 2, 1 );
92 QPushButton* p9 = new QPushButton( i18n("9"), numberBox ); 99 QPushButton* p9 = new QPushButton( i18n("9"), numberBox );
93 numberLayout->addWidget( p9, 2, 2 ); 100 numberLayout->addWidget( p9, 2, 2 );
94 QPushButton* clear = new QPushButton( i18n("x"), numberBox ); 101 QPushButton* clear = new QPushButton( i18n("x"), numberBox );
95 numberLayout->addWidget( clear, 3, 0 ); 102 numberLayout->addWidget( clear, 3, 0 );
96 QPushButton* p0 = new QPushButton( i18n("0"), numberBox ); 103 QPushButton* p0 = new QPushButton( i18n("0"), numberBox );
97 numberLayout->addWidget( p0, 3, 1 ); 104 numberLayout->addWidget( p0, 3, 1 );
98 QPushButton* backspace = new QPushButton( i18n("-"), numberBox ); 105 QPushButton* backspace = new QPushButton( i18n("-"), numberBox );
99 numberLayout->addWidget( backspace, 3, 2 ); 106 numberLayout->addWidget( backspace, 3, 2 );
100 107
101 108