2
0
forked from Ivasoft/DSView

update: deocder output data format ui

This commit is contained in:
dreamsourcelabTAI
2022-05-11 11:34:32 +08:00
parent 452906de11
commit 10736a198f
9 changed files with 23 additions and 10 deletions

View File

@@ -31,4 +31,5 @@ DecoderStatus::DecoderStatus()
void DecoderStatus::clear()
{
m_resTable.reset();
}
m_bNumeric = false;
}

View File

@@ -28,7 +28,7 @@ class DecoderStatus
public:
DecoderStatus();
void clear();
void clear();
public:
bool m_bNumeric; //when decoder get any numerical data,it will be set

View File

@@ -398,7 +398,7 @@ void DecoderStack::begin_decode_work()
assert(_decode_state == Stopped);
_error_message = "";
_decode_state = Running;
_decode_state = Running;
do_decode_work();
_decode_state = Stopped;
}

View File

@@ -484,6 +484,11 @@ void ProtocolDock::decoded_progress(int progress)
{
ProtocolItemLayer &lay = *(_protocol_lay_items.at(index));
lay.SetProgress(pg, err);
// have custom data format
if (progress == 100 && lay.m_decoderStatus != NULL){
lay.enable_format(lay.m_decoderStatus->m_bNumeric);
}
}
index++;

View File

@@ -62,10 +62,10 @@ ProtocolItemLayer::ProtocolItemLayer(QWidget *parent, QString protocolName, IPro
hori_layout->addStretch(1);
connect(_del_button, SIGNAL(clicked()),this, SLOT(on_del_protocol()));
connect(_set_button, SIGNAL(clicked()),this, SLOT(on_set_protocol()));
enable_format(false);
connect(_del_button, SIGNAL(clicked()),this, SLOT(on_del_protocol()));
connect(_set_button, SIGNAL(clicked()),this, SLOT(on_set_protocol()));
connect(_format_combox, SIGNAL(currentIndexChanged(int)),this, SLOT(on_format_select_changed(int)));
}
@@ -146,5 +146,10 @@ void ProtocolItemLayer::LoadFormatSelect(bool bSingle)
m_bSetting = false;
}
void ProtocolItemLayer::enable_format(bool flag)
{
_format_combox->setDisabled(!flag);
}
} //dock
} //pv

View File

@@ -57,6 +57,8 @@ public:
inline void* get_protocol_key_handel(){
return m_decoderStatus;
}
void enable_format(bool flag);
private slots:
void on_set_protocol();

View File

@@ -24,8 +24,7 @@
#include "../data/group.h"
#include "../data/groupsnapshot.h"
#include "view.h"
#include <math.h>
#include <cmath>
using namespace std;

View File

@@ -33,10 +33,11 @@
#include <assert.h>
#include <math.h>
#include <limits.h>
#include <cmath>
#include <QMouseEvent>
#include <QPainter>
#include <QStyleOption>
#include <QStyleOption>
using namespace std;

View File

@@ -22,7 +22,7 @@
#include <assert.h>
#include <limits.h>
#include <math.h>
#include <cmath>
#include <QEvent>
#include <QMouseEvent>