| 95 | } |
| 96 | |
| 97 | int COperate::OpenDialogSettings(QWidget *parent) |
| 98 | { |
| 99 | int nRet = QDialog::Accepted; |
| 100 | QDialog* p = OnOpenDialogSettings(parent); |
| 101 | if(p) |
| 102 | { |
| 103 | // The dialog is closed when the connect is close. |
| 104 | bool check = connect(this, SIGNAL(sigFinished()), |
| 105 | p, SLOT(reject())); |
| 106 | Q_ASSERT(check); |
| 107 | p->setWindowIcon(this->Icon()); |
| 108 | p->setWindowTitle(tr("Set ") + GetPlugin()->DisplayName()); |
| 109 | p->setAttribute(Qt::WA_DeleteOnClose); |
| 110 | nRet = RC_SHOW_WINDOW(p); |
| 111 | } else { |
| 112 | qCritical(log) << "The Protocol [" << Protocol() << "] don't settings dialog"; |
| 113 | } |
| 114 | return nRet; |
| 115 | } |
| 116 | |
| 117 | QMenu* COperate::GetMenu(QWidget* parent) |
| 118 | { |