Diffstat (limited to 'pwmanager/pwmanager/findwnd_emb.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | pwmanager/pwmanager/findwnd_emb.cpp | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/pwmanager/pwmanager/findwnd_emb.cpp b/pwmanager/pwmanager/findwnd_emb.cpp new file mode 100644 index 0000000..6db2684 --- a/dev/null +++ b/pwmanager/pwmanager/findwnd_emb.cpp | |||
@@ -0,0 +1,123 @@ | |||
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 "findwnd_emb.h" | ||
27 | |||
28 | #include <klocale.h> | ||
29 | |||
30 | #include <qcheckbox.h> | ||
31 | #include <qbuttongroup.h> | ||
32 | #include <qradiobutton.h> | ||
33 | #include <qlayout.h> | ||
34 | #include <klineedit.h> | ||
35 | #include <qlabel.h> | ||
36 | |||
37 | /* | ||
38 | #include <qvariant.h> | ||
39 | #include <qlabel.h> | ||
40 | #include <qlineedit.h> | ||
41 | #include <qpushbutton.h> | ||
42 | #include <qcheckbox.h> | ||
43 | #include <qbuttongroup.h> | ||
44 | #include <qradiobutton.h> | ||
45 | #include <qlayout.h> | ||
46 | #include <qtooltip.h> | ||
47 | #include <qwhatsthis.h> | ||
48 | */ | ||
49 | |||
50 | /* | ||
51 | * Constructs a findWnd as a child of 'parent', with the | ||
52 | * name 'name'. | ||
53 | */ | ||
54 | findWnd::findWnd( QWidget* parent, const char* name ) | ||
55 | : KDialogBase( KDialogBase::Plain, i18n( "Find" ), | ||
56 | KDialogBase::Ok | KDialogBase::Cancel, | ||
57 | KDialogBase::Ok, parent, name, true ) | ||
58 | { | ||
59 | QWidget *page = plainPage(); | ||
60 | QVBoxLayout *layout = new QVBoxLayout( page ); | ||
61 | layout->setMargin( KDialogBase::marginHint() ); | ||
62 | layout->setSpacing( KDialogBase::spacingHint() ); | ||
63 | |||
64 | exactCheckBox = new QCheckBox( i18n( "&Exact match" ), page ); | ||
65 | layout->addWidget( exactCheckBox ); | ||
66 | |||
67 | caseSensCheckBox = new QCheckBox( i18n( "&Case sensitive" ), page ); | ||
68 | layout->addWidget( caseSensCheckBox ); | ||
69 | |||
70 | |||
71 | QButtonGroup* buttonGroup1 = new QButtonGroup(1, Qt::Horizontal, i18n( "Search in Column" ), page ); | ||
72 | layout->addWidget( buttonGroup1 ); | ||
73 | |||
74 | descRadioButton = new QRadioButton( i18n( "&Description" ), buttonGroup1 ); | ||
75 | pwRadioButton = new QRadioButton( i18n( "&Password" ), buttonGroup1 ); | ||
76 | commentRadioButton = new QRadioButton( i18n( "C&omment" ), buttonGroup1 ); | ||
77 | nameRadioButton = new QRadioButton( i18n( "&Username" ), buttonGroup1 ); | ||
78 | urlRadioButton = new QRadioButton( i18n( "U&RL" ), buttonGroup1 ); | ||
79 | launcherRadioButton = new QRadioButton( i18n( "&Launcher" ), buttonGroup1 ); | ||
80 | descRadioButton->setChecked( TRUE ); | ||
81 | |||
82 | findLineEdit = new KLineEdit( page ); | ||
83 | QLabel* label = new QLabel( findLineEdit, i18n( "Find:" ), page ); | ||
84 | layout->addWidget( label ); | ||
85 | layout->addWidget( findLineEdit ); | ||
86 | |||
87 | setButtonText( KDialogBase::Ok, "&Find" ); | ||
88 | setButtonText( KDialogBase::Cancel, "&Close" ); | ||
89 | |||
90 | |||
91 | // resize( QSize(200, 150) ); | ||
92 | |||
93 | |||
94 | connect( buttonGroup1, SIGNAL( clicked(int) ), this, SLOT( selectionChanged_slot() ) ); | ||
95 | connect( findLineEdit, SIGNAL( textChanged(const QString&) ), this, SLOT( selectionChanged_slot() ) ); | ||
96 | connect( caseSensCheckBox, SIGNAL( stateChanged(int) ), this, SLOT( selectionChanged_slot() ) ); | ||
97 | connect( exactCheckBox, SIGNAL( stateChanged(int) ), this, SLOT( selectionChanged_slot() ) ); | ||
98 | |||
99 | } | ||
100 | |||
101 | /* | ||
102 | * Destroys the object and frees any allocated resources | ||
103 | */ | ||
104 | findWnd::~findWnd() | ||
105 | { | ||
106 | // no need to delete child widgets, Qt does it all for us | ||
107 | } | ||
108 | |||
109 | void findWnd::findButton_slot() | ||
110 | { | ||
111 | qWarning( "findWnd::findButton_slot(): Not implemented yet" ); | ||
112 | } | ||
113 | |||
114 | void findWnd::selectionChanged_slot() | ||
115 | { | ||
116 | qWarning( "findWnd::selectionChanged_slot(): Not implemented yet" ); | ||
117 | } | ||
118 | |||
119 | void findWnd::closeButton_slot() | ||
120 | { | ||
121 | qWarning( "findWnd::closeButton_slot(): Not implemented yet" ); | ||
122 | } | ||
123 | |||