summaryrefslogtreecommitdiffabout
path: root/pwmanager/pwmanager/addentrywnd_emb.cpp
Side-by-side diff
Diffstat (limited to 'pwmanager/pwmanager/addentrywnd_emb.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--pwmanager/pwmanager/addentrywnd_emb.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/pwmanager/pwmanager/addentrywnd_emb.cpp b/pwmanager/pwmanager/addentrywnd_emb.cpp
index 2fa9e8a..f76d33b 100644
--- a/pwmanager/pwmanager/addentrywnd_emb.cpp
+++ b/pwmanager/pwmanager/addentrywnd_emb.cpp
@@ -20,73 +20,76 @@
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
$Id$
*/
#include "addentrywnd_emb.h"
#include "pwmdoc.h"
#include <qlayout.h>
#include <qlabel.h>
#include <qtabwidget.h>
-#include <qgroupbox.h>
+#include <q3groupbox.h>
+//Added by qt3to4:
+#include <Q3GridLayout>
+#include <Q3VBoxLayout>
#include <klocale.h>
#include <kcombobox.h>
#include <klineedit.h>
#include <qpushbutton.h>
-#include <qmultilineedit.h>
+#include <q3multilineedit.h>
/*
* Constructs a addEntryWnd as a child of 'parent', with the
* name 'name' and widget flags set to 'f'.
*
* The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog.
*/
addEntryWnd::addEntryWnd( PwMDoc* d, QWidget* parent, const char* name)
: KDialogBase( KDialogBase::Plain, i18n( "edit/add a password entry" ),
KDialogBase::Ok | KDialogBase::Cancel,
KDialogBase::Ok, parent, name, true ), doc(d)
{
QWidget *page = plainPage();
- QVBoxLayout *pageLayout = new QVBoxLayout( page );
+ Q3VBoxLayout *pageLayout = new Q3VBoxLayout( page );
QTabWidget* mTabWidget = new QTabWidget( page );
pageLayout->addWidget( mTabWidget );
////////////////////////////////////////////////////////////////////
// This is the Password tab
QWidget *tab1 = new QWidget( mTabWidget );
- QGridLayout *layout = new QGridLayout( tab1, 3, 1 );
+ Q3GridLayout *layout = new Q3GridLayout( tab1, 3, 1 );
layout->setMargin( KDialogBase::marginHint() );
layout->setSpacing( KDialogBase::spacingHint() );
int i = 0;
descLineEdit = new KLineEdit( tab1, "descLineEdit" );
descLineLabel = new QLabel( descLineEdit, i18n("Description:"), tab1 );
layout->addWidget( descLineLabel, i, 0 );
layout->addWidget( descLineEdit, i, 1 );
i++;
categoryComboBox = new KComboBox( tab1 );
QLabel* label = new QLabel( categoryComboBox, i18n("Category:"), tab1 );
layout->addWidget( label, i, 0 );
layout->addWidget( categoryComboBox, i, 1 );
i++;
categoryComboBox->setEditable( TRUE );
- categoryComboBox->setSizeLimit( 8 );
+ categoryComboBox->setMaxVisibleItems( 8 );
categoryComboBox->setAutoCompletion( TRUE );
categoryComboBox->setDuplicatesEnabled( FALSE );
connect(categoryComboBox,SIGNAL(activated(const QString&)), SLOT(categorySelected(const QString&)));
usernameLineEdit = new KLineEdit( tab1, "usernameLineEdit" );
usernameLineLabel = new QLabel( usernameLineEdit, i18n("Username:"), tab1 );
layout->addWidget( usernameLineLabel, i, 0 );
layout->addWidget( usernameLineEdit, i, 1 );
i++;
pwLineEdit = new KLineEdit( tab1, "pwLineEdit" );
@@ -108,42 +111,42 @@ addEntryWnd::addEntryWnd( PwMDoc* d, QWidget* parent, const char* name)
label = new QLabel( urlLineEdit, i18n("URL:"), tab1 );
layout->addWidget( label, i, 0 );
layout->addWidget( urlLineEdit, i, 1 );
i++;
mTabWidget->addTab( tab1, i18n( "&Password" ) );
////////////////////////////////////////////////////////////////////
// This is the Comment tab
QWidget *tab2 = new QWidget( mTabWidget );
- layout = new QGridLayout( tab2, 3, 1 );
+ layout = new Q3GridLayout( tab2, 3, 1 );
layout->setMargin( KDialogBase::marginHintSmall() );
layout->setSpacing( KDialogBase::spacingHintSmall() );
i = 0;
- commentTextEdit = new QMultiLineEdit(tab2);
+ commentTextEdit = new Q3MultiLineEdit(tab2);
layout->addMultiCellWidget( commentTextEdit, i, i, 0, 0 );
i++;
mTabWidget->addTab( tab2, i18n( "&Comments" ) );
////////////////////////////////////////////////////////////////////
// This is the Launcher tab
QWidget *tab3 = new QWidget( mTabWidget );
- layout = new QGridLayout( tab3, 3, 1 );
+ layout = new Q3GridLayout( tab3, 3, 1 );
layout->setMargin( KDialogBase::marginHintSmall() );
layout->setSpacing( KDialogBase::spacingHintSmall() );
i = 0;
launcherLineEdit = new KLineEdit( tab3, "launcherLineEdit" );
label = new QLabel( launcherLineEdit, i18n("Launcher:"), tab3 );
QLabel* label1 = new QLabel( launcherLineEdit, i18n("$d = Description"), tab3 );
QLabel* label2 = new QLabel( launcherLineEdit, i18n("$n = Username"), tab3 );
QLabel* label3 = new QLabel( launcherLineEdit, i18n("$c = Comment"), tab3 );
QLabel* label4 = new QLabel( launcherLineEdit, i18n("$u = URL"), tab3 );
QLabel* label5 = new QLabel( launcherLineEdit, i18n("$p = Password"), tab3 );