summaryrefslogtreecommitdiffabout
path: root/pwmanager/pwmanager/addentrywnd.cpp
Unidiff
Diffstat (limited to 'pwmanager/pwmanager/addentrywnd.cpp') (more/less context) (show whitespace changes)
-rw-r--r--pwmanager/pwmanager/addentrywnd.cpp203
1 files changed, 203 insertions, 0 deletions
diff --git a/pwmanager/pwmanager/addentrywnd.cpp b/pwmanager/pwmanager/addentrywnd.cpp
new file mode 100644
index 0000000..fa98075
--- a/dev/null
+++ b/pwmanager/pwmanager/addentrywnd.cpp
@@ -0,0 +1,203 @@
1/****************************************************************************
2** Form implementation generated from reading ui file 'addentrywnd.ui'
3**
4** Created: Tue Sep 14 13:42:03 2004
5** by: The User Interface Compiler ($Id$)
6**
7** WARNING! All changes made in this file will be lost!
8****************************************************************************/
9
10#include "addentrywnd.h"
11
12#include <qvariant.h>
13#include <qlineedit.h>
14#include <qpushbutton.h>
15#include <qcombobox.h>
16#include <qlabel.h>
17#include <qgroupbox.h>
18#include <qlayout.h>
19#include <qtooltip.h>
20#include <qwhatsthis.h>
21
22/*
23 * Constructs a addEntryWnd 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 */
29addEntryWnd::addEntryWnd( QWidget* parent, const char* name, bool modal, WFlags fl )
30 : QDialog( parent, name, modal, fl )
31{
32 if ( !name )
33 setName( "addEntryWnd" );
34
35 launcherLineEdit = new QLineEdit( this, "launcherLineEdit" );
36 launcherLineEdit->setGeometry( QRect( 310, 90, 250, 21 ) );
37
38 cancelButton = new QPushButton( this, "cancelButton" );
39 cancelButton->setGeometry( QRect( 290, 320, 260, 27 ) );
40
41 generateButton = new QPushButton( this, "generateButton" );
42 generateButton->setGeometry( QRect( 137, 210, 120, 27 ) );
43
44 descLineEdit = new QLineEdit( this, "descLineEdit" );
45 descLineEdit->setGeometry( QRect( 10, 30, 250, 20 ) );
46
47 categoryComboBox = new QComboBox( FALSE, this, "categoryComboBox" );
48 categoryComboBox->setGeometry( QRect( 10, 80, 250, 27 ) );
49 categoryComboBox->setEditable( TRUE );
50 categoryComboBox->setSizeLimit( 100 );
51 categoryComboBox->setAutoCompletion( TRUE );
52 categoryComboBox->setDuplicatesEnabled( FALSE );
53
54 usernameLineEdit = new QLineEdit( this, "usernameLineEdit" );
55 usernameLineEdit->setGeometry( QRect( 10, 140, 250, 20 ) );
56
57 pwLineEdit = new QLineEdit( this, "pwLineEdit" );
58 pwLineEdit->setGeometry( QRect( 10, 190, 250, 20 ) );
59 pwLineEdit->setEchoMode( QLineEdit::Password );
60
61 urlLineEdit = new QLineEdit( this, "urlLineEdit" );
62 urlLineEdit->setGeometry( QRect( 10, 269, 250, 20 ) );
63
64 textLabel1_3 = new QLabel( this, "textLabel1_3" );
65 textLabel1_3->setGeometry( QRect( 276, 10, 20, 280 ) );
66 textLabel1_3->setFrameShape( QLabel::VLine );
67
68 textLabel1 = new QLabel( this, "textLabel1" );
69 textLabel1->setGeometry( QRect( 10, 10, 250, 20 ) );
70
71 textLabel1_2 = new QLabel( this, "textLabel1_2" );
72 textLabel1_2->setGeometry( QRect( 10, 60, 250, 20 ) );
73
74 textLabel2 = new QLabel( this, "textLabel2" );
75 textLabel2->setGeometry( QRect( 10, 120, 250, 20 ) );
76 textLabel2->setFrameShape( QLabel::NoFrame );
77 textLabel2->setFrameShadow( QLabel::Plain );
78
79 textLabel3 = new QLabel( this, "textLabel3" );
80 textLabel3->setGeometry( QRect( 10, 170, 250, 20 ) );
81
82 textLabel2_2 = new QLabel( this, "textLabel2_2" );
83 textLabel2_2->setGeometry( QRect( 10, 248, 250, 20 ) );
84
85 textLabel3_2 = new QLabel( this, "textLabel3_2" );
86 textLabel3_2->setGeometry( QRect( 309, 8, 250, 20 ) );
87
88 textLabel1_4 = new QLabel( this, "textLabel1_4" );
89 textLabel1_4->setGeometry( QRect( 310, 30, 250, 16 ) );
90
91 textLabel3_3 = new QLabel( this, "textLabel3_3" );
92 textLabel3_3->setGeometry( QRect( 310, 50, 130, 16 ) );
93
94 textLabel2_3 = new QLabel( this, "textLabel2_3" );
95 textLabel2_3->setGeometry( QRect( 310, 70, 130, 16 ) );
96
97 textLabel5 = new QLabel( this, "textLabel5" );
98 textLabel5->setGeometry( QRect( 440, 70, 120, 16 ) );
99
100 textLabel4_2 = new QLabel( this, "textLabel4_2" );
101 textLabel4_2->setGeometry( QRect( 440, 50, 120, 16 ) );
102
103 revealButton = new QPushButton( this, "revealButton" );
104 revealButton->setGeometry( QRect( 10, 210, 120, 27 ) );
105 revealButton->setToggleButton( TRUE );
106
107 okButton = new QPushButton( this, "okButton" );
108 okButton->setGeometry( QRect( 20, 320, 260, 27 ) );
109
110 groupBox1 = new QGroupBox( this, "groupBox1" );
111 groupBox1->setGeometry( QRect( 300, 140, 260, 150 ) );
112
113 commentDummy = new QLabel( groupBox1, "commentDummy" );
114 commentDummy->setGeometry( QRect( 10, 20, 240, 80 ) );
115
116 advancedCommentButton = new QPushButton( groupBox1, "advancedCommentButton" );
117 advancedCommentButton->setGeometry( QRect( 10, 110, 240, 30 ) );
118 advancedCommentButton->setToggleButton( TRUE );
119 languageChange();
120 resize( QSize(570, 357).expandedTo(minimumSizeHint()) );
121 clearWState( WState_Polished );
122
123 // signals and slots connections
124 connect( generateButton, SIGNAL( clicked() ), this, SLOT( generateButton_slot() ) );
125 connect( revealButton, SIGNAL( toggled(bool) ), this, SLOT( revealButton_slot() ) );
126 connect( cancelButton, SIGNAL( clicked() ), this, SLOT( cancelButton_slot() ) );
127 connect( okButton, SIGNAL( clicked() ), this, SLOT( okButton_slot() ) );
128 connect( advancedCommentButton, SIGNAL( toggled(bool) ), this, SLOT( advancedCommentButton_slot(bool) ) );
129
130 // tab order
131 setTabOrder( descLineEdit, categoryComboBox );
132 setTabOrder( categoryComboBox, usernameLineEdit );
133 setTabOrder( usernameLineEdit, pwLineEdit );
134 setTabOrder( pwLineEdit, revealButton );
135 setTabOrder( revealButton, generateButton );
136 setTabOrder( generateButton, urlLineEdit );
137 setTabOrder( urlLineEdit, launcherLineEdit );
138 setTabOrder( launcherLineEdit, okButton );
139 setTabOrder( okButton, cancelButton );
140
141}
142
143/*
144 * Destroys the object and frees any allocated resources
145 */
146addEntryWnd::~addEntryWnd()
147{
148 // no need to delete child widgets, Qt does it all for us
149}
150
151/*
152 * Sets the strings of the subwidgets using the current
153 * language.
154 */
155void addEntryWnd::languageChange()
156{
157 setCaption( tr( "edit/add a password-entry" ) );
158 cancelButton->setText( tr( "&Cancel" ) );
159 generateButton->setText( tr( "&Generate" ) );
160 textLabel1_3->setText( QString::null );
161 textLabel1->setText( tr( "Description:" ) );
162 textLabel1_2->setText( tr( "Category:" ) );
163 textLabel2->setText( tr( "Username:" ) );
164 textLabel3->setText( tr( "Password:" ) );
165 textLabel2_2->setText( tr( "URL:" ) );
166 textLabel3_2->setText( tr( "Launcher:" ) );
167 textLabel1_4->setText( tr( "$d = Description" ) );
168 textLabel3_3->setText( tr( "$n = Username" ) );
169 textLabel2_3->setText( tr( "$c = Comment" ) );
170 textLabel5->setText( tr( "$u = URL" ) );
171 textLabel4_2->setText( tr( "$p = Password" ) );
172 revealButton->setText( tr( "&Reveal" ) );
173 okButton->setText( tr( "&OK" ) );
174 groupBox1->setTitle( tr( "Comment:" ) );
175 commentDummy->setText( QString::null );
176 advancedCommentButton->setText( tr( "advanced comment" ) );
177}
178
179void addEntryWnd::okButton_slot()
180{
181 qWarning( "addEntryWnd::okButton_slot(): Not implemented yet" );
182}
183
184void addEntryWnd::cancelButton_slot()
185{
186 qWarning( "addEntryWnd::cancelButton_slot(): Not implemented yet" );
187}
188
189void addEntryWnd::revealButton_slot()
190{
191 qWarning( "addEntryWnd::revealButton_slot(): Not implemented yet" );
192}
193
194void addEntryWnd::generateButton_slot()
195{
196 qWarning( "addEntryWnd::generateButton_slot(): Not implemented yet" );
197}
198
199void addEntryWnd::advancedCommentButton_slot(bool)
200{
201 qWarning( "addEntryWnd::advancedCommentButton_slot(bool): Not implemented yet" );
202}
203