summaryrefslogtreecommitdiffabout
path: root/pwmanager/pwmanager/editcategory.cpp
Unidiff
Diffstat (limited to 'pwmanager/pwmanager/editcategory.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--pwmanager/pwmanager/editcategory.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/pwmanager/pwmanager/editcategory.cpp b/pwmanager/pwmanager/editcategory.cpp
index 4e2378c..4f19299 100644
--- a/pwmanager/pwmanager/editcategory.cpp
+++ b/pwmanager/pwmanager/editcategory.cpp
@@ -15,71 +15,73 @@
15 You should have received a copy of the GNU General Public License 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 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. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22 22
23$Id$ 23$Id$
24*/ 24*/
25 25
26#include "editcategory.h" 26#include "editcategory.h"
27#include "pwmdoc.h" 27#include "pwmdoc.h"
28 28
29#include <qlayout.h> 29#include <qlayout.h>
30#include <qlabel.h> 30#include <qlabel.h>
31#include <qgroupbox.h> 31#include <q3groupbox.h>
32//Added by qt3to4:
33#include <Q3GridLayout>
32#include <klocale.h> 34#include <klocale.h>
33#include <kcombobox.h> 35#include <kcombobox.h>
34#include <klineedit.h> 36#include <klineedit.h>
35#include <qpushbutton.h> 37#include <qpushbutton.h>
36 38
37 39
38/* 40/*
39 * Constructs a addEntryWnd as a child of 'parent', with the 41 * Constructs a addEntryWnd as a child of 'parent', with the
40 * name 'name' and widget flags set to 'f'. 42 * name 'name' and widget flags set to 'f'.
41 * 43 *
42 * The dialog will by default be modeless, unless you set 'modal' to 44 * The dialog will by default be modeless, unless you set 'modal' to
43 * TRUE to construct a modal dialog. 45 * TRUE to construct a modal dialog.
44 */ 46 */
45editCategoryWnd::editCategoryWnd( PwMDoc* d, QWidget* parent, const char* name) 47editCategoryWnd::editCategoryWnd( PwMDoc* d, QWidget* parent, const char* name)
46 : KDialogBase( KDialogBase::Plain, i18n( "edit category descriptions" ), 48 : KDialogBase( KDialogBase::Plain, i18n( "edit category descriptions" ),
47 Apply | User2 | Ok, 49 Apply | User2 | Ok,
48 Ok, parent, name, true ), 50 Ok, parent, name, true ),
49 doc(d) 51 doc(d)
50{ 52{
51 findButton( Ok )->setText (i18n("Close" )) ; 53 findButton( Ok )->setText (i18n("Close" )) ;
52 findButton( User2 )->setText (i18n("Cancel" )) ; 54 findButton( User2 )->setText (i18n("Cancel" )) ;
53 connect(this,SIGNAL(user2Clicked()), SLOT(cancel_slot())); 55 connect(this,SIGNAL(user2Clicked()), SLOT(cancel_slot()));
54 enableButton( KDialogBase::Apply, false ); 56 enableButton( KDialogBase::Apply, false );
55 57
56 58
57 QWidget *page = plainPage(); 59 QWidget *page = plainPage();
58 QGridLayout *layout = new QGridLayout( page, 3, 1 ); 60 Q3GridLayout *layout = new Q3GridLayout( page, 3, 1 );
59 layout->setMargin( KDialogBase::marginHint() ); 61 layout->setMargin( KDialogBase::marginHint() );
60 layout->setSpacing( KDialogBase::spacingHint() ); 62 layout->setSpacing( KDialogBase::spacingHint() );
61 63
62 int i = 0; 64 int i = 0;
63 categoryComboBox = new KComboBox( page ); 65 categoryComboBox = new KComboBox( page );
64 QLabel* label = new QLabel( categoryComboBox, i18n("Category:"), page ); 66 QLabel* label = new QLabel( categoryComboBox, i18n("Category:"), page );
65 layout->addWidget( label, i, 0 ); 67 layout->addWidget( label, i, 0 );
66 layout->addWidget( categoryComboBox, i, 1 ); 68 layout->addWidget( categoryComboBox, i, 1 );
67 i++; 69 i++;
68 categoryComboBox->setEditable( FALSE ); 70 categoryComboBox->setEditable( FALSE );
69 categoryComboBox->setSizeLimit( 100 ); 71 categoryComboBox->setMaxVisibleItems( 100 );
70 connect(categoryComboBox,SIGNAL(activated(const QString&)), SLOT(categorySelected(const QString&))); 72 connect(categoryComboBox,SIGNAL(activated(const QString&)), SLOT(categorySelected(const QString&)));
71 73
72 74
73 descLineEdit = new KLineEdit( page, "descLineEdit" ); 75 descLineEdit = new KLineEdit( page, "descLineEdit" );
74 label = new QLabel( descLineEdit, i18n("Text1 (Description):"), page ); 76 label = new QLabel( descLineEdit, i18n("Text1 (Description):"), page );
75 layout->addWidget( label, i, 0 ); 77 layout->addWidget( label, i, 0 );
76 layout->addWidget( descLineEdit, i, 1 ); 78 layout->addWidget( descLineEdit, i, 1 );
77 connect( descLineEdit, SIGNAL( textChanged ( const QString & ) ), SLOT( widgetModified(const QString &) ) ); 79 connect( descLineEdit, SIGNAL( textChanged ( const QString & ) ), SLOT( widgetModified(const QString &) ) );
78 i++; 80 i++;
79 81
80 usernameLineEdit = new KLineEdit( page, "usernameLineEdit" ); 82 usernameLineEdit = new KLineEdit( page, "usernameLineEdit" );
81 label = new QLabel( usernameLineEdit, i18n("Text2 (Username):"), page ); 83 label = new QLabel( usernameLineEdit, i18n("Text2 (Username):"), page );
82 layout->addWidget( label, i, 0 ); 84 layout->addWidget( label, i, 0 );
83 layout->addWidget( usernameLineEdit, i, 1 ); 85 layout->addWidget( usernameLineEdit, i, 1 );
84 connect( usernameLineEdit, SIGNAL( textChanged ( const QString & ) ), SLOT( widgetModified(const QString &) ) ); 86 connect( usernameLineEdit, SIGNAL( textChanged ( const QString & ) ), SLOT( widgetModified(const QString &) ) );
85 i++; 87 i++;