Ejemplo n.º 1
0
int main(int argc, char *argv[])
{
	QApplication a(argc, argv);

#if defined(Q_WS_WIN)
	//a.setStyle(new QPlastiqueStyle());
	a.setStyle(new QCleanlooksStyle());
#endif

	SetupEngineUtil	setupEngine;
	FileLogUtil		fileLog;

	int retCode = -1;

	{
		ConnectDlg	dlg;
		dlg.exec();

		ShaderEditor::ConnectionSettings	cInfo;
		cInfo.host = dlg.host;
		cInfo.port = dlg.port;

		ShaderEditor w( cInfo );
		w.show();

		retCode = a.exec();
	}

	return retCode;
}
Ejemplo n.º 2
0
void MainDlg::OnBtnConnectClick( wxCommandEvent& event )
{
	long port = 0;
	if (!m_txPort->GetValue().ToLong(&port))
	{
		wxMessageBox("Invalid port."); return;
	}
	ConnectDlg *dlg = new ConnectDlg(m_txIP->GetValue(), port);
	dlg->Show();
}
Ejemplo n.º 3
0
void MainWindow::getConnectInfo()
{
    ConnectDlg *conDlg = NULL;
    qDebug()<<"into connectdlg\n";
    if (!conDlg)
        conDlg = new ConnectDlg(this);

    if (conDlg->exec() == QDialog::Accepted)
    {
        this->serverIp = conDlg->ui->ipEdit->text();
        this->serverPort = conDlg->ui->portEdit->text();
        hostIsSet = true;
        client=new Client(this->serverIp,this); //建立IM客户端
        connect(client,SIGNAL(showIMSignal()),this,SLOT(showIM()));
        net.setUpTcpSocket(serverIp, serverPort, shPic);
    }

    delete(conDlg);
}