| 66 | | CRefuseDlg::CRefuseDlg(unsigned long _nUin, QString t, QWidget* parent) |
| 67 | | : LicqDialog(parent, "RefuseDialog", true) |
| 68 | | { |
| 69 | | ICQUser *u = gUserManager.FetchUser(_nUin, LOCK_R); |
| 70 | | QLabel *lbl = new QLabel(tr("Refusal message for %1 with ").arg(t) + QString::fromUtf8(u->GetAlias()) + ":", this); |
| 71 | | gUserManager.DropUser(u); |
| 72 | | |
| 73 | | mleRefuseMsg = new MLEditWrap(true, this); |
| 74 | | |
| 75 | | QPushButton *btnRefuse = new QPushButton(tr("Refuse"), this ); |
| 76 | | connect( btnRefuse, SIGNAL(clicked()), SLOT(accept()) ); |
| 77 | | QPushButton *btnCancel = new QPushButton(tr("Cancel"), this ); |
| 78 | | connect( btnCancel, SIGNAL(clicked()), SLOT(reject()) ); |
| 79 | | int bw = 75; |
| 80 | | bw = QMAX(bw, btnRefuse->sizeHint().width()); |
| 81 | | bw = QMAX(bw, btnCancel->sizeHint().width()); |
| 82 | | btnRefuse->setFixedWidth(bw); |
| 83 | | btnCancel->setFixedWidth(bw); |
| 84 | | |
| 85 | | QGridLayout *lay = new QGridLayout(this, 3, 5, 15, 10); |
| 86 | | lay->addMultiCellWidget(lbl, 0, 0, 0, 4); |
| 87 | | lay->addMultiCellWidget(mleRefuseMsg, 1, 1, 0, 4); |
| 88 | | lay->addWidget(btnRefuse, 2, 1); |
| 89 | | lay->addWidget(btnCancel, 2, 3); |
| 90 | | lay->setColStretch(0, 2); |
| 91 | | lay->setColStretch(4, 2); |
| 92 | | lay->addColSpacing(2, 10); |
| 93 | | |
| 94 | | setCaption(tr("Licq %1 Refusal").arg(t)); |
| 95 | | } |
| 96 | | |
| 97 | | |