Пример #1
0
void MsgDialog::load(ICQUser *u)
{
    switch (status){
    case ICQ_STATUS_AWAY:
        if (!*u->AutoResponseAway.c_str()) break;
        edtMessage->setText(QString::fromLocal8Bit(u->AutoResponseAway.c_str()));
        chkOverride->setChecked(true);
        break;
    case ICQ_STATUS_NA:
        if (!*u->AutoResponseNA.c_str()) break;
        edtMessage->setText(QString::fromLocal8Bit(u->AutoResponseNA.c_str()));
        chkOverride->setChecked(true);
        break;
    case ICQ_STATUS_DND:
        if (!*u->AutoResponseDND.c_str()) break;
        edtMessage->setText(QString::fromLocal8Bit(u->AutoResponseDND.c_str()));
        chkOverride->setChecked(true);
        break;
    case ICQ_STATUS_OCCUPIED:
        if (!*u->AutoResponseOccupied.c_str()) break;
        edtMessage->setText(QString::fromLocal8Bit(u->AutoResponseOccupied.c_str()));
        chkOverride->setChecked(true);
        break;
    case ICQ_STATUS_FREEFORCHAT:
        if (!*u->AutoResponseFFC.c_str()) break;
        edtMessage->setText(QString::fromLocal8Bit(u->AutoResponseFFC.c_str()));
        chkOverride->setChecked(true);
        break;
    }
    overrideChanged(chkOverride->isChecked());
}
Пример #2
0
void AlertDialog::load(ICQUser *u)
{
    chkOverride->setChecked(u->AlertOverride);
    if (!u->AlertOverride) u = pClient->owner;
    chkOnline->setChecked(u->AlertAway);
    chkBlink->setChecked(u->AlertBlink);
    chkSound->setChecked(u->AlertSound);
    chkOnScreen->setChecked(u->AlertOnScreen);
    chkDialog->setChecked(u->AlertPopup);
    chkFloat->setChecked(u->AlertWindow);
    chkLog->setChecked(u->LogStatus);
    overrideChanged(u->AlertOverride);
}
Пример #3
0
void MsgDialog::load(ICQGroup *g)
{
    switch (status){
    case ICQ_STATUS_AWAY:
        setup(g, offsetof(UserSettings, AutoResponseAway));
        break;
    case ICQ_STATUS_NA:
        setup(g, offsetof(UserSettings, AutoResponseNA));
        break;
    case ICQ_STATUS_DND:
        setup(g, offsetof(UserSettings, AutoResponseDND));
        break;
    case ICQ_STATUS_OCCUPIED:
        setup(g, offsetof(UserSettings, AutoResponseOccupied));
        break;
    case ICQ_STATUS_FREEFORCHAT:
        setup(g, offsetof(UserSettings, AutoResponseFFC));
        break;
    }
    overrideChanged(chkOverride->isChecked());
}
Пример #4
0
void AcceptDialog::load(ICQUser *u)
{
    if (bReadOnly){
        if (u->AcceptFileOverride()){
            chkOverride->setChecked(true);
        }else{
            chkOverride->setChecked(false);
            u = pClient;
        }
        overrideChanged(chkOverride->isChecked());
    }
    string path = u->AcceptFilePath.c_str();
    if (*(path.c_str()) == 0){
#ifdef _WINDOWS
        pMain->buildFileName(path, "IncomingFiles\\");
#else
        pMain->buildFileName(path, "IncomingFiles/");
#endif
        path = path.substr(0, path.size() - 1);
    }
    edtPath->setText(QString::fromLocal8Bit(path.c_str()));
    edtDecline->setText(QString::fromLocal8Bit(u->DeclineFileMessage.c_str()));
    switch (u->AcceptFileMode()){
    case 1:
        btnAccept->setChecked(true);
        break;
    case 2:
        btnAccept->setChecked(true);
        break;
    default:
        btnDialog->setChecked(true);
        break;
    }
    chkWindow->setChecked(u->AcceptMsgWindow());
    chkOverwrite->setChecked(u->AcceptFileOverwrite());
    modeChanged(0);
}