Diffstat (limited to 'pwmanager/pwmanager/getmasterpwwnd_emb.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | pwmanager/pwmanager/getmasterpwwnd_emb.cpp | 86 |
1 files changed, 86 insertions, 0 deletions
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 | |||