ProxyError::ProxyError(ProxyPlugin *plugin, TCPClient *client, const char *msg) : ProxyErrorBase(NULL, NULL, false, WDestructiveClose) { SET_WNDPROC("proxy") setIcon(Pict("error")); setButtonsPict(this); setCaption(caption()); m_plugin = plugin; m_client = client; if (msg && *msg) lblMessage->setText(i18n(msg)); if (layout() && layout()->inherits("QBoxLayout")){ QBoxLayout *lay = static_cast<QBoxLayout*>(layout()); ProxyConfig *cfg = new ProxyConfig(this, m_plugin, NULL, m_client); lay->insertWidget(1, cfg); cfg->show(); setMinimumSize(sizeHint()); connect(this, SIGNAL(apply()), cfg, SLOT(apply())); } }
ProxyError::ProxyError(ProxyPlugin *plugin, TCPClient *client, const QString& msg) : QDialog(NULL) , m_plugin(plugin) , m_client(client) { setupUi(this); setModal(false); setAttribute(Qt::WA_DeleteOnClose); setWindowIcon(Icon("error")); setButtonsPict(this); lblMessage->setText(msg); if (layout() && layout()->inherits("QBoxLayout")){ QBoxLayout *lay = static_cast<QBoxLayout*>(layout()); ProxyConfig *cfg = new ProxyConfig(this, m_plugin, NULL, static_cast <ClientPtr> (m_client)); lay->insertWidget(1, cfg); cfg->show(); setMinimumSize(sizeHint()); connect(this, SIGNAL(apply()), cfg, SLOT(apply())); } }