-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi guys,
the attached patch makes the addUserDialog use QT's Layout manager.
This will fix size problems with some translations :)
It will not add/remove any functionality.
Bye,
Thomas
- --
You should not use your fireplace, because scientists now believe that,
contrary to popular opinion, fireplaces actually remove heat from
houses. Really, that's what scientists believe. In fact many
scientists actually use their fireplaces to cool their houses in the
summer. If you visit a scientist's house on a sultry August day,
you'll find a cheerful fire roaring on the hearth and the scientist
sitting nearby, remarking on how cool he is and drinking heavily.
-- Dave Barry, "Postpetroleum Guzzler"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE9vBOy+83LmoKU5MARAmLwAJ9hikDZA5CbhkWNDhm3ddKcmSLFiACgsxya
0e58G/s7JSEe6Bnh6YU1j8o=
=7F06
-----END PGP SIGNATURE-----
Index: licq/plugins/qt-gui/src/adduserdlg.cpp
===================================================================
RCS file: /cvsroot/licq/qt-gui/src/adduserdlg.cpp,v
retrieving revision 1.16
diff -u -3 -p -r1.16 adduserdlg.cpp
--- licq/plugins/qt-gui/src/adduserdlg.cpp 10 Sep 2002 16:15:43 -0000 1.16
+++ licq/plugins/qt-gui/src/adduserdlg.cpp 27 Oct 2002 16:20:45 -0000
@@ -24,6 +24,8 @@
#include <qlineedit.h>
#include <qcheckbox.h>
#include <qpushbutton.h>
+#include <qlayout.h>
+#include <qframe.h>
#include "adduserdlg.h"
@@ -32,23 +34,37 @@
AddUserDlg::AddUserDlg(CICQDaemon *s, QWidget *parent)
: QDialog(parent, "AddUserDialog")
{
- setCaption(tr("Licq - Add User"));
- server = s;
- resize(240, 120);
- lblUin = new QLabel(tr("New User UIN:"), this);
- lblUin->setGeometry(10, 15, 80, 20);
- edtUin = new QLineEdit(this);
- edtUin->setGeometry(100, 15, 120, 20);
- edtUin->setValidator(new QIntValidator(10000, 2147483647, edtUin));
- chkAlert = new QCheckBox(tr("&Alert User"), this);
- chkAlert->setGeometry(10, 50, 220, 20);
- btnOk = new QPushButton("&Ok", this);
- btnOk->setGeometry(30, 80, 80, 30);
- btnCancel = new QPushButton(tr("&Cancel"), this);
- btnCancel->setGeometry(130, 80, 80, 30);
- connect (btnOk, SIGNAL(clicked()), SLOT(ok()) );
- connect (edtUin, SIGNAL(returnPressed()), SLOT(ok()) );
- connect (btnCancel, SIGNAL(clicked()), SLOT(reject()) );
+ server = s;
+
+ QBoxLayout *lay = new QBoxLayout(this, QBoxLayout::Down, 8);
+ QFrame *frmUin = new QFrame(this);
+ chkAlert = new QCheckBox(tr("&Alert User"), this);
+ QFrame *frmBtn = new QFrame(this);
+ lay->addWidget(frmUin);
+ lay->addWidget(chkAlert);
+ lay->addSpacing(5);
+ lay->addStretch();
+ lay->addWidget(frmBtn);
+
+ QBoxLayout *layUin = new QBoxLayout(frmUin, QBoxLayout::LeftToRight);
+ lblUin = new QLabel(tr("New User UIN:"), frmUin);
+ edtUin = new QLineEdit(frmUin);
+ edtUin->setValidator(new QIntValidator(10000, 2147483647, edtUin));
+ layUin->addWidget(lblUin);
+ layUin->addWidget(edtUin);
+
+ QBoxLayout *layBtn = new QBoxLayout(frmBtn, QBoxLayout::LeftToRight);
+ btnOk = new QPushButton(tr("&Ok"), frmBtn);
+ btnCancel = new QPushButton(tr("&Cancel"), frmBtn);
+ layBtn->addStretch();
+ layBtn->addWidget(btnOk);
+ layBtn->addSpacing(20);
+ layBtn->addWidget(btnCancel);
+
+ setCaption(tr("Licq - Add User"));
+ connect (btnOk, SIGNAL(clicked()), SLOT(ok()) );
+ connect (edtUin, SIGNAL(returnPressed()), SLOT(ok()) );
+ connect (btnCancel, SIGNAL(clicked()), SLOT(reject()) );
}