summaryrefslogtreecommitdiffabout
path: root/pwmanager/pwmanager/configwnd.cpp
Unidiff
Diffstat (limited to 'pwmanager/pwmanager/configwnd.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--pwmanager/pwmanager/configwnd.cpp264
1 files changed, 264 insertions, 0 deletions
diff --git a/pwmanager/pwmanager/configwnd.cpp b/pwmanager/pwmanager/configwnd.cpp
new file mode 100644
index 0000000..230ca1b
--- a/dev/null
+++ b/pwmanager/pwmanager/configwnd.cpp
@@ -0,0 +1,264 @@
1/****************************************************************************
2** Form implementation generated from reading ui file 'configwnd.ui'
3**
4** Created: Tue Sep 14 15:20:58 2004
5** by: The User Interface Compiler ($Id$)
6**
7** WARNING! All changes made in this file will be lost!
8****************************************************************************/
9
10#include "configwnd.h"
11
12#include <qvariant.h>
13#include <qpushbutton.h>
14#include <qtabwidget.h>
15#include <qwidget.h>
16#include <qcombobox.h>
17#include <qlabel.h>
18#include <qlineedit.h>
19#include <qcheckbox.h>
20#include <qspinbox.h>
21#include <qlayout.h>
22#include <qtooltip.h>
23#include <qwhatsthis.h>
24
25/*
26 * Constructs a configWnd as a child of 'parent', with the
27 * name 'name' and widget flags set to 'f'.
28 *
29 * The dialog will by default be modeless, unless you set 'modal' to
30 * TRUE to construct a modal dialog.
31 */
32configWnd::configWnd( QWidget* parent, const char* name, bool modal, WFlags fl )
33 : QDialog( parent, name, modal, fl )
34{
35 if ( !name )
36 setName( "configWnd" );
37
38 okButton = new QPushButton( this, "okButton" );
39 okButton->setGeometry( QRect( 10, 280, 107, 27 ) );
40
41 cancelButton = new QPushButton( this, "cancelButton" );
42 cancelButton->setGeometry( QRect( 370, 280, 107, 27 ) );
43
44 tabWidget2 = new QTabWidget( this, "tabWidget2" );
45 tabWidget2->setGeometry( QRect( 10, 10, 470, 260 ) );
46
47 tab = new QWidget( tabWidget2, "tab" );
48
49 windowStyleComboBox = new QComboBox( FALSE, tab, "windowStyleComboBox" );
50 windowStyleComboBox->setGeometry( QRect( 220, 180, 210, 28 ) );
51
52 textLabel1_5 = new QLabel( tab, "textLabel1_5" );
53 textLabel1_5->setGeometry( QRect( 30, 180, 180, 20 ) );
54 textLabel1_5->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
55
56 textLabel1_4 = new QLabel( tab, "textLabel1_4" );
57 textLabel1_4->setGeometry( QRect( 30, 40, 400, 20 ) );
58
59 selEntrFontButton = new QPushButton( tab, "selEntrFontButton" );
60 selEntrFontButton->setGeometry( QRect( 30, 90, 160, 27 ) );
61
62 currEntrFont = new QLabel( tab, "currEntrFont" );
63 currEntrFont->setGeometry( QRect( 30, 70, 230, 20 ) );
64 tabWidget2->insertTab( tab, QString("") );
65
66 TabPage = new QWidget( tabWidget2, "TabPage" );
67
68 compressionComboBox = new QComboBox( FALSE, TabPage, "compressionComboBox" );
69 compressionComboBox->setGeometry( QRect( 290, 50, 150, 28 ) );
70
71 textLabel1_6 = new QLabel( TabPage, "textLabel1_6" );
72 textLabel1_6->setGeometry( QRect( 10, 50, 270, 20 ) );
73 textLabel1_6->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
74
75 textLabel1_8 = new QLabel( TabPage, "textLabel1_8" );
76 textLabel1_8->setGeometry( QRect( 10, 90, 270, 20 ) );
77 textLabel1_8->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
78
79 permissionLineEdit = new QLineEdit( TabPage, "permissionLineEdit" );
80 permissionLineEdit->setGeometry( QRect( 290, 90, 142, 27 ) );
81 permissionLineEdit->setMaxLength( 3 );
82
83 fileBackupCheckBox = new QCheckBox( TabPage, "fileBackupCheckBox" );
84 fileBackupCheckBox->setGeometry( QRect( 80, 140, 360, 23 ) );
85 tabWidget2->insertTab( TabPage, QString("") );
86
87 tab_2 = new QWidget( tabWidget2, "tab_2" );
88
89 pwTimeoutSpinBox = new QSpinBox( tab_2, "pwTimeoutSpinBox" );
90 pwTimeoutSpinBox->setGeometry( QRect( 390, 50, 55, 23 ) );
91
92 textLabel1 = new QLabel( tab_2, "textLabel1" );
93 textLabel1->setGeometry( QRect( 10, 20, 370, 80 ) );
94 textLabel1->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) );
95
96 textLabel1_7 = new QLabel( tab_2, "textLabel1_7" );
97 textLabel1_7->setGeometry( QRect( 10, 110, 370, 80 ) );
98 textLabel1_7->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) );
99
100 lockTimeoutSpinBox = new QSpinBox( tab_2, "lockTimeoutSpinBox" );
101 lockTimeoutSpinBox->setGeometry( QRect( 390, 140, 55, 23 ) );
102
103 autoDeepLockCheckBox = new QCheckBox( tab_2, "autoDeepLockCheckBox" );
104 autoDeepLockCheckBox->setGeometry( QRect( 60, 180, 380, 25 ) );
105 tabWidget2->insertTab( tab_2, QString("") );
106
107 tab_3 = new QWidget( tabWidget2, "tab_3" );
108
109 textLabel1_3 = new QLabel( tab_3, "textLabel1_3" );
110 textLabel1_3->setGeometry( QRect( 30, 30, 400, 20 ) );
111
112 autoStartLineEdit = new QLineEdit( tab_3, "autoStartLineEdit" );
113 autoStartLineEdit->setGeometry( QRect( 30, 50, 360, 20 ) );
114
115 browseAutoStButton = new QPushButton( tab_3, "browseAutoStButton" );
116 browseAutoStButton->setGeometry( QRect( 400, 50, 30, 20 ) );
117
118 autostartDeeplockedCheckBox = new QCheckBox( tab_3, "autostartDeeplockedCheckBox" );
119 autostartDeeplockedCheckBox->setGeometry( QRect( 40, 80, 390, 25 ) );
120 tabWidget2->insertTab( tab_3, QString("") );
121
122 tab_4 = new QWidget( tabWidget2, "tab_4" );
123
124 textLabel2 = new QLabel( tab_4, "textLabel2" );
125 textLabel2->setGeometry( QRect( 20, 40, 280, 20 ) );
126 textLabel2->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
127
128 browserLineEdit = new QLineEdit( tab_4, "browserLineEdit" );
129 browserLineEdit->setGeometry( QRect( 310, 40, 130, 27 ) );
130
131 xtermLineEdit = new QLineEdit( tab_4, "xtermLineEdit" );
132 xtermLineEdit->setGeometry( QRect( 310, 100, 130, 27 ) );
133
134 textLabel3 = new QLabel( tab_4, "textLabel3" );
135 textLabel3->setGeometry( QRect( 20, 100, 280, 20 ) );
136 textLabel3->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
137 tabWidget2->insertTab( tab_4, QString("") );
138
139 tab_5 = new QWidget( tabWidget2, "tab_5" );
140
141 trayCheckBox = new QCheckBox( tab_5, "trayCheckBox" );
142 trayCheckBox->setGeometry( QRect( 30, 30, 400, 20 ) );
143
144 openUnlockedCheckBox = new QCheckBox( tab_5, "openUnlockedCheckBox" );
145 openUnlockedCheckBox->setGeometry( QRect( 30, 80, 400, 20 ) );
146
147 autoMinimizeCheckBox = new QCheckBox( tab_5, "autoMinimizeCheckBox" );
148 autoMinimizeCheckBox->setEnabled( FALSE );
149 autoMinimizeCheckBox->setGeometry( QRect( 50, 50, 380, 25 ) );
150
151 minimizeLockComboBox = new QComboBox( FALSE, tab_5, "minimizeLockComboBox" );
152 minimizeLockComboBox->setGeometry( QRect( 310, 170, 120, 27 ) );
153
154 textLabel1_9 = new QLabel( tab_5, "textLabel1_9" );
155 textLabel1_9->setGeometry( QRect( 30, 180, 270, 20 ) );
156 textLabel1_9->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
157
158 kwalletEmuCheckBox = new QCheckBox( tab_5, "kwalletEmuCheckBox" );
159 kwalletEmuCheckBox->setGeometry( QRect( 30, 110, 400, 25 ) );
160
161 wndCloseCheckBox = new QCheckBox( tab_5, "wndCloseCheckBox" );
162 wndCloseCheckBox->setGeometry( QRect( 30, 140, 430, 24 ) );
163 tabWidget2->insertTab( tab_5, QString("") );
164 languageChange();
165 resize( QSize(490, 318).expandedTo(minimumSizeHint()) );
166 clearWState( WState_Polished );
167
168 // signals and slots connections
169 connect( okButton, SIGNAL( clicked() ), this, SLOT( okButton_slot() ) );
170 connect( cancelButton, SIGNAL( clicked() ), this, SLOT( cancelButton_slot() ) );
171 connect( browseAutoStButton, SIGNAL( clicked() ), this, SLOT( browseAutoStButton_slot() ) );
172 connect( selEntrFontButton, SIGNAL( clicked() ), this, SLOT( selEntrFontButton_slot() ) );
173 connect( trayCheckBox, SIGNAL( toggled(bool) ), autoMinimizeCheckBox, SLOT( setEnabled(bool) ) );
174
175 // tab order
176 setTabOrder( pwTimeoutSpinBox, trayCheckBox );
177 setTabOrder( trayCheckBox, okButton );
178 setTabOrder( okButton, cancelButton );
179}
180
181/*
182 * Destroys the object and frees any allocated resources
183 */
184configWnd::~configWnd()
185{
186 // no need to delete child widgets, Qt does it all for us
187}
188
189/*
190 * Sets the strings of the subwidgets using the current
191 * language.
192 */
193void configWnd::languageChange()
194{
195 setCaption( tr( "PwManager Configuration" ) );
196 okButton->setText( tr( "&OK" ) );
197 //US ENH okButton->setAccel( QKeySequence( tr( "Alt+O" ) ) );
198 cancelButton->setText( tr( "&Cancel" ) );
199 //US ENH cancelButton->setAccel( QKeySequence( tr( "Alt+C" ) ) );
200 windowStyleComboBox->clear();
201 windowStyleComboBox->insertItem( tr( "Category on top" ) );
202 windowStyleComboBox->insertItem( tr( "Category-list left" ) );
203 textLabel1_5->setText( tr( "Window-style:" ) );
204 textLabel1_4->setText( tr( "Font for the password entries:" ) );
205 selEntrFontButton->setText( tr( "select Font" ) );
206 currEntrFont->setText( QString::null );
207 tabWidget2->changeTab( tab, tr( "Look && feel" ) );
208 compressionComboBox->clear();
209 compressionComboBox->insertItem( tr( "none" ) );
210 compressionComboBox->insertItem( tr( "gzip" ) );
211 compressionComboBox->insertItem( tr( "bzip2" ) );
212 textLabel1_6->setText( tr( "*.pwm file compression:" ) );
213 textLabel1_8->setText( tr( "permissions:" ) );
214 fileBackupCheckBox->setText( tr( "Make file backup before saving" ) );
215 tabWidget2->changeTab( TabPage, tr( "File" ) );
216 textLabel1->setText( tr( "Password timeout (timeout to hold password in memory, so you don't have to re-enter it, if you already have entered it) [set to 0 to disable]:" ) );
217 textLabel1_7->setText( tr( "Auto-lock timeout (auto lock document after this amount of seconds) [set to 0 to disable]:" ) );
218 autoDeepLockCheckBox->setText( tr( "deep-lock on autolock" ) );
219 tabWidget2->changeTab( tab_2, tr( "Timeout" ) );
220 textLabel1_3->setText( tr( "Open this file automatically on startup:" ) );
221 browseAutoStButton->setText( tr( "..." ) );
222 autostartDeeplockedCheckBox->setText( tr( "open deeplocked" ) );
223 tabWidget2->changeTab( tab_3, tr( "Autostart" ) );
224 textLabel2->setText( tr( "Favourite browser:" ) );
225 textLabel3->setText( tr( "Favourite X-terminal:" ) );
226 tabWidget2->changeTab( tab_4, tr( "External apps" ) );
227 trayCheckBox->setText( tr( "Show icon in system-tray" ) );
228 openUnlockedCheckBox->setText( tr( "Open document with passwords unlocked" ) );
229 autoMinimizeCheckBox->setText( tr( "auto-minimize to tray on startup" ) );
230 minimizeLockComboBox->clear();
231 minimizeLockComboBox->insertItem( tr( "don't lock" ) );
232 minimizeLockComboBox->insertItem( tr( "normal lock" ) );
233 minimizeLockComboBox->insertItem( tr( "deep-lock" ) );
234 textLabel1_9->setText( tr( "auto-lock on minimize:" ) );
235 kwalletEmuCheckBox->setText( tr( "KWallet emulation" ) );
236 wndCloseCheckBox->setText( tr( "Do not minimize windows into tray. (Close the window)" ) );
237 tabWidget2->changeTab( tab_5, tr( "Miscellaneous" ) );
238}
239
240void configWnd::okButton_slot()
241{
242 qWarning( "configWnd::okButton_slot(): Not implemented yet" );
243}
244
245void configWnd::cancelButton_slot()
246{
247 qWarning( "configWnd::cancelButton_slot(): Not implemented yet" );
248}
249
250void configWnd::browseBgButton_slot()
251{
252 qWarning( "configWnd::browseBgButton_slot(): Not implemented yet" );
253}
254
255void configWnd::browseAutoStButton_slot()
256{
257 qWarning( "configWnd::browseAutoStButton_slot(): Not implemented yet" );
258}
259
260void configWnd::selEntrFontButton_slot()
261{
262 qWarning( "configWnd::selEntrFontButton_slot(): Not implemented yet" );
263}
264