Exemplo n.º 1
0
void LoginDialog::stopLogin()
{
    disconnect(pClient, SIGNAL(event(ICQEvent*)), this, SLOT(processEvent(ICQEvent*)));
    pClient->setStatus(ICQ_STATUS_OFFLINE);
    pClient->Uin = 0;
    pClient->EncryptedPassword = "";
    pClient->DecryptedPassword = "";
    btnClose->setText(i18n("Close"));
    lblPasswd->setEnabled(true);
    edtPasswd->setEnabled(true);
    chkOldUser->setEnabled(true);
    setOldUser(chkOldUser->isOn());
    textChanged("");
    bLogin = false;
}
Exemplo n.º 2
0
LoginDialog::LoginDialog()
        : QDialog(NULL, NULL, true)
{
    setIcon(Pict("licq"));
    bLogin = false;
    QGridLayout *lay = new QGridLayout(this, 4, 2, 10, 5);
    lblUIN = new QLabel(i18n("UIN:"), this);
    lblUIN->setAlignment(AlignRight | AlignVCenter);
    lay->addWidget(lblUIN, 0, 0);
    edtUIN = new QLineEdit(this);
    edtUIN->setValidator(new QIntValidator(100000, 0x7FFFFFFF, this));
    connect(edtUIN, SIGNAL(textChanged(const QString&)), this, SLOT(textChanged(const QString&)));
    lay->addWidget(edtUIN, 0, 1);
    lblPasswd = new QLabel(i18n("Password:"******"Use existing UIN"), this);
    connect(chkOldUser, SIGNAL(toggled(bool)), this, SLOT(setOldUser(bool)));
    lay->addMultiCellWidget(chkOldUser, 2, 2, 0, 1);
    QHBoxLayout *hLay = new QHBoxLayout();
    lay->addMultiCellLayout(hLay, 3, 3, 0, 1);
    hLay->addStretch();
    btnClose = new QPushButton(i18n("Close"), this);
    connect(btnClose, SIGNAL(clicked()), this, SLOT(close()));
    hLay->addWidget(btnClose);
    hLay->addStretch();
    btnLogin = new QPushButton(i18n("Register"), this);
    btnLogin->setDefault(true);
    connect(btnLogin, SIGNAL(clicked()), this, SLOT(login()));
    hLay->addWidget(btnLogin);
    hLay->addStretch();
    setCaption(i18n("Registration"));
    setOldUser(false);
    textChanged("");
    QSize s = sizeHint();
    QWidget *desktop = QApplication::desktop();
    move((desktop->width() - s.width()) / 2, (desktop->height() - s.height()) / 2);
};
Exemplo n.º 3
0
LoginDialog::LoginDialog()
        : LoginDlgBase(NULL, "logindlg", true)
{
    setIcon(Pict("licq"));
    bLogin = false;
    edtUIN->setValidator(new QIntValidator(100000, 0x7FFFFFFF, this));
    connect(edtUIN, SIGNAL(textChanged(const QString&)), this, SLOT(textChanged(const QString&)));
    edtPasswd->setEchoMode(QLineEdit::Password);
    connect(edtPasswd, SIGNAL(textChanged(const QString&)), this, SLOT(textChanged(const QString&)));
    connect(chkOldUser, SIGNAL(toggled(bool)), this, SLOT(setOldUser(bool)));
    connect(btnClose, SIGNAL(clicked()), this, SLOT(close()));
    connect(btnLogin, SIGNAL(clicked()), this, SLOT(login()));
    connect(btnProxy, SIGNAL(clicked()), this, SLOT(proxySetup()));
    setOldUser(false);
    textChanged("");
    QSize s = sizeHint();
    QWidget *desktop = QApplication::desktop();
    move((desktop->width() - s.width()) / 2, (desktop->height() - s.height()) / 2);
    setResult(0);
};