Exemplo n.º 1
0
NEMainpage::NEMainpage(QWidget *parent, NetExampleNotify *notify) :
	MainPage(parent),
	mNotify(notify),
	ui(new Ui::NEMainpage)
{
	ui->setupUi(this);

	connect(mNotify, SIGNAL(NeMsgArrived(RsPeerId,QString)), this , SLOT(NeMsgArrived(RsPeerId,QString)));
	connect(mNotify, SIGNAL(NePaintArrived(RsPeerId,int,int)), this , SLOT(NePaintArrived(RsPeerId,int,int)));
	//ui->listWidget->addItem("str");
	connect(ui->paintWidget, SIGNAL(mmEvent(int,int)), this, SLOT(mmEvent(int,int)));

}
Exemplo n.º 2
0
WebViewMainpage::WebViewMainpage(QWidget *parent, WebViewNotify *notify) :
	MainPage(parent),
	mNotify(notify),
	ui(new Ui::WebViewMainpage)
{
	ui->setupUi(this);

	connect(mNotify, SIGNAL(NeMsgArrived(RsPeerId,QString)), this , SLOT(NeMsgArrived(RsPeerId,QString)));
	//ui->tabWidget->addTab(new WebViewPagePanel(), "Home");
	WebTabContents * wtc = new WebTabContents(this);
	wtc->getWebView()->setUrl(QUrl("qrc:/rshtml/index.html"));
	ui->tabWidget->addTab(wtc,QString("WSRS"));

}
void EasyTransportNotify::notifyReceivedMsg(const RsPeerId& peer_id, QString str)
{
	std::cout << "pNotify Recvd Packet from: " << peer_id;
	std::cout << " saying " << str.toStdString();
	std::cout << std::endl;
	emit NeMsgArrived(peer_id, str) ;
}
Exemplo n.º 4
0
void WebViewMainpage::on_pingAllButton_clicked()
{
	rsWebView->ping_all();
	NeMsgArrived(rsPeers->getOwnId(),"ping");
}
Exemplo n.º 5
0
void NEMainpage::on_broadcastButton_clicked()
{
	rsNetExample->msg_all(ui->msgInput->text().toStdString());
	NeMsgArrived(rsPeers->getOwnId(),ui->msgInput->text());
	ui->msgInput->clear();
}
Exemplo n.º 6
0
void NEMainpage::on_pingAllButton_clicked()
{
	rsNetExample->ping_all();
	NeMsgArrived(rsPeers->getOwnId(),"ping");
}
Exemplo n.º 7
0
void NEMainpage::on_pingAllButton_clicked()
{
	rsEasyTransport->ping_all();
	NeMsgArrived(rsPeers->getOwnId(),"ping");
}