|
@@ -6,6 +6,8 @@
|
|
#include "google/protobuf/io/zero_copy_stream_impl.h"
|
|
#include "google/protobuf/io/zero_copy_stream_impl.h"
|
|
#include "google/protobuf/text_format.h"
|
|
#include "google/protobuf/text_format.h"
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
DialogViewMessage::DialogViewMessage(std::string strmsgname,QWidget *parent) :
|
|
DialogViewMessage::DialogViewMessage(std::string strmsgname,QWidget *parent) :
|
|
QDialog(parent),
|
|
QDialog(parent),
|
|
ui(new Ui::DialogViewMessage)
|
|
ui(new Ui::DialogViewMessage)
|
|
@@ -15,6 +17,7 @@ DialogViewMessage::DialogViewMessage(std::string strmsgname,QWidget *parent) :
|
|
InitMsgType();
|
|
InitMsgType();
|
|
mstrmsgname = strmsgname;
|
|
mstrmsgname = strmsgname;
|
|
|
|
|
|
|
|
+
|
|
// mpa = new iv::modulecommext::modulecommmsg<iv::testmodulecommext>();
|
|
// mpa = new iv::modulecommext::modulecommmsg<iv::testmodulecommext>();
|
|
|
|
|
|
// ModuleExtFun funext = std::bind(&DialogViewMessage::UpdateMsg,this,std::placeholders::_1);
|
|
// ModuleExtFun funext = std::bind(&DialogViewMessage::UpdateMsg,this,std::placeholders::_1);
|
|
@@ -33,6 +36,7 @@ DialogViewMessage::DialogViewMessage(std::string strmsgname,QWidget *parent) :
|
|
|
|
|
|
connect(this,SIGNAL(msgupdate()),this,SLOT(UpdatePE()));
|
|
connect(this,SIGNAL(msgupdate()),this,SLOT(UpdatePE()));
|
|
connect(this,SIGNAL(updatecb()),this,SLOT(UpdateCombo()));
|
|
connect(this,SIGNAL(updatecb()),this,SLOT(UpdateCombo()));
|
|
|
|
+ connect(this,SIGNAL(countupdate()),this,SLOT(UpdateLE()));
|
|
|
|
|
|
setWindowTitle(strmsgname.data());
|
|
setWindowTitle(strmsgname.data());
|
|
}
|
|
}
|
|
@@ -69,6 +73,8 @@ void DialogViewMessage::UpdateMsg(google::protobuf::Message &xmsg)
|
|
|
|
|
|
void DialogViewMessage::UpdateRawMsg(const char *strdata, const unsigned int nSize, const unsigned int index, const QDateTime *dt, const char *strmemname)
|
|
void DialogViewMessage::UpdateRawMsg(const char *strdata, const unsigned int nSize, const unsigned int index, const QDateTime *dt, const char *strmemname)
|
|
{
|
|
{
|
|
|
|
+ mnCount++;
|
|
|
|
+ emit countupdate();
|
|
char * strxdata = new char[nSize];
|
|
char * strxdata = new char[nSize];
|
|
memcpy(strxdata,strdata,nSize);
|
|
memcpy(strxdata,strdata,nSize);
|
|
if(mvectorprob.size() == 0)
|
|
if(mvectorprob.size() == 0)
|
|
@@ -98,7 +104,7 @@ void DialogViewMessage::UpdateRawMsg(const char *strdata, const unsigned int nSi
|
|
std::shared_ptr<google::protobuf::Message> msg_ptr = GetProtoMessage(strxdata,nSize,mvectorprob[indexprob]);
|
|
std::shared_ptr<google::protobuf::Message> msg_ptr = GetProtoMessage(strxdata,nSize,mvectorprob[indexprob]);
|
|
if(msg_ptr != NULL)
|
|
if(msg_ptr != NULL)
|
|
{
|
|
{
|
|
- qDebug("parse ok.");
|
|
|
|
|
|
+// qDebug("parse ok.");
|
|
using google::protobuf::TextFormat;
|
|
using google::protobuf::TextFormat;
|
|
using google::protobuf::io::FileOutputStream;
|
|
using google::protobuf::io::FileOutputStream;
|
|
using google::protobuf::io::ZeroCopyOutputStream;
|
|
using google::protobuf::io::ZeroCopyOutputStream;
|
|
@@ -164,3 +170,8 @@ void DialogViewMessage::on_comboBox_currentIndexChanged(int index)
|
|
{
|
|
{
|
|
if(index>=0)mcbindex = index;
|
|
if(index>=0)mcbindex = index;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+void DialogViewMessage::UpdateLE()
|
|
|
|
+{
|
|
|
|
+ ui->lineEdit_count->setText(QString::number(mnCount));
|
|
|
|
+}
|