Diffstat (limited to 'pwmanager/pwmanager/findwnd.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | pwmanager/pwmanager/findwnd.cpp | 153 |
1 files changed, 153 insertions, 0 deletions
diff --git a/pwmanager/pwmanager/findwnd.cpp b/pwmanager/pwmanager/findwnd.cpp new file mode 100644 index 0000000..7767665 --- a/dev/null +++ b/pwmanager/pwmanager/findwnd.cpp | |||
@@ -0,0 +1,153 @@ | |||
1 | /**************************************************************************** | ||
2 | ** Form implementation generated from reading ui file 'findwnd.ui' | ||
3 | ** | ||
4 | ** Created: Tue Sep 14 15:25:08 2004 | ||
5 | ** by: The User Interface Compiler ($Id$) | ||
6 | ** | ||
7 | ** WARNING! All changes made in this file will be lost! | ||
8 | ****************************************************************************/ | ||
9 | |||
10 | #include "findwnd.h" | ||
11 | |||
12 | #include <qvariant.h> | ||
13 | #include <qlabel.h> | ||
14 | #include <qlineedit.h> | ||
15 | #include <qpushbutton.h> | ||
16 | #include <qcheckbox.h> | ||
17 | #include <qbuttongroup.h> | ||
18 | #include <qradiobutton.h> | ||
19 | #include <qlayout.h> | ||
20 | #include <qtooltip.h> | ||
21 | #include <qwhatsthis.h> | ||
22 | |||
23 | /* | ||
24 | * Constructs a findWnd as a child of 'parent', with the | ||
25 | * name 'name' and widget flags set to 'f'. | ||
26 | * | ||
27 | * The dialog will by default be modeless, unless you set 'modal' to | ||
28 | * TRUE to construct a modal dialog. | ||
29 | */ | ||
30 | findWnd::findWnd( QWidget* parent, const char* name, bool modal, WFlags fl ) | ||
31 | : QDialog( parent, name, modal, fl ) | ||
32 | { | ||
33 | if ( !name ) | ||
34 | setName( "findWnd" ); | ||
35 | |||
36 | textLabel1 = new QLabel( this, "textLabel1" ); | ||
37 | textLabel1->setGeometry( QRect( 20, 20, 340, 20 ) ); | ||
38 | textLabel1->setFrameShape( QLabel::NoFrame ); | ||
39 | textLabel1->setFrameShadow( QLabel::Plain ); | ||
40 | |||
41 | findLineEdit = new QLineEdit( this, "findLineEdit" ); | ||
42 | findLineEdit->setGeometry( QRect( 20, 40, 340, 20 ) ); | ||
43 | |||
44 | findButton = new QPushButton( this, "findButton" ); | ||
45 | findButton->setGeometry( QRect( 20, 230, 107, 27 ) ); | ||
46 | |||
47 | closeButton = new QPushButton( this, "closeButton" ); | ||
48 | closeButton->setGeometry( QRect( 250, 230, 107, 27 ) ); | ||
49 | |||
50 | exactCheckBox = new QCheckBox( this, "exactCheckBox" ); | ||
51 | exactCheckBox->setGeometry( QRect( 20, 200, 340, 20 ) ); | ||
52 | |||
53 | caseSensCheckBox = new QCheckBox( this, "caseSensCheckBox" ); | ||
54 | caseSensCheckBox->setGeometry( QRect( 20, 180, 340, 20 ) ); | ||
55 | |||
56 | buttonGroup1 = new QButtonGroup( this, "buttonGroup1" ); | ||
57 | buttonGroup1->setGeometry( QRect( 20, 70, 340, 90 ) ); | ||
58 | |||
59 | descRadioButton = new QRadioButton( buttonGroup1, "descRadioButton" ); | ||
60 | descRadioButton->setGeometry( QRect( 30, 20, 150, 20 ) ); | ||
61 | descRadioButton->setChecked( TRUE ); | ||
62 | |||
63 | pwRadioButton = new QRadioButton( buttonGroup1, "pwRadioButton" ); | ||
64 | pwRadioButton->setGeometry( QRect( 180, 20, 150, 20 ) ); | ||
65 | |||
66 | commentRadioButton = new QRadioButton( buttonGroup1, "commentRadioButton" ); | ||
67 | commentRadioButton->setGeometry( QRect( 180, 40, 150, 20 ) ); | ||
68 | |||
69 | nameRadioButton = new QRadioButton( buttonGroup1, "nameRadioButton" ); | ||
70 | nameRadioButton->setGeometry( QRect( 30, 40, 150, 20 ) ); | ||
71 | |||
72 | urlRadioButton = new QRadioButton( buttonGroup1, "urlRadioButton" ); | ||
73 | urlRadioButton->setGeometry( QRect( 30, 60, 150, 20 ) ); | ||
74 | |||
75 | launcherRadioButton = new QRadioButton( buttonGroup1, "launcherRadioButton" ); | ||
76 | launcherRadioButton->setGeometry( QRect( 180, 60, 150, 20 ) ); | ||
77 | languageChange(); | ||
78 | resize( QSize(381, 269).expandedTo(minimumSizeHint()) ); | ||
79 | clearWState( WState_Polished ); | ||
80 | |||
81 | // signals and slots connections | ||
82 | connect( findButton, SIGNAL( clicked() ), this, SLOT( findButton_slot() ) ); | ||
83 | connect( closeButton, SIGNAL( clicked() ), this, SLOT( closeButton_slot() ) ); | ||
84 | connect( descRadioButton, SIGNAL( stateChanged(int) ), this, SLOT( selectionChanged_slot() ) ); | ||
85 | connect( nameRadioButton, SIGNAL( stateChanged(int) ), this, SLOT( selectionChanged_slot() ) ); | ||
86 | connect( pwRadioButton, SIGNAL( stateChanged(int) ), this, SLOT( selectionChanged_slot() ) ); | ||
87 | connect( commentRadioButton, SIGNAL( stateChanged(int) ), this, SLOT( selectionChanged_slot() ) ); | ||
88 | connect( findLineEdit, SIGNAL( textChanged(const QString&) ), this, SLOT( selectionChanged_slot() ) ); | ||
89 | connect( caseSensCheckBox, SIGNAL( stateChanged(int) ), this, SLOT( selectionChanged_slot() ) ); | ||
90 | connect( exactCheckBox, SIGNAL( stateChanged(int) ), this, SLOT( selectionChanged_slot() ) ); | ||
91 | |||
92 | // tab order | ||
93 | setTabOrder( findLineEdit, descRadioButton ); | ||
94 | setTabOrder( descRadioButton, caseSensCheckBox ); | ||
95 | setTabOrder( caseSensCheckBox, exactCheckBox ); | ||
96 | setTabOrder( exactCheckBox, findButton ); | ||
97 | setTabOrder( findButton, closeButton ); | ||
98 | setTabOrder( closeButton, nameRadioButton ); | ||
99 | setTabOrder( nameRadioButton, pwRadioButton ); | ||
100 | setTabOrder( pwRadioButton, commentRadioButton ); | ||
101 | } | ||
102 | |||
103 | /* | ||
104 | * Destroys the object and frees any allocated resources | ||
105 | */ | ||
106 | findWnd::~findWnd() | ||
107 | { | ||
108 | // no need to delete child widgets, Qt does it all for us | ||
109 | } | ||
110 | |||
111 | /* | ||
112 | * Sets the strings of the subwidgets using the current | ||
113 | * language. | ||
114 | */ | ||
115 | void findWnd::languageChange() | ||
116 | { | ||
117 | setCaption( tr( "Find" ) ); | ||
118 | textLabel1->setText( tr( "Find:" ) ); | ||
119 | findButton->setText( tr( "&Find" ) ); | ||
120 | //US ENH findButton->setAccel( QKeySequence( tr( "Alt+F" ) ) ); | ||
121 | closeButton->setText( tr( "&Close" ) ); | ||
122 | //US ENH closeButton->setAccel( QKeySequence( tr( "Alt+C" ) ) ); | ||
123 | exactCheckBox->setText( tr( "&Exact match" ) ); | ||
124 | //US ENH exactCheckBox->setAccel( QKeySequence( tr( "Alt+E" ) ) ); | ||
125 | caseSensCheckBox->setText( tr( "&Case sensitive" ) ); | ||
126 | //US ENH caseSensCheckBox->setAccel( QKeySequence( tr( "Alt+C" ) ) ); | ||
127 | buttonGroup1->setTitle( tr( "Search in Column" ) ); | ||
128 | descRadioButton->setText( tr( "&Description" ) ); | ||
129 | pwRadioButton->setText( tr( "&Password" ) ); | ||
130 | commentRadioButton->setText( tr( "C&omment" ) ); | ||
131 | nameRadioButton->setText( tr( "&Username" ) ); | ||
132 | //US ENH nameRadioButton->setAccel( QKeySequence( tr( "Alt+U" ) ) ); | ||
133 | urlRadioButton->setText( tr( "U&RL" ) ); | ||
134 | //US ENH urlRadioButton->setAccel( QKeySequence( tr( "Alt+R" ) ) ); | ||
135 | launcherRadioButton->setText( tr( "&Launcher" ) ); | ||
136 | //US ENH launcherRadioButton->setAccel( QKeySequence( tr( "Alt+L" ) ) ); | ||
137 | } | ||
138 | |||
139 | void findWnd::findButton_slot() | ||
140 | { | ||
141 | qWarning( "findWnd::findButton_slot(): Not implemented yet" ); | ||
142 | } | ||
143 | |||
144 | void findWnd::selectionChanged_slot() | ||
145 | { | ||
146 | qWarning( "findWnd::selectionChanged_slot(): Not implemented yet" ); | ||
147 | } | ||
148 | |||
149 | void findWnd::closeButton_slot() | ||
150 | { | ||
151 | qWarning( "findWnd::closeButton_slot(): Not implemented yet" ); | ||
152 | } | ||
153 | |||