예제 #1
0
int VCCueList::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = VCWidget::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: slotFunctionRemoved((*reinterpret_cast< quint32(*)>(_a[1]))); break;
        case 1: slotFunctionChanged((*reinterpret_cast< quint32(*)>(_a[1]))); break;
        case 2: slotNextCue(); break;
        case 3: slotPreviousCue(); break;
        case 4: slotCurrentStepChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 5: slotItemActivated((*reinterpret_cast< QTreeWidgetItem*(*)>(_a[1]))); break;
        case 6: slotKeyPressed((*reinterpret_cast< const QKeySequence(*)>(_a[1]))); break;
        case 7: slotNextInputValueChanged((*reinterpret_cast< quint32(*)>(_a[1])),(*reinterpret_cast< quint32(*)>(_a[2])),(*reinterpret_cast< uchar(*)>(_a[3]))); break;
        case 8: slotPreviousInputValueChanged((*reinterpret_cast< quint32(*)>(_a[1])),(*reinterpret_cast< quint32(*)>(_a[2])),(*reinterpret_cast< uchar(*)>(_a[3]))); break;
        default: ;
        }
        _id -= 9;
    }
    return _id;
}
예제 #2
0
int VCButton::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = VCWidget::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: functionStarting(); break;
        case 1: slotChooseIcon(); break;
        case 2: slotResetIcon(); break;
        case 3: slotKeyPressed((*reinterpret_cast< const QKeySequence(*)>(_a[1]))); break;
        case 4: slotKeyReleased((*reinterpret_cast< const QKeySequence(*)>(_a[1]))); break;
        case 5: slotInputValueChanged((*reinterpret_cast< quint32(*)>(_a[1])),(*reinterpret_cast< quint32(*)>(_a[2])),(*reinterpret_cast< uchar(*)>(_a[3]))); break;
        case 6: slotFunctionRemoved((*reinterpret_cast< quint32(*)>(_a[1]))); break;
        case 7: slotFunctionRunning((*reinterpret_cast< quint32(*)>(_a[1]))); break;
        case 8: slotFunctionStopped((*reinterpret_cast< quint32(*)>(_a[1]))); break;
        case 9: slotFunctionFlashing((*reinterpret_cast< quint32(*)>(_a[1])),(*reinterpret_cast< bool(*)>(_a[2]))); break;
        case 10: slotBlinkReady(); break;
        default: ;
        }
        _id -= 11;
    }
    return _id;
}
form_UserRegistration::form_UserRegistration(QStringList filialList, QString ip) {
    form_UserReg.setupUi(this);
    QIcon icon;
    icon.addFile(QString::fromUtf8("images/reguser.png"), QSize(), QIcon::Normal, QIcon::Off);
    this->setWindowIcon(icon);
    
    form_UserReg.pbSendToServer->setEnabled(true);
    
    irbis64 = new engine(APM_REGUSER, "f10", "f10");
            
    isOVD = true;
    
    
/*  запрос пароля
 *  если сохранен в таблице - то автовход
 * 
 *  form_Login.myIP = ip;
    form_Login.setModal(true);
    QStringList account = form_Login.bd.checkAccountAvailable(ip);
    if (account.count() == 0)
        form_Login.show();
    else
    {
        irbis64->login = account.at(0).toStdString();
        irbis64->pass = account.at(1).toStdString();
    }
*/  
    
    maxWorkAge = 55;
    dt = new datetime();
    form_UserReg.leBirthYear_21->setText(QString::number(dt->year().toInt() - 8));

    form_UserReg.cbFilial->addItems(filialList);
    filialName = form_UserReg.cbFilial->currentText();
    
    // начальная обработка года рождения
    slotOnBirthYearChange("");
    
    form_UserReg.leBirthYear_21->connect(form_UserReg.leBirthYear_21, SIGNAL(textChanged(QString)), this, SLOT(slotOnBirthYearChange(QString)));
//    form_UserReg.leFam_10->connect(form_UserReg.leFam_10, SIGNAL(textChanged(QString)), this, SLOT(slotOnFamChange(QString)));
    
    connect(form_UserReg.leFam_10, SIGNAL(textEdited(QString)), this, SLOT(slotCheckUserExists(QString)));
    connect(form_UserReg.leName_11, SIGNAL(textEdited(QString)), this, SLOT(slotCheckUserExists(QString)));
    connect(form_UserReg.leSurname_12, SIGNAL(textEdited(QString)), this, SLOT(slotCheckUserExists(QString)));
    connect(form_UserReg.leBirthYear_21, SIGNAL(textEdited(QString)), this, SLOT(slotCheckUserExists(QString)));

    form_UserReg.cbAddressRegistration->connect(form_UserReg.cbAddressRegistration, SIGNAL(clicked()), this, SLOT(slotOnAdditionalAddress()));
    
    form_UserReg.pbSendToServer->connect(form_UserReg.pbSendToServer, SIGNAL(clicked()), this, SLOT(slotRegUser()));
    form_UserReg.pbClearForm->connect(form_UserReg.pbClearForm, SIGNAL(clicked()), this, SLOT(slotClearForm()));
    
    QList< QLineEdit* > list;
    list = form_UserReg.gbNewUserReg->findChildren<QLineEdit *>();
    for (int i = 0; i < list.size(); i++)
    {
        connect(list.at(i), SIGNAL(returnPressed()), this, SLOT(slotKeyPressed()));
    }
    
    loadConfFile();
    loadCfgFile();
    
    connect(form_UserReg.cbStreet_13, SIGNAL(editTextChanged(QString)), this, SLOT(slotStreetChanged(QString)));
    slotStreetChanged(form_UserReg.cbStreet_13->currentText());
    
    connect(form_UserReg.cbStreet_14, SIGNAL(editTextChanged(QString)), this, SLOT(slotStreetChanged(QString)));
    connect(form_UserReg.leSerial_14, SIGNAL(textEdited(QString)), this, SLOT(slotSetOVD_OUFMS_Year(QString)));
}