summaryrefslogtreecommitdiffabout
path: root/pwmanager/pwmanager/setmasterpwwnd.cpp
Unidiff
Diffstat (limited to 'pwmanager/pwmanager/setmasterpwwnd.cpp') (more/less context) (show whitespace changes)
-rw-r--r--pwmanager/pwmanager/setmasterpwwnd.cpp150
1 files changed, 150 insertions, 0 deletions
diff --git a/pwmanager/pwmanager/setmasterpwwnd.cpp b/pwmanager/pwmanager/setmasterpwwnd.cpp
new file mode 100644
index 0000000..c7e0bad
--- a/dev/null
+++ b/pwmanager/pwmanager/setmasterpwwnd.cpp
@@ -0,0 +1,150 @@
1/****************************************************************************
2** Form implementation generated from reading ui file 'setmasterpwwnd.ui'
3**
4** Created: Tue Sep 14 15:43:34 2004
5** by: The User Interface Compiler ($Id$)
6**
7** WARNING! All changes made in this file will be lost!
8****************************************************************************/
9
10#include "setmasterpwwnd.h"
11
12#include <qvariant.h>
13#include <qpushbutton.h>
14#include <qtabwidget.h>
15#include <qwidget.h>
16#include <qlabel.h>
17#include <qlineedit.h>
18#include <qlayout.h>
19#include <qtooltip.h>
20#include <qwhatsthis.h>
21
22/*
23 * Constructs a setMasterPwWnd as a child of 'parent', with the
24 * name 'name' and widget flags set to 'f'.
25 *
26 * The dialog will by default be modeless, unless you set 'modal' to
27 * TRUE to construct a modal dialog.
28 */
29setMasterPwWnd::setMasterPwWnd( QWidget* parent, const char* name, bool modal, WFlags fl )
30 : QDialog( parent, name, modal, fl )
31{
32 if ( !name )
33 setName( "setMasterPwWnd" );
34
35 okButton = new QPushButton( this, "okButton" );
36 okButton->setGeometry( QRect( 10, 280, 107, 27 ) );
37
38 cancelButton = new QPushButton( this, "cancelButton" );
39 cancelButton->setGeometry( QRect( 290, 280, 107, 27 ) );
40
41 mainTab = new QTabWidget( this, "mainTab" );
42 mainTab->setGeometry( QRect( 10, 10, 390, 260 ) );
43
44 tab = new QWidget( mainTab, "tab" );
45
46 textLabel2 = new QLabel( tab, "textLabel2" );
47 textLabel2->setGeometry( QRect( 20, 90, 340, 20 ) );
48
49 textLabel3 = new QLabel( tab, "textLabel3" );
50 textLabel3->setGeometry( QRect( 20, 160, 340, 20 ) );
51
52 textLabel1 = new QLabel( tab, "textLabel1" );
53 textLabel1->setGeometry( QRect( 10, 20, 370, 40 ) );
54 textLabel1->setFrameShape( QLabel::Box );
55 textLabel1->setAlignment( int( QLabel::WordBreak | QLabel::AlignCenter ) );
56
57 pwEdit_1 = new QLineEdit( tab, "pwEdit_1" );
58 pwEdit_1->setGeometry( QRect( 20, 120, 340, 20 ) );
59 pwEdit_1->setEchoMode( QLineEdit::Password );
60
61 pwEdit_2 = new QLineEdit( tab, "pwEdit_2" );
62 pwEdit_2->setGeometry( QRect( 20, 190, 340, 20 ) );
63 pwEdit_2->setEchoMode( QLineEdit::Password );
64 mainTab->insertTab( tab, QString("") );
65
66 tab_2 = new QWidget( mainTab, "tab_2" );
67
68 textLabel1_2 = new QLabel( tab_2, "textLabel1_2" );
69 textLabel1_2->setGeometry( QRect( 10, 20, 370, 40 ) );
70 textLabel1_2->setFrameShape( QLabel::Box );
71 textLabel1_2->setAlignment( int( QLabel::WordBreak | QLabel::AlignCenter ) );
72
73 textLabel2_2 = new QLabel( tab_2, "textLabel2_2" );
74 textLabel2_2->setGeometry( QRect( 20, 190, 170, 20 ) );
75 textLabel2_2->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
76
77 selCardButton = new QPushButton( tab_2, "selCardButton" );
78 selCardButton->setGeometry( QRect( 20, 130, 350, 40 ) );
79
80 genCardButton = new QPushButton( tab_2, "genCardButton" );
81 genCardButton->setGeometry( QRect( 80, 90, 230, 28 ) );
82
83 curCardIdLabel = new QLabel( tab_2, "curCardIdLabel" );
84 curCardIdLabel->setGeometry( QRect( 200, 190, 170, 20 ) );
85 mainTab->insertTab( tab_2, QString("") );
86 languageChange();
87 resize( QSize(411, 313).expandedTo(minimumSizeHint()) );
88 clearWState( WState_Polished );
89
90 // signals and slots connections
91 connect( okButton, SIGNAL( clicked() ), this, SLOT( okButton_slot() ) );
92 connect( cancelButton, SIGNAL( clicked() ), this, SLOT( cancelButton_slot() ) );
93 connect( genCardButton, SIGNAL( clicked() ), this, SLOT( genCardButton_slot() ) );
94 connect( selCardButton, SIGNAL( clicked() ), this, SLOT( selCardButton_slot() ) );
95
96 // tab order
97 setTabOrder( pwEdit_1, pwEdit_2 );
98 setTabOrder( pwEdit_2, okButton );
99 setTabOrder( okButton, cancelButton );
100}
101
102/*
103 * Destroys the object and frees any allocated resources
104 */
105setMasterPwWnd::~setMasterPwWnd()
106{
107 // no need to delete child widgets, Qt does it all for us
108}
109
110/*
111 * Sets the strings of the subwidgets using the current
112 * language.
113 */
114void setMasterPwWnd::languageChange()
115{
116 setCaption( tr( "Set master-password" ) );
117 okButton->setText( tr( "&OK" ) );
118 cancelButton->setText( tr( "&Cancel" ) );
119 textLabel2->setText( tr( "Please enter the new master-password:" ) );
120 textLabel3->setText( tr( "Please enter the password again:" ) );
121 textLabel1->setText( tr( "Using a normal password-string to encrypt the data." ) );
122 mainTab->changeTab( tab, tr( "Normal password" ) );
123 textLabel1_2->setText( tr( "Using a PwM key-card to encrypt the data." ) );
124 textLabel2_2->setText( tr( "selected card:" ) );
125 selCardButton->setText( tr( "&Select the currently inserted card as key-card" ) );
126 genCardButton->setText( tr( "&generate new key-card" ) );
127 curCardIdLabel->setText( QString::null );
128 mainTab->changeTab( tab_2, tr( "Key-card (chipcard)" ) );
129}
130
131void setMasterPwWnd::okButton_slot()
132{
133 qWarning( "setMasterPwWnd::okButton_slot(): Not implemented yet" );
134}
135
136void setMasterPwWnd::cancelButton_slot()
137{
138 qWarning( "setMasterPwWnd::cancelButton_slot(): Not implemented yet" );
139}
140
141void setMasterPwWnd::genCardButton_slot()
142{
143 qWarning( "setMasterPwWnd::genCardButton_slot(): Not implemented yet" );
144}
145
146void setMasterPwWnd::selCardButton_slot()
147{
148 qWarning( "setMasterPwWnd::selCardButton_slot(): Not implemented yet" );
149}
150