585 lines
22 KiB
C++
585 lines
22 KiB
C++
|
#include "icn2053.h"
|
|||
|
#include <QPushButton>
|
|||
|
#include <QSplitter>
|
|||
|
#include "gutil/qgui.h"
|
|||
|
#include <QTabWidget>
|
|||
|
#include <QLineEdit>
|
|||
|
#include <QPushButton>
|
|||
|
#include <QGroupBox>
|
|||
|
#include <QStackedWidget>
|
|||
|
#include <QRadioButton>
|
|||
|
#include <QCheckBox>
|
|||
|
#include <QApplication>
|
|||
|
#include <QFile>
|
|||
|
#include <QJsonDocument>
|
|||
|
|
|||
|
|
|||
|
icn_2053::icn_2053(ExpertWin *expertWin) : BaseWin{expertWin}, expertWin(expertWin)
|
|||
|
{
|
|||
|
setWindowModality(Qt::WindowModal);
|
|||
|
setAttribute(Qt::WA_DeleteOnClose);
|
|||
|
setWindowTitle(tr("电流增益调节设置"));
|
|||
|
resize(480, 200);
|
|||
|
auto vBox = new QVBoxLayout(center);
|
|||
|
vBox->setContentsMargins(0,0,0,0);
|
|||
|
vBox->setSpacing(3);
|
|||
|
vBox->addLayout(addBtns(new QHBoxLayout()));
|
|||
|
|
|||
|
|
|||
|
|
|||
|
auto tab = new QTabWidget;
|
|||
|
tab->setStyleSheet(R"rrr(
|
|||
|
QTabWidget::pane {border: 1px solid #888; margin-top:-1px;}
|
|||
|
QTabBar::tab {margin-top: 4px; padding: 6px 20px; border: 1px solid #888; border-radius: 0 0 3px 3px;}
|
|||
|
QTabBar::tab:selected {margin-top: 0; border-bottom: none; color: #acf; background-color: #666;}
|
|||
|
)rrr");
|
|||
|
vBox->addWidget(tab);
|
|||
|
|
|||
|
auto dianliu = new QWidget;
|
|||
|
tab->addTab(dianliu, "电流增益调节");
|
|||
|
{
|
|||
|
int iMax=200;
|
|||
|
int iMin=10;
|
|||
|
int iInitValue=100;
|
|||
|
auto vBox = new VBox(dianliu);
|
|||
|
vBox->addStretch();
|
|||
|
auto hBox = new HBox(vBox);
|
|||
|
auto lb = new QLabel(tr("红灯")+":");
|
|||
|
lb->setMinimumWidth(70);
|
|||
|
lb->setAlignment(Qt::AlignRight);
|
|||
|
hBox->addWidget(lb);
|
|||
|
|
|||
|
fdBright_r = new QSpinBox();
|
|||
|
fdBright_r->setRange(iMin,iMax);
|
|||
|
fdBright_r->setValue(iInitValue);
|
|||
|
hBox->addWidget(fdBright_r);
|
|||
|
hBox->addSpacing(10);
|
|||
|
|
|||
|
sliBright_r = new QSlider(Qt::Horizontal);
|
|||
|
sliBright_r->setRange(iMin,iMax);
|
|||
|
sliBright_r->setValue(iInitValue);
|
|||
|
hBox->addWidget(sliBright_r);
|
|||
|
connect(fdBright_r, (void(QSpinBox::*)(int))&QSpinBox::valueChanged, this, [=](int value){
|
|||
|
sliBright_r->setValue(value);
|
|||
|
if(m_chk->isChecked()){
|
|||
|
sliBright_g->setValue(value);
|
|||
|
sliBright_b->setValue(value);
|
|||
|
}
|
|||
|
});
|
|||
|
connect(sliBright_r, &QSlider::valueChanged, this, [=](int value){
|
|||
|
fdBright_r->setValue(value);
|
|||
|
if(m_chk->isChecked()){
|
|||
|
fdBright_b->setValue(value);
|
|||
|
fdBright_g->setValue(value);
|
|||
|
}
|
|||
|
});
|
|||
|
|
|||
|
hBox = new HBox(vBox);
|
|||
|
lb = new QLabel(tr("绿灯")+":");
|
|||
|
lb->setMinimumWidth(70);
|
|||
|
lb->setAlignment(Qt::AlignRight);
|
|||
|
hBox->addWidget(lb);
|
|||
|
|
|||
|
fdBright_g = new QSpinBox();
|
|||
|
fdBright_g->setRange(iMin,iMax);
|
|||
|
fdBright_g->setValue(iInitValue);
|
|||
|
hBox->addWidget(fdBright_g);
|
|||
|
hBox->addSpacing(10);
|
|||
|
|
|||
|
sliBright_g = new QSlider(Qt::Horizontal);
|
|||
|
sliBright_g->setRange(iMin,iMax);
|
|||
|
sliBright_g->setValue(iInitValue);
|
|||
|
hBox->addWidget(sliBright_g);
|
|||
|
connect(fdBright_g, (void(QSpinBox::*)(int))&QSpinBox::valueChanged, this, [=](int value){
|
|||
|
sliBright_g->setValue(value);
|
|||
|
if(m_chk->isChecked()){
|
|||
|
sliBright_r->setValue(value);
|
|||
|
sliBright_b->setValue(value);
|
|||
|
}
|
|||
|
});
|
|||
|
connect(sliBright_g, &QSlider::valueChanged, this, [=](int value){
|
|||
|
fdBright_g->setValue(value);
|
|||
|
if(m_chk->isChecked()){
|
|||
|
fdBright_r->setValue(value);
|
|||
|
fdBright_b->setValue(value);
|
|||
|
}
|
|||
|
});
|
|||
|
|
|||
|
hBox = new HBox(vBox);
|
|||
|
lb = new QLabel(tr("蓝灯")+":");
|
|||
|
lb->setMinimumWidth(70);
|
|||
|
lb->setAlignment(Qt::AlignRight);
|
|||
|
hBox->addWidget(lb);
|
|||
|
|
|||
|
fdBright_b = new QSpinBox();
|
|||
|
fdBright_b->setRange(iMin,iMax);
|
|||
|
fdBright_b->setValue(iInitValue);
|
|||
|
hBox->addWidget(fdBright_b);
|
|||
|
hBox->addSpacing(10);
|
|||
|
|
|||
|
sliBright_b = new QSlider(Qt::Horizontal);
|
|||
|
sliBright_b->setRange(iMin,iMax);
|
|||
|
sliBright_b->setValue(iInitValue);
|
|||
|
hBox->addWidget(sliBright_b);
|
|||
|
connect(fdBright_b, (void(QSpinBox::*)(int))&QSpinBox::valueChanged, this, [=](int value){
|
|||
|
sliBright_b->setValue(value);
|
|||
|
if(m_chk->isChecked()){
|
|||
|
sliBright_g->setValue(value);
|
|||
|
sliBright_r->setValue(value);
|
|||
|
}
|
|||
|
});
|
|||
|
connect(sliBright_b, &QSlider::valueChanged, this, [=](int value){
|
|||
|
fdBright_b->setValue(value);
|
|||
|
if(m_chk->isChecked()){
|
|||
|
fdBright_r->setValue(value);
|
|||
|
fdBright_g->setValue(value);
|
|||
|
}
|
|||
|
});
|
|||
|
|
|||
|
hBox = new HBox(vBox);
|
|||
|
m_chk = new QCheckBox(tr("同步"));
|
|||
|
connect(m_chk, &QCheckBox::stateChanged, this, [=](int value) {
|
|||
|
if(value==0)
|
|||
|
{
|
|||
|
}
|
|||
|
else{
|
|||
|
fdBright_g->setValue(fdBright_r->value());
|
|||
|
fdBright_b->setValue(fdBright_r->value());
|
|||
|
}
|
|||
|
});
|
|||
|
hBox->addWidget(m_chk);
|
|||
|
|
|||
|
|
|||
|
vBox->addStretch();
|
|||
|
|
|||
|
//应用按钮
|
|||
|
hBox = new HBox(vBox);
|
|||
|
auto btn = new QPushButton(tr("应用"));
|
|||
|
btn->setProperty("ss","blue");
|
|||
|
hBox->addStretch();
|
|||
|
hBox->addWidget(btn);
|
|||
|
hBox->addStretch();
|
|||
|
connect(btn, &QPushButton::clicked, this, [this] {
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
|
|||
|
}
|
|||
|
auto kuoZhan = new QWidget;
|
|||
|
|
|||
|
tab->addTab(kuoZhan, "扩展属性");
|
|||
|
{
|
|||
|
auto vBox = new VBox(kuoZhan);
|
|||
|
auto gBox = new QGroupBox("");
|
|||
|
vBox->addWidget(gBox);
|
|||
|
{
|
|||
|
auto hh = new HBox(gBox);
|
|||
|
hh->addSpacing(20);
|
|||
|
auto vvv = new VBox(hh);
|
|||
|
vvv->addStretch();
|
|||
|
auto lb = new QLabel(" ");
|
|||
|
vvv->addWidget(lb);
|
|||
|
lb = new QLabel("低灰麻点优化: ");
|
|||
|
vvv->addWidget(lb);
|
|||
|
lb = new QLabel("消隐等级: ");
|
|||
|
vvv->addWidget(lb);
|
|||
|
lb = new QLabel("低灰白平衡调节: ");
|
|||
|
vvv->addWidget(lb);
|
|||
|
vvv->addStretch();
|
|||
|
|
|||
|
|
|||
|
vvv = new VBox(hh);
|
|||
|
vvv->addStretch();
|
|||
|
lb = new QLabel("红芯片 ");
|
|||
|
vvv->addWidget(lb);
|
|||
|
auto r_madianyouhua = new QSpinBox();
|
|||
|
r_madianyouhua->setRange(0,3);
|
|||
|
r_madianyouhua->setValue(1);
|
|||
|
vvv->addWidget(r_madianyouhua);
|
|||
|
auto r_xiaoyinlevel = new QSpinBox();
|
|||
|
r_xiaoyinlevel->setRange(0,31);
|
|||
|
r_xiaoyinlevel->setValue(31);
|
|||
|
vvv->addWidget(r_xiaoyinlevel);
|
|||
|
auto r_dibaipingheng = new QSpinBox();
|
|||
|
r_madianyouhua->setRange(0,15);
|
|||
|
r_madianyouhua->setValue(15);
|
|||
|
vvv->addWidget(r_dibaipingheng);
|
|||
|
vvv->addStretch();
|
|||
|
|
|||
|
vvv = new VBox(hh);
|
|||
|
vvv->addStretch();
|
|||
|
lb = new QLabel("绿芯片 ");
|
|||
|
vvv->addWidget(lb);
|
|||
|
auto g_madianyouhua = new QSpinBox();
|
|||
|
g_madianyouhua->setRange(0,3);
|
|||
|
g_madianyouhua->setValue(1);
|
|||
|
vvv->addWidget(g_madianyouhua);
|
|||
|
auto g_xiaoyinlevel = new QSpinBox();
|
|||
|
g_xiaoyinlevel->setRange(0,31);
|
|||
|
g_xiaoyinlevel->setValue(31);
|
|||
|
vvv->addWidget(g_xiaoyinlevel);
|
|||
|
auto g_dibaipingheng = new QSpinBox();
|
|||
|
g_madianyouhua->setRange(0,15);
|
|||
|
g_madianyouhua->setValue(15);
|
|||
|
vvv->addWidget(g_dibaipingheng);
|
|||
|
vvv->addStretch();
|
|||
|
|
|||
|
vvv = new VBox(hh);
|
|||
|
vvv->addStretch();
|
|||
|
lb = new QLabel("蓝芯片 ");
|
|||
|
vvv->addWidget(lb);
|
|||
|
auto b_madianyouhua = new QSpinBox();
|
|||
|
b_madianyouhua->setRange(0,3);
|
|||
|
b_madianyouhua->setValue(1);
|
|||
|
vvv->addWidget(b_madianyouhua);
|
|||
|
auto b_xiaoyinlevel = new QSpinBox();
|
|||
|
b_xiaoyinlevel->setRange(0,31);
|
|||
|
b_xiaoyinlevel->setValue(31);
|
|||
|
vvv->addWidget(b_xiaoyinlevel);
|
|||
|
auto b_dibaipingheng = new QSpinBox();
|
|||
|
b_madianyouhua->setRange(0,15);
|
|||
|
b_madianyouhua->setValue(15);
|
|||
|
vvv->addWidget(b_dibaipingheng);
|
|||
|
vvv->addStretch();
|
|||
|
|
|||
|
|
|||
|
hh = new HBox(vBox);
|
|||
|
//亮度调节
|
|||
|
lb = new QLabel(tr("亮度调节(10~100):")); hh->addWidget(lb);
|
|||
|
auto spinbright = new QSpinBox; spinbright->setRange(10, 100); spinbright->setValue(100); hh->addWidget(spinbright); hh->addStretch();
|
|||
|
vBox->addStretch();
|
|||
|
}
|
|||
|
//应用按钮
|
|||
|
auto hBox = new HBox(vBox);
|
|||
|
auto btn = new QPushButton(tr("应用"));
|
|||
|
btn->setProperty("ss","blue");
|
|||
|
hBox->addStretch();
|
|||
|
hBox->addWidget(btn);
|
|||
|
hBox->addStretch();
|
|||
|
|
|||
|
connect(btn, &QPushButton::clicked, this, [this] {
|
|||
|
|
|||
|
});
|
|||
|
}
|
|||
|
auto AdvanceAdjust = new QWidget;
|
|||
|
tab->addTab(AdvanceAdjust, "高级调节");
|
|||
|
{
|
|||
|
auto vBox = new VBox(AdvanceAdjust);
|
|||
|
auto hBox = new HBox(vBox);
|
|||
|
auto gBox = new QGroupBox("第一组寄存器");
|
|||
|
hBox->addWidget(gBox);
|
|||
|
{
|
|||
|
auto hh = new HBox(gBox);
|
|||
|
hh->addSpacing(20);
|
|||
|
auto vvv = new VBox(hh);
|
|||
|
auto lb = new QLabel(" ");
|
|||
|
vvv->addWidget(lb);
|
|||
|
vvv->addSpacing(5);
|
|||
|
lb = new QLabel("红芯片: ");
|
|||
|
vvv->addWidget(lb);
|
|||
|
vvv->addSpacing(6);
|
|||
|
lb = new QLabel("绿芯片: ");
|
|||
|
vvv->addWidget(lb);
|
|||
|
vvv->addSpacing(7);
|
|||
|
lb = new QLabel("蓝芯片: ");
|
|||
|
vvv->addWidget(lb);
|
|||
|
vvv->addStretch();
|
|||
|
|
|||
|
vvv = new VBox(hh);
|
|||
|
lb = new QLabel("高字节(hex) ");
|
|||
|
vvv->addWidget(lb);
|
|||
|
QRegExp regx("[A-Fa-f0-9]{2}");
|
|||
|
m_r_AddrH1= new QLineEdit("1F");
|
|||
|
QValidator *validator = new QRegExpValidator(regx);
|
|||
|
m_r_AddrH1->setValidator(validator);
|
|||
|
vvv->addWidget(m_r_AddrH1);
|
|||
|
m_g_AddrH1 = new QLineEdit("1F") ;
|
|||
|
m_g_AddrH1->setValidator(validator);
|
|||
|
vvv->addWidget(m_g_AddrH1);
|
|||
|
m_b_AddrH1 = new QLineEdit("1F") ;
|
|||
|
m_b_AddrH1->setValidator(validator);
|
|||
|
vvv->addWidget(m_b_AddrH1);
|
|||
|
vvv->addStretch();
|
|||
|
|
|||
|
vvv = new VBox(hh);
|
|||
|
lb = new QLabel("低字节(hex) ");
|
|||
|
vvv->addWidget(lb);
|
|||
|
|
|||
|
m_r_AddrL1= new QLineEdit("70");
|
|||
|
m_r_AddrL1->setValidator(validator);
|
|||
|
vvv->addWidget(m_r_AddrL1);
|
|||
|
m_g_AddrL1 = new QLineEdit("70") ;
|
|||
|
m_g_AddrL1->setValidator(validator);
|
|||
|
vvv->addWidget(m_g_AddrL1);
|
|||
|
m_b_AddrL1 = new QLineEdit("70") ;
|
|||
|
m_b_AddrL1->setValidator(validator);
|
|||
|
vvv->addWidget(m_b_AddrL1);
|
|||
|
vvv->addStretch();
|
|||
|
|
|||
|
}
|
|||
|
gBox = new QGroupBox("第二组寄存器");
|
|||
|
hBox->addWidget(gBox);
|
|||
|
{
|
|||
|
auto hh = new HBox(gBox);
|
|||
|
hh->addSpacing(20);
|
|||
|
auto vvv = new VBox(hh);
|
|||
|
auto lb = new QLabel(" ");
|
|||
|
vvv->addWidget(lb);
|
|||
|
vvv->addSpacing(6);
|
|||
|
lb = new QLabel("红芯片: ");
|
|||
|
vvv->addWidget(lb);
|
|||
|
vvv->addSpacing(5);
|
|||
|
lb = new QLabel("绿芯片: ");
|
|||
|
vvv->addWidget(lb);
|
|||
|
vvv->addSpacing(7);
|
|||
|
lb = new QLabel("蓝芯片: ");
|
|||
|
vvv->addWidget(lb);
|
|||
|
vvv->addStretch();
|
|||
|
|
|||
|
vvv = new VBox(hh);
|
|||
|
lb = new QLabel("高字节(hex) ");
|
|||
|
vvv->addWidget(lb);
|
|||
|
QRegExp regx("[A-Fa-f0-9]{2}");
|
|||
|
m_r_AddrH2= new QLineEdit("7F");
|
|||
|
QValidator *validator = new QRegExpValidator(regx);
|
|||
|
m_r_AddrH2->setValidator(validator);
|
|||
|
vvv->addWidget(m_r_AddrH2);
|
|||
|
m_g_AddrH2 = new QLineEdit("7F") ;
|
|||
|
m_g_AddrH2->setValidator(validator);
|
|||
|
vvv->addWidget(m_g_AddrH2);
|
|||
|
m_b_AddrH2 = new QLineEdit("7F") ;
|
|||
|
m_b_AddrH2->setValidator(validator);
|
|||
|
vvv->addWidget(m_b_AddrH2);
|
|||
|
vvv->addStretch();
|
|||
|
|
|||
|
vvv = new VBox(hh);
|
|||
|
lb = new QLabel("低字节(hex) ");
|
|||
|
vvv->addWidget(lb);
|
|||
|
|
|||
|
m_r_AddrL2= new QLineEdit("FF");
|
|||
|
m_r_AddrL2->setValidator(validator);
|
|||
|
vvv->addWidget(m_r_AddrL2);
|
|||
|
m_g_AddrL2 = new QLineEdit("FF") ;
|
|||
|
m_g_AddrL2->setValidator(validator);
|
|||
|
vvv->addWidget(m_g_AddrL2);
|
|||
|
m_b_AddrL2 = new QLineEdit("FF") ;
|
|||
|
m_b_AddrL2->setValidator(validator);
|
|||
|
vvv->addWidget(m_b_AddrL2);
|
|||
|
vvv->addStretch();
|
|||
|
}
|
|||
|
hBox = new HBox(vBox);
|
|||
|
gBox = new QGroupBox("第三组寄存器");
|
|||
|
hBox->addWidget(gBox);
|
|||
|
{
|
|||
|
auto hh = new HBox(gBox);
|
|||
|
hh->addSpacing(20);
|
|||
|
auto vvv = new VBox(hh);
|
|||
|
auto lb = new QLabel(" ");
|
|||
|
vvv->addWidget(lb);
|
|||
|
vvv->addSpacing(5);
|
|||
|
lb = new QLabel("红芯片: ");
|
|||
|
vvv->addWidget(lb);
|
|||
|
vvv->addSpacing(6);
|
|||
|
lb = new QLabel("绿芯片: ");
|
|||
|
vvv->addWidget(lb);
|
|||
|
vvv->addSpacing(7);
|
|||
|
lb = new QLabel("蓝芯片: ");
|
|||
|
vvv->addWidget(lb);
|
|||
|
vvv->addStretch();
|
|||
|
|
|||
|
vvv = new VBox(hh);
|
|||
|
lb = new QLabel("高字节(hex) ");
|
|||
|
vvv->addWidget(lb);
|
|||
|
QRegExp regx("[A-Fa-f0-9]{2}");
|
|||
|
m_r_AddrH3= new QLineEdit("40");
|
|||
|
QValidator *validator = new QRegExpValidator(regx);
|
|||
|
m_r_AddrH3->setValidator(validator);
|
|||
|
vvv->addWidget(m_r_AddrH3);
|
|||
|
m_g_AddrH3 = new QLineEdit("40") ;
|
|||
|
m_g_AddrH3->setValidator(validator);
|
|||
|
vvv->addWidget(m_g_AddrH3);
|
|||
|
m_b_AddrH3 = new QLineEdit("40") ;
|
|||
|
m_b_AddrH3->setValidator(validator);
|
|||
|
vvv->addWidget(m_b_AddrH3);
|
|||
|
vvv->addStretch();
|
|||
|
|
|||
|
vvv = new VBox(hh);
|
|||
|
lb = new QLabel("低字节(hex) ");
|
|||
|
vvv->addWidget(lb);
|
|||
|
|
|||
|
m_r_AddrL3= new QLineEdit("07");
|
|||
|
m_r_AddrL3->setValidator(validator);
|
|||
|
vvv->addWidget(m_r_AddrL3);
|
|||
|
m_g_AddrL3= new QLineEdit("07") ;
|
|||
|
m_g_AddrL3->setValidator(validator);
|
|||
|
vvv->addWidget(m_g_AddrL3);
|
|||
|
m_b_AddrL3 = new QLineEdit("07") ;
|
|||
|
m_b_AddrL3->setValidator(validator);
|
|||
|
vvv->addWidget(m_b_AddrL3);
|
|||
|
vvv->addStretch();
|
|||
|
|
|||
|
}
|
|||
|
gBox = new QGroupBox("第四组寄存器");
|
|||
|
hBox->addWidget(gBox);
|
|||
|
{
|
|||
|
auto hh = new HBox(gBox);
|
|||
|
hh->addSpacing(20);
|
|||
|
auto vvv = new VBox(hh);
|
|||
|
auto lb = new QLabel(" ");
|
|||
|
vvv->addWidget(lb);
|
|||
|
vvv->addSpacing(5);
|
|||
|
lb = new QLabel("红芯片: ");
|
|||
|
vvv->addWidget(lb);
|
|||
|
vvv->addSpacing(6);
|
|||
|
lb = new QLabel("绿芯片: ");
|
|||
|
vvv->addWidget(lb);
|
|||
|
vvv->addSpacing(7);
|
|||
|
lb = new QLabel("蓝芯片: ");
|
|||
|
vvv->addWidget(lb);
|
|||
|
vvv->addStretch();
|
|||
|
|
|||
|
vvv = new VBox(hh);
|
|||
|
lb = new QLabel("高字节(hex) ");
|
|||
|
vvv->addWidget(lb);
|
|||
|
QRegExp regx("[A-Fa-f0-9]{2}");
|
|||
|
m_r_AddrH4= new QLineEdit("00");
|
|||
|
QValidator *validator = new QRegExpValidator(regx);
|
|||
|
m_r_AddrH4->setValidator(validator);
|
|||
|
vvv->addWidget(m_r_AddrH4);
|
|||
|
m_g_AddrH4 = new QLineEdit("00") ;
|
|||
|
m_g_AddrH4->setValidator(validator);
|
|||
|
vvv->addWidget(m_g_AddrH4);
|
|||
|
m_b_AddrH4 = new QLineEdit("00") ;
|
|||
|
m_b_AddrH4->setValidator(validator);
|
|||
|
vvv->addWidget(m_b_AddrH4);
|
|||
|
vvv->addStretch();
|
|||
|
|
|||
|
vvv = new VBox(hh);
|
|||
|
lb = new QLabel("低字节(hex) ");
|
|||
|
vvv->addWidget(lb);
|
|||
|
|
|||
|
m_r_AddrL4= new QLineEdit("40");
|
|||
|
m_r_AddrL4->setValidator(validator);
|
|||
|
vvv->addWidget(m_r_AddrL4);
|
|||
|
m_g_AddrL4 = new QLineEdit("40") ;
|
|||
|
m_g_AddrL4->setValidator(validator);
|
|||
|
vvv->addWidget(m_g_AddrL4);
|
|||
|
m_b_AddrL4 = new QLineEdit("40") ;
|
|||
|
m_b_AddrL4->setValidator(validator);
|
|||
|
vvv->addWidget(m_b_AddrL4);
|
|||
|
vvv->addStretch();
|
|||
|
|
|||
|
}
|
|||
|
//应用按钮
|
|||
|
hBox = new HBox(vBox);
|
|||
|
auto btn = new QPushButton(tr("应用"));
|
|||
|
btn->setProperty("ss","blue");
|
|||
|
hBox->addStretch();
|
|||
|
hBox->addWidget(btn);
|
|||
|
hBox->addStretch();
|
|||
|
|
|||
|
connect(btn, &QPushButton::clicked, this, [=] {
|
|||
|
expertWin->zrf_rcv_obj.b169_192[0]=m_r_AddrH1->text().toInt(NULL, 16);
|
|||
|
expertWin->zrf_rcv_obj.b169_192[1]=m_r_AddrL1->text().toInt(NULL, 16);
|
|||
|
expertWin->zrf_rcv_obj.b169_192[2]=m_r_AddrH2->text().toInt(NULL, 16);
|
|||
|
expertWin->zrf_rcv_obj.b169_192[3]=m_r_AddrL2->text().toInt(NULL, 16);
|
|||
|
expertWin->zrf_rcv_obj.b169_192[4]=m_r_AddrH3->text().toInt(NULL, 16);
|
|||
|
expertWin->zrf_rcv_obj.b169_192[5]=m_r_AddrL3->text().toInt(NULL, 16);
|
|||
|
|
|||
|
|
|||
|
expertWin->zrf_rcv_obj.b169_192[6]=m_g_AddrH1->text().toInt(NULL, 16);
|
|||
|
expertWin->zrf_rcv_obj.b169_192[7]=m_g_AddrL1->text().toInt(NULL, 16);
|
|||
|
expertWin->zrf_rcv_obj.b169_192[8]=m_g_AddrH2->text().toInt(NULL, 16);
|
|||
|
expertWin->zrf_rcv_obj.b169_192[9]=m_g_AddrL2->text().toInt(NULL, 16);
|
|||
|
expertWin->zrf_rcv_obj.b169_192[10]=m_g_AddrH3->text().toInt(NULL, 16);
|
|||
|
expertWin->zrf_rcv_obj.b169_192[11]=m_g_AddrL3->text().toInt(NULL, 16);
|
|||
|
|
|||
|
expertWin->zrf_rcv_obj.b169_192[12]=m_b_AddrH1->text().toInt(NULL, 16);
|
|||
|
expertWin->zrf_rcv_obj.b169_192[13]=m_b_AddrL1->text().toInt(NULL, 16);
|
|||
|
expertWin->zrf_rcv_obj.b169_192[14]=m_b_AddrH2->text().toInt(NULL, 16);
|
|||
|
expertWin->zrf_rcv_obj.b169_192[15]=m_b_AddrL2->text().toInt(NULL, 16);
|
|||
|
expertWin->zrf_rcv_obj.b169_192[16]=m_b_AddrH3->text().toInt(NULL, 16);
|
|||
|
expertWin->zrf_rcv_obj.b169_192[17]=m_b_AddrL3->text().toInt(NULL, 16);
|
|||
|
|
|||
|
expertWin->zrf_rcv_obj.b169_192[18]=m_r_AddrH4->text().toInt(NULL, 16);
|
|||
|
expertWin->zrf_rcv_obj.b169_192[19]=m_r_AddrL4->text().toInt(NULL, 16);
|
|||
|
expertWin->zrf_rcv_obj.b169_192[20]=m_g_AddrH4->text().toInt(NULL, 16);
|
|||
|
expertWin->zrf_rcv_obj.b169_192[21]=m_g_AddrL4->text().toInt(NULL, 16);
|
|||
|
expertWin->zrf_rcv_obj.b169_192[22]=m_b_AddrH4->text().toInt(NULL, 16);
|
|||
|
expertWin->zrf_rcv_obj.b169_192[23]=m_b_AddrL4->text().toInt(NULL, 16);
|
|||
|
expertWin->classToBaseMsg();
|
|||
|
expertWin->SendBaseParam_zrf();
|
|||
|
});
|
|||
|
|
|||
|
btn = new QPushButton(tr("恢复默认值"));
|
|||
|
btn->setProperty("ss","blue");
|
|||
|
hBox->addWidget(btn);
|
|||
|
connect(btn, &QPushButton::clicked, this, [=] {
|
|||
|
m_r_AddrH1->setText("1F");
|
|||
|
m_r_AddrL1->setText("70");
|
|||
|
m_g_AddrH1->setText("1F");
|
|||
|
m_g_AddrL1->setText("70");
|
|||
|
m_b_AddrH1->setText("1F");
|
|||
|
m_b_AddrL1->setText("70");
|
|||
|
|
|||
|
m_r_AddrH2->setText("7F");
|
|||
|
m_r_AddrL2->setText("FF");
|
|||
|
m_g_AddrH2->setText("7F");
|
|||
|
m_g_AddrL2->setText("FF");
|
|||
|
m_b_AddrH2->setText("7F");
|
|||
|
m_b_AddrL2->setText("FF");
|
|||
|
|
|||
|
m_r_AddrH3->setText("40");
|
|||
|
m_r_AddrL3->setText("07");
|
|||
|
m_g_AddrH3->setText("40");
|
|||
|
m_g_AddrL3->setText("07");
|
|||
|
m_b_AddrH3->setText("40");
|
|||
|
m_b_AddrL3->setText("07");
|
|||
|
|
|||
|
m_r_AddrH4->setText("00");
|
|||
|
m_r_AddrL4->setText("40");
|
|||
|
m_g_AddrH4->setText("00");
|
|||
|
m_g_AddrL4->setText("40");
|
|||
|
m_b_AddrH4->setText("00");
|
|||
|
m_b_AddrL4->setText("40");
|
|||
|
});
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
init();
|
|||
|
|
|||
|
}
|
|||
|
void icn_2053::init()
|
|||
|
{
|
|||
|
m_r_AddrH1->setText(QString("%1").arg(expertWin->zrf_rcv_obj.b169_192[0],2,16,QLatin1Char('0')).toUpper());
|
|||
|
m_r_AddrL1->setText(QString("%1").arg(expertWin->zrf_rcv_obj.b169_192[1],2,16,QLatin1Char('0')).toUpper());
|
|||
|
m_r_AddrH2->setText(QString("%1").arg(expertWin->zrf_rcv_obj.b169_192[2],2,16,QLatin1Char('0')).toUpper());
|
|||
|
m_r_AddrL2->setText(QString("%1").arg(expertWin->zrf_rcv_obj.b169_192[3],2,16,QLatin1Char('0')).toUpper());
|
|||
|
m_r_AddrH3->setText(QString("%1").arg(expertWin->zrf_rcv_obj.b169_192[4],2,16,QLatin1Char('0')).toUpper());
|
|||
|
m_r_AddrL3->setText(QString("%1").arg(expertWin->zrf_rcv_obj.b169_192[5],2,16,QLatin1Char('0')).toUpper());
|
|||
|
|
|||
|
|
|||
|
m_g_AddrH1->setText(QString("%1").arg(expertWin->zrf_rcv_obj.b169_192[6],2,16,QLatin1Char('0')).toUpper());
|
|||
|
m_g_AddrL1->setText(QString("%1").arg(expertWin->zrf_rcv_obj.b169_192[7],2,16,QLatin1Char('0')).toUpper());
|
|||
|
m_g_AddrH2->setText(QString("%1").arg(expertWin->zrf_rcv_obj.b169_192[8],2,16,QLatin1Char('0')).toUpper());
|
|||
|
m_g_AddrL2->setText(QString("%1").arg(expertWin->zrf_rcv_obj.b169_192[9],2,16,QLatin1Char('0')).toUpper());
|
|||
|
m_g_AddrH3->setText(QString("%1").arg(expertWin->zrf_rcv_obj.b169_192[10],2,16,QLatin1Char('0')).toUpper());
|
|||
|
m_g_AddrL3->setText(QString("%1").arg(expertWin->zrf_rcv_obj.b169_192[11],2,16,QLatin1Char('0')).toUpper());
|
|||
|
|
|||
|
m_b_AddrH1->setText(QString("%1").arg(expertWin->zrf_rcv_obj.b169_192[12],2,16,QLatin1Char('0')).toUpper());
|
|||
|
m_b_AddrL1->setText(QString("%1").arg(expertWin->zrf_rcv_obj.b169_192[13],2,16,QLatin1Char('0')).toUpper());
|
|||
|
m_b_AddrH2->setText(QString("%1").arg(expertWin->zrf_rcv_obj.b169_192[14],2,16,QLatin1Char('0')).toUpper());
|
|||
|
m_b_AddrL2->setText(QString("%1").arg(expertWin->zrf_rcv_obj.b169_192[15],2,16,QLatin1Char('0')).toUpper());
|
|||
|
m_b_AddrH3->setText(QString("%1").arg(expertWin->zrf_rcv_obj.b169_192[16],2,16,QLatin1Char('0')).toUpper());
|
|||
|
m_b_AddrL3->setText(QString("%1").arg(expertWin->zrf_rcv_obj.b169_192[17],2,16,QLatin1Char('0')).toUpper());
|
|||
|
|
|||
|
m_r_AddrH4->setText(QString("%1").arg(expertWin->zrf_rcv_obj.b169_192[18],2,16,QLatin1Char('0')).toUpper());
|
|||
|
m_r_AddrL4->setText(QString("%1").arg(expertWin->zrf_rcv_obj.b169_192[19],2,16,QLatin1Char('0')).toUpper());
|
|||
|
m_g_AddrH4->setText(QString("%1").arg(expertWin->zrf_rcv_obj.b169_192[20],2,16,QLatin1Char('0')).toUpper());
|
|||
|
m_g_AddrL4->setText(QString("%1").arg(expertWin->zrf_rcv_obj.b169_192[21],2,16,QLatin1Char('0')).toUpper());
|
|||
|
m_b_AddrH4->setText(QString("%1").arg(expertWin->zrf_rcv_obj.b169_192[22],2,16,QLatin1Char('0')).toUpper());
|
|||
|
m_b_AddrL4->setText(QString("%1").arg(expertWin->zrf_rcv_obj.b169_192[23],2,16,QLatin1Char('0')).toUpper());
|
|||
|
}
|