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))); }
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) ; }
void WebViewMainpage::on_pingAllButton_clicked() { rsWebView->ping_all(); NeMsgArrived(rsPeers->getOwnId(),"ping"); }
void NEMainpage::on_broadcastButton_clicked() { rsNetExample->msg_all(ui->msgInput->text().toStdString()); NeMsgArrived(rsPeers->getOwnId(),ui->msgInput->text()); ui->msgInput->clear(); }
void NEMainpage::on_pingAllButton_clicked() { rsNetExample->ping_all(); NeMsgArrived(rsPeers->getOwnId(),"ping"); }
void NEMainpage::on_pingAllButton_clicked() { rsEasyTransport->ping_all(); NeMsgArrived(rsPeers->getOwnId(),"ping"); }