示例#1
0
adresy::adresy(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::adresy)
{
    ui->setupUi(this);

    QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8"));

    nazwaLine = new QLineEdit;
    nazwaLine = ui->nazwaLine;
    nazwaLine->setReadOnly(true);

    adresText = new QTextEdit;
    adresText = ui->adresText;
    adresText->setReadOnly(true);

    dodajBtn = new QPushButton;
    dodajBtn = ui->dodajBtn;

    zapiszBtn = new QPushButton;
    zapiszBtn = ui->zapiszBtn;
    zapiszBtn->hide();

    anulujBtn = new QPushButton;
    anulujBtn = ui->anulujBtn;
    anulujBtn->hide();

    nastBtn = new QPushButton;
    nastBtn = ui->nastBtn;
    nastBtn->setEnabled(false);

    poprzBtn = new QPushButton;
    poprzBtn = ui->poprzBtn;
    poprzBtn->setEnabled(false);

    edytujBtn = new QPushButton;
    edytujBtn = ui->edytujBtn;
    edytujBtn->setEnabled(false);

    usunBtn = new QPushButton;
    usunBtn = ui->usunBtn;
    usunBtn->setEnabled(false);

    koniecBtn = new QPushButton;
    koniecBtn = ui->koniecBtn;
    koniecBtn->setEnabled(true);

    connect(dodajBtn, SIGNAL(clicked()), this, SLOT(dodajKontakt()));
    connect(koniecBtn,SIGNAL(clicked()),this, SLOT(koniec()));
    connect(zapiszBtn, SIGNAL(clicked()), this, SLOT(zapiszKontakt()));
    connect(anulujBtn, SIGNAL(clicked()), this, SLOT(anuluj()));

    setWindowTitle(trUtf8("Prosta książka adresowa"));
}
示例#2
0
int Login::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QMainWindow::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: zaloguj(); break;
        case 1: anuluj(); break;
        default: ;
        }
        _id -= 2;
    }
    return _id;
}
示例#3
0
Registration::Registration(QWidget *parent) :
        QMainWindow(parent),
        ui(new Ui::Registration)
{
    ui->setupUi(this);
    QRect frect = frameGeometry();
    frect.moveCenter(QDesktopWidget().availableGeometry().center());
    move(frect.topLeft());

    this->setMaximumSize(406,220);
    ui->edit_haslo->setEchoMode(QLineEdit::Password);
    ui->edit_haslo2->setEchoMode(QLineEdit::Password);

    connect(ui->edit_haslo2,SIGNAL(textEdited(QString)),this,SLOT(passwdCmp()));
    connect(ui->edit_email,SIGNAL(textEdited(QString)),this,SLOT(checkEmail()));
    connect(ui->edit_login,SIGNAL(textEdited(QString)),this,SLOT(checkLogin()));
    connect(ui->button_cancel,SIGNAL(clicked()),this,SLOT(anuluj()));
    connect(ui->button_register,SIGNAL(clicked()),this,SLOT(rejestruj()));
}