2026年6月25日 暂存
This commit is contained in:
@@ -3606,7 +3606,29 @@ void DevOp::resendFPGADate(int cmd, int addr, unsigned char *dat, int len, int t
|
|||||||
emit sendSerialDataToFPGA(cmd,addr,dat,len,type);
|
emit sendSerialDataToFPGA(cmd,addr,dat,len,type);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DevOp::resendSTM32Date(int cmd, int addr, unsigned char *dat, int len, int type){
|
extern "C" {
|
||||||
|
#pragma pack(1)
|
||||||
|
typedef struct FlightComCtrl_t_ {
|
||||||
|
uint8_t flags; // bit0: 启用飞行补偿控制, bit1: 启用加减速预测
|
||||||
|
uint32_t flightCompWindow;
|
||||||
|
}FlightComCtrl_t;
|
||||||
|
#pragma pack()
|
||||||
|
}
|
||||||
|
|
||||||
|
void DevOp::writeFlightCompCtrl(bool enb, bool enbAccelDecelPredict, quint32 flightCompWindow)
|
||||||
|
{
|
||||||
|
static FlightComCtrl_t flightComCtrl;
|
||||||
|
|
||||||
|
memset(&flightComCtrl, 0, sizeof(FlightComCtrl_t));
|
||||||
|
flightComCtrl.flags |= (enb ? 1 : 0);
|
||||||
|
flightComCtrl.flags |= (enbAccelDecelPredict ? 0x2 : 0x0);
|
||||||
|
flightComCtrl.flightCompWindow = flightCompWindow;
|
||||||
|
|
||||||
|
fpgaWr(FLIGHT_COMP_CTRL_BASE, (unsigned char*)(&flightComCtrl), sizeof(FlightComCtrl_t));
|
||||||
|
}
|
||||||
|
|
||||||
|
void DevOp::resendSTM32Date(int cmd, int addr, unsigned char *dat, int len, int type)
|
||||||
|
{
|
||||||
emit sendSerialDataToSTM32(cmd,addr,dat,len,type);
|
emit sendSerialDataToSTM32(cmd,addr,dat,len,type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -164,6 +164,9 @@ class SysPara;
|
|||||||
#define SUCTION_PUMP_90P "echo 90 > /sys/class/pwm/ehrpwm.0:1/duty_percent"
|
#define SUCTION_PUMP_90P "echo 90 > /sys/class/pwm/ehrpwm.0:1/duty_percent"
|
||||||
#define SUCTION_PUMP_12000Hz "echo 12000 > /sys/class/pwm/ehrpwm.0:1/period_freq"
|
#define SUCTION_PUMP_12000Hz "echo 12000 > /sys/class/pwm/ehrpwm.0:1/period_freq"
|
||||||
|
|
||||||
|
// 墨点飞行补偿控制写地址,具体引用于 DevOp::writeFlightCompCtrl
|
||||||
|
#define FLIGHT_COMP_CTRL_BASE 0xA4A0
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 请不要直接初始化此函数,如果需要,请通过SysPara的devOP来访问此类
|
* 请不要直接初始化此函数,如果需要,请通过SysPara的devOP来访问此类
|
||||||
* */
|
* */
|
||||||
@@ -293,6 +296,14 @@ public :
|
|||||||
void showData(QByteArray dat);
|
void showData(QByteArray dat);
|
||||||
void writeDacValue2Fpga_No72NewVoltData();
|
void writeDacValue2Fpga_No72NewVoltData();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 写入飞行时间补偿控制
|
||||||
|
*
|
||||||
|
* @param enb 启用或关闭飞行时间补偿控制
|
||||||
|
* @param enbAccelDecelPredict 启用或关闭加减速预测
|
||||||
|
* @param flightCompWindow 补偿统计窗口,仅在 enb 为 true 有意义
|
||||||
|
*/
|
||||||
|
void writeFlightCompCtrl(bool enb, bool enbAccelDecelPredict, quint32 flightCompWindow);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
||||||
|
|||||||
+27
-2
@@ -104,6 +104,7 @@ void InkJetPrinter::init()
|
|||||||
connect(m_MainWidget, &MainWidget::sendButtonClickedSignal, this, &InkJetPrinter::getMainWidgetButtonClickedSlot);
|
connect(m_MainWidget, &MainWidget::sendButtonClickedSignal, this, &InkJetPrinter::getMainWidgetButtonClickedSlot);
|
||||||
connect(m_MainWidget,SIGNAL(setDisableAll()),this,SLOT(disableTabClick()));
|
connect(m_MainWidget,SIGNAL(setDisableAll()),this,SLOT(disableTabClick()));
|
||||||
connect (m_MainWidget,SIGNAL(CloseJd()),this,SLOT(close_jd_timer()));
|
connect (m_MainWidget,SIGNAL(CloseJd()),this,SLOT(close_jd_timer()));
|
||||||
|
connect(m_MainWidget, &MainWidget::newFileAcquired, this, &InkJetPrinter::createNewJobFile);
|
||||||
connect(m_TestPrintWidget, &TestPrintWidget::sendButtonClickedSignal, this, &InkJetPrinter::getTestPrintWidgetButtonClickedSlot);
|
connect(m_TestPrintWidget, &TestPrintWidget::sendButtonClickedSignal, this, &InkJetPrinter::getTestPrintWidgetButtonClickedSlot);
|
||||||
|
|
||||||
// TestPrintWidget::sendButtonClickedSignal(16) 转由 openDatetimeEditor 处理
|
// TestPrintWidget::sendButtonClickedSignal(16) 转由 openDatetimeEditor 处理
|
||||||
@@ -1404,9 +1405,12 @@ void InkJetPrinter::getTestPrintWidgetButtonClickedSlot(int index)
|
|||||||
m_MainWidget->onPreviewScene();
|
m_MainWidget->onPreviewScene();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 哪个天才写的? 有什么用?
|
||||||
case 21:
|
case 21:
|
||||||
{
|
{
|
||||||
m_StackedWidget->setCurrentWidget(m_TestPrintWidget);
|
// 没用的切换,不讲逻辑的嘛?
|
||||||
|
// m_StackedWidget->setCurrentWidget(m_TestPrintWidget);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
@@ -1639,7 +1643,6 @@ void InkJetPrinter::getCounterVarSetWidgetButtonClickSlot(int index){
|
|||||||
void InkJetPrinter::slt_counterVarUpdate()
|
void InkJetPrinter::slt_counterVarUpdate()
|
||||||
{
|
{
|
||||||
// m_StackedWidget->setCurrentWidget(m_TestPrintWidget);
|
// m_StackedWidget->setCurrentWidget(m_TestPrintWidget);
|
||||||
// m_TestPrintWidget->onEditItemCounterDone();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InkJetPrinter::showScheduleShiftsEditor(QVector<ScheduleModel> schedules, TextItemModel txtModel)
|
void InkJetPrinter::showScheduleShiftsEditor(QVector<ScheduleModel> schedules, TextItemModel txtModel)
|
||||||
@@ -2676,6 +2679,28 @@ void InkJetPrinter::warningShow(int type,int num){
|
|||||||
qDebug()<<str;
|
qDebug()<<str;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @brief 创建新的工作文件
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
void InkJetPrinter::createNewJobFile()
|
||||||
|
{
|
||||||
|
auto currentFile = m_TestPrintWidget->currentFile();
|
||||||
|
if(!currentFile.isEmpty()) {
|
||||||
|
QFileInfo fileInfo(currentFile);
|
||||||
|
auto ret = QMessageBox::information(nullptr, "", tr("当前正在使用\r\n %1 \r\n确定要新建文件吗?").arg(fileInfo.baseName()),
|
||||||
|
QMessageBox::Ok, QMessageBox::Cancel);
|
||||||
|
if(ret == QMessageBox::Cancel) {
|
||||||
|
LogInfo::setRunStatusText("Canceled create new job file.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
LogInfo::setRunStatusText("Create new job file...");
|
||||||
|
qInfo() << "Switch to job edit widget...";
|
||||||
|
m_StackedWidget->setCurrentWidget(m_TestPrintWidget);
|
||||||
|
m_TestPrintWidget->on_newfileButton_pressed();
|
||||||
|
}
|
||||||
|
|
||||||
int InkJetPrinter::dateTimeElasped(int type,QString str){
|
int InkJetPrinter::dateTimeElasped(int type,QString str){
|
||||||
QFile file;
|
QFile file;
|
||||||
|
|||||||
@@ -194,6 +194,8 @@ public slots:
|
|||||||
void warningHandler(int);
|
void warningHandler(int);
|
||||||
void warningShow(int,int);
|
void warningShow(int,int);
|
||||||
|
|
||||||
|
void createNewJobFile();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
bool eventFilter(QObject *watched, QEvent *event);
|
bool eventFilter(QObject *watched, QEvent *event);
|
||||||
};
|
};
|
||||||
|
|||||||
+19
-2
@@ -18,7 +18,7 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>800</width>
|
<width>16777215</width>
|
||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
@@ -73,6 +73,16 @@
|
|||||||
<height>0</height>
|
<height>0</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="btn_newFile">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QPushButton {background: qlineargradient(x1: 0.5, y1: 0, x2: 0.5, y2: 1, stop: 0 #6F9CD6, stop: 1 #A5ABB7);border: none;border-radius: 8px;font-size: 14px;text-align: center;padding-top: 20px;padding-bottom: 1px;}</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>新建文件</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="m_EditBtn">
|
<widget class="QPushButton" name="m_EditBtn">
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
@@ -124,7 +134,14 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="m_ManageBtn">
|
<widget class="QPushButton" name="m_ManageBtn">
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">QPushButton {background: qlineargradient(x1: 0.5, y1: 0, x2: 0.5, y2: 1, stop: 0 #6F9CD6, stop: 1 #A5ABB7);border: none;border-radius: 8px;font-size: 14px;text-align: center;padding-top: 20px;padding-bottom: 1px;}</string>
|
<string notr="true">QPushButton {
|
||||||
|
background: qlineargradient(x1: 0.5, y1: 0, x2: 0.5, y2: 1, stop: 0 #6F9CD6, stop: 1 #A5ABB7);
|
||||||
|
border: none;
|
||||||
|
border-radius: 8px;
|
||||||
|
font-size: 14px;
|
||||||
|
text-align: center;
|
||||||
|
padding-top: 20px;
|
||||||
|
padding-bottom: 1px;}</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>管理器</string>
|
<string>管理器</string>
|
||||||
|
|||||||
+35
-21
@@ -17,11 +17,6 @@ PrintSetting::PrintSetting(QWidget *parent) :
|
|||||||
ui->lineEditTriggerPulsePerMm->setValidator(new QDoubleValidator(0));
|
ui->lineEditTriggerPulsePerMm->setValidator(new QDoubleValidator(0));
|
||||||
connect(pulseNumFix,SIGNAL(pulseNuxFixDone(float)),this,SLOT(onPulseNumFixDone(float)));
|
connect(pulseNumFix,SIGNAL(pulseNuxFixDone(float)),this,SLOT(onPulseNumFixDone(float)));
|
||||||
|
|
||||||
ui->checkBoxEleEyeMakeClean->setHidden(1);
|
|
||||||
ui->spinBoxOuputPulseCol->setHidden(1);
|
|
||||||
ui->labelSynTriggerPrintLenRatio->setHidden(1);
|
|
||||||
ui->spinBoxSynTriggerPrintLenRatio->setHidden(1);
|
|
||||||
|
|
||||||
// 隐藏延时、产生脉冲所需计数、脉冲输出使能、禁止电眼清零、字符宽度、电眼清零
|
// 隐藏延时、产生脉冲所需计数、脉冲输出使能、禁止电眼清零、字符宽度、电眼清零
|
||||||
ui->labelOutputPulseDelayMs->hide();
|
ui->labelOutputPulseDelayMs->hide();
|
||||||
ui->spinBoxOutputPulseDelayMs->hide();
|
ui->spinBoxOutputPulseDelayMs->hide();
|
||||||
@@ -32,11 +27,12 @@ PrintSetting::PrintSetting(QWidget *parent) :
|
|||||||
ui->checkBoxEleEyeMakeClean->hide();
|
ui->checkBoxEleEyeMakeClean->hide();
|
||||||
ui->spinBoxOuputPulseCol->hide();
|
ui->spinBoxOuputPulseCol->hide();
|
||||||
ui->checkBoxPulseOutputEnable->hide();
|
ui->checkBoxPulseOutputEnable->hide();
|
||||||
|
ui->comboBoxEleEyeMakeClean->setCurrentIndex(0);
|
||||||
ui->comboBoxEleEyeMakeClean->hide();
|
ui->comboBoxEleEyeMakeClean->hide();
|
||||||
|
// 间隔模式默认行末对行首
|
||||||
|
ui->comboBoxTimeTriggerMode->setEnabled(false);
|
||||||
// ui->labelTimeTriggerMode->setEnabled(false);
|
ui->spinBoxpluseSinal->hide();
|
||||||
// ui->comboBoxTimeTriggerMode->setEnabled(false);
|
ui->label_6->hide();
|
||||||
|
|
||||||
init();
|
init();
|
||||||
|
|
||||||
@@ -131,6 +127,8 @@ void PrintSetting::applyUIPara(){
|
|||||||
|
|
||||||
sysPara->devOp->writeFpgaCalandar(0);
|
sysPara->devOp->writeFpgaCalandar(0);
|
||||||
|
|
||||||
|
sysPara->devOp->writeFlightCompCtrl(ui->enbFlightCompCtrl->isChecked(),
|
||||||
|
ui->enbAccelDecelPredict->isChecked(), quint32(ui->flightCompWindowCycles->value()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -183,7 +181,7 @@ void PrintSetting::TriggerupdateSysParaToUI(){
|
|||||||
ui->radioButtonSynTriggerInner->setChecked(sysPara->para.synTriggerInner);
|
ui->radioButtonSynTriggerInner->setChecked(sysPara->para.synTriggerInner);
|
||||||
ui->radioButtonSynTriggerExternal->setChecked(sysPara->para.synTriggerExternal);
|
ui->radioButtonSynTriggerExternal->setChecked(sysPara->para.synTriggerExternal);
|
||||||
|
|
||||||
ui->sb_printingDelay->setValue(sysPara->para.printDelayMs);
|
ui->spinBoxEleEyeTriggerPrintDelay->setValue(sysPara->para.eleEyeTriggerPrintDelay);
|
||||||
#ifndef NON_CABLE
|
#ifndef NON_CABLE
|
||||||
ui->comboBoxTimeTriggerMode->setCurrentIndex(sysPara->para.timeTriggerPrintMode);
|
ui->comboBoxTimeTriggerMode->setCurrentIndex(sysPara->para.timeTriggerPrintMode);
|
||||||
#endif
|
#endif
|
||||||
@@ -201,9 +199,9 @@ void PrintSetting::TriggerupdateSysParaToUI(){
|
|||||||
ui->spinBoxSynTriggerPrintLenRatio->setValue(sysPara->para.synTriggerPrintLenRatio);
|
ui->spinBoxSynTriggerPrintLenRatio->setValue(sysPara->para.synTriggerPrintLenRatio);
|
||||||
|
|
||||||
/*----------------------------------------*/
|
/*----------------------------------------*/
|
||||||
ui->spinBoxEleEyeTriggerPrintDelay->setValue(sysPara->para.eleEyeTriggerPrintDelay);
|
// ui->spinBoxEleEyeTriggerPrintDelay->setValue(sysPara->para.eleEyeTriggerPrintDelay);
|
||||||
//ui->checkBoxEleEyeMakeClean->setChecked(sysPara->para.eleEyeClearCntInSynMode);
|
//ui->checkBoxEleEyeMakeClean->setChecked(sysPara->para.eleEyeClearCntInSynMode);
|
||||||
ui->comboBoxEleEyeMakeClean->setCurrentIndex( sysPara->para.eleEyeClearCntInSynMode & 0x0f);
|
ui->comboBoxEleEyeMakeClean->setCurrentIndex( sysPara->para.eleEyeClearCntInSynMode - 0x20);
|
||||||
|
|
||||||
ui->checkBoxPulseOutputEnable->setChecked(sysPara->para.pulseOutputEnable);
|
ui->checkBoxPulseOutputEnable->setChecked(sysPara->para.pulseOutputEnable);
|
||||||
// ui->labelProductCntPerOutputPulse->setEnabled(sysPara->para.pulseOutputEnable);
|
// ui->labelProductCntPerOutputPulse->setEnabled(sysPara->para.pulseOutputEnable);
|
||||||
@@ -216,7 +214,14 @@ void PrintSetting::TriggerupdateSysParaToUI(){
|
|||||||
|
|
||||||
// ui->spinBoxOutputPulseDelayMs->setEnabled(isPulseEenable);
|
// ui->spinBoxOutputPulseDelayMs->setEnabled(isPulseEenable);
|
||||||
ui->spinBoxOuputPulseCol->setValue(sysPara->para.OuputPulseCol);
|
ui->spinBoxOuputPulseCol->setValue(sysPara->para.OuputPulseCol);
|
||||||
ui->comboBoxSyncActType->setCurrentIndex (sysPara->para.synchronizorActType);
|
|
||||||
|
// 通过是否关闭同步器反转补偿,来确定选项框索引
|
||||||
|
int comboBoxSyncActTypeIndex = int(sysPara->para.synchronizorActType);
|
||||||
|
if(!sysPara->para.syncRevCompDisable && sysPara->para.synchronizorActType != 0) {
|
||||||
|
comboBoxSyncActTypeIndex = int(sysPara->para.synchronizorActType) + 2;
|
||||||
|
}
|
||||||
|
ui->comboBoxSyncActType->setCurrentIndex(comboBoxSyncActTypeIndex);
|
||||||
|
|
||||||
//ui->checkBoxAutoSpeedEN->setChecked (sysPara->para.autoSynSpeedEn );
|
//ui->checkBoxAutoSpeedEN->setChecked (sysPara->para.autoSynSpeedEn );
|
||||||
ui->spinBoxEleMaskTime->setValue(sysPara->para.eleMaskTime);
|
ui->spinBoxEleMaskTime->setValue(sysPara->para.eleMaskTime);
|
||||||
|
|
||||||
@@ -297,7 +302,7 @@ void PrintSetting::applyUITriggerPara(){
|
|||||||
|
|
||||||
void PrintSetting::GetTriggerUIPara(){
|
void PrintSetting::GetTriggerUIPara(){
|
||||||
if(sysPara){
|
if(sysPara){
|
||||||
sysPara->para.printDelayMs = ui->sb_printingDelay->value();
|
sysPara->para.eleEyeTriggerPrintDelay = ui->spinBoxEleEyeTriggerPrintDelay->value();
|
||||||
sysPara->para.timeTriggerPrintMode = ui->comboBoxTimeTriggerMode->currentIndex();
|
sysPara->para.timeTriggerPrintMode = ui->comboBoxTimeTriggerMode->currentIndex();
|
||||||
sysPara->para.elecEyeTriggerInterval = ui->spinBoxEleEyeTriggerIntervalMs->value(); //电眼触发的重复间隔
|
sysPara->para.elecEyeTriggerInterval = ui->spinBoxEleEyeTriggerIntervalMs->value(); //电眼触发的重复间隔
|
||||||
int value = 0;
|
int value = 0;
|
||||||
@@ -357,14 +362,22 @@ void PrintSetting::GetTriggerUIPara(){
|
|||||||
// sysPara->para.eleEyeTriggerSynPrintEn = ui->checkEyeTriggerSynPrintEn->isChecked ();
|
// sysPara->para.eleEyeTriggerSynPrintEn = ui->checkEyeTriggerSynPrintEn->isChecked ();
|
||||||
// sysPara->para.eleEyeTriggerSynPrintEn = ui->eleEyeEdgetTriggerExternal->isChecked() && ui->radioButtonSynTriggerExternal->isChecked();
|
// sysPara->para.eleEyeTriggerSynPrintEn = ui->eleEyeEdgetTriggerExternal->isChecked() && ui->radioButtonSynTriggerExternal->isChecked();
|
||||||
|
|
||||||
sysPara->para.eleEyeTriggerPrintDelay = ui->spinBoxEleEyeTriggerPrintDelay->value();
|
// sysPara->para.eleEyeTriggerPrintDelay = ui->spinBoxEleEyeTriggerPrintDelay->value();
|
||||||
sysPara->para.eleEyeClearCntInSynMode = (sysPara->para.eleEyeClearCntInSynMode & 0xf0) + ui->comboBoxEleEyeMakeClean->currentIndex(); //ui->checkBoxEleEyeMakeClean->isChecked();
|
|
||||||
|
// 韩国版本不需要电眼清零 byons@2026年6月23日
|
||||||
|
sysPara->para.eleEyeClearCntInSynMode = 0x20 ; // + ui->comboBoxEleEyeMakeClean->currentIndex(); //ui->checkBoxEleEyeMakeClean->isChecked();
|
||||||
//sysPara->para.autoSynSpeedEn = ui->checkBoxAutoSpeedEN->isChecked ();
|
//sysPara->para.autoSynSpeedEn = ui->checkBoxAutoSpeedEN->isChecked ();
|
||||||
sysPara->para.autoSynSpeedEn = 0;
|
sysPara->para.syncRevCompDisable = 0;
|
||||||
//sysPara->para.synPulsePerMmX8 = (unsigned short)(sysPara->para.synPulseNumPerMm *256);
|
//sysPara->para.synPulsePerMmX8 = (unsigned short)(sysPara->para.synPulseNumPerMm *256);
|
||||||
sysPara->para.synPulsePerMmX8 = (unsigned short)((unsigned int)sysPara->para.synPulseNumPerMm <<8);
|
sysPara->para.synPulsePerMmX8 = (unsigned short)((unsigned int)sysPara->para.synPulseNumPerMm <<8);
|
||||||
sysPara->para.eleMaskTime = ui->spinBoxEleMaskTime->value();
|
sysPara->para.eleMaskTime = ui->spinBoxEleMaskTime->value();
|
||||||
sysPara->para.synchronizorActType = ui->comboBoxSyncActType->currentIndex();
|
|
||||||
|
// 带补偿的正反转打印选项,位于最后两个comboBox item
|
||||||
|
sysPara->para.synchronizorActType = ui->comboBoxSyncActType->currentIndex() > 2 ?
|
||||||
|
ui->comboBoxSyncActType->currentIndex() - 2 : ui->comboBoxSyncActType->currentIndex();
|
||||||
|
|
||||||
|
sysPara->para.syncRevCompDisable = ui->comboBoxSyncActType->currentIndex() <= 2;
|
||||||
|
|
||||||
sysPara->para.pulse_sinal_value = ui->spinBoxpluseSinal->value();
|
sysPara->para.pulse_sinal_value = ui->spinBoxpluseSinal->value();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -438,7 +451,7 @@ void PrintSetting::on_checkEyeTriggerSynPrintEn_clicked(bool checked)
|
|||||||
ui->labelEleEyeTriggerIntervalMs->setText(tr("重复间隔(毫米)"));
|
ui->labelEleEyeTriggerIntervalMs->setText(tr("重复间隔(毫米)"));
|
||||||
ui->labelEleMaskTime->setText(tr("抑止距离(毫米)"));
|
ui->labelEleMaskTime->setText(tr("抑止距离(毫米)"));
|
||||||
ui->labelOutputPulseDelayMs->setText(tr("延时(毫米):"));
|
ui->labelOutputPulseDelayMs->setText(tr("延时(毫米):"));
|
||||||
if(ui->comboBoxSyncActType->currentIndex() || 0b11) //如果不是在正反转打印的模式下,就切换到正反转模式
|
if(ui->comboBoxSyncActType->currentIndex() >= ui->comboBoxSyncActType->count() || ui->comboBoxSyncActType->currentIndex() == -1) //如果不是在正反转打印的模式下,就切换到正反转模式
|
||||||
{
|
{
|
||||||
ui->comboBoxSyncActType->setCurrentIndex(0);
|
ui->comboBoxSyncActType->setCurrentIndex(0);
|
||||||
}
|
}
|
||||||
@@ -706,13 +719,14 @@ void PrintSetting::on_eleEyeEdgetTriggerInner_clicked()
|
|||||||
|
|
||||||
void PrintSetting::setEnableEleEyeSetting(bool flag){
|
void PrintSetting::setEnableEleEyeSetting(bool flag){
|
||||||
|
|
||||||
ui->labelEleEyeTriggerIntervalMs->setEnabled(!(!flag && ui->radioButtonSynTriggerInner->isChecked()));
|
ui->labelEleEyeTriggerIntervalMs->setEnabled(!(ui->radioButtonSynTriggerExternal->isChecked() && ui->eleEyeEdgetTriggerInner->isChecked()));
|
||||||
|
ui->spinBoxEleEyeTriggerIntervalMs->setEnabled(!(ui->radioButtonSynTriggerExternal->isChecked() && ui->eleEyeEdgetTriggerInner->isChecked()));
|
||||||
ui->spinBoxEleMaskTime->setEnabled(flag);
|
ui->spinBoxEleMaskTime->setEnabled(flag);
|
||||||
ui->spinBoxEleEyeTriggerRepeatCnt->setEnabled(flag);
|
ui->spinBoxEleEyeTriggerRepeatCnt->setEnabled(flag);
|
||||||
ui->radioButtonEleEyeEdgetTrigger->setEnabled(flag);
|
ui->radioButtonEleEyeEdgetTrigger->setEnabled(flag);
|
||||||
ui->radioButtonEleEyeLevelTrigger->setEnabled(flag);
|
ui->radioButtonEleEyeLevelTrigger->setEnabled(flag);
|
||||||
ui->cb_unlimited->setEnabled(flag);
|
ui->cb_unlimited->setEnabled(flag);
|
||||||
ui->sb_printingDelay->setEnabled(flag);
|
ui->spinBoxEleEyeTriggerPrintDelay->setEnabled(flag);
|
||||||
if (!flag) ui->cb_unlimited->setChecked(false);
|
if (!flag) ui->cb_unlimited->setChecked(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+342
-286
@@ -26,7 +26,7 @@
|
|||||||
<enum>Qt::StrongFocus</enum>
|
<enum>Qt::StrongFocus</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>3</number>
|
<number>4</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tab">
|
<widget class="QWidget" name="tab">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
@@ -35,8 +35,8 @@
|
|||||||
<widget class="QLabel" name="label_9">
|
<widget class="QLabel" name="label_9">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>150</x>
|
<x>39</x>
|
||||||
<y>80</y>
|
<y>60</y>
|
||||||
<width>191</width>
|
<width>191</width>
|
||||||
<height>37</height>
|
<height>37</height>
|
||||||
</rect>
|
</rect>
|
||||||
@@ -57,8 +57,8 @@
|
|||||||
<widget class="QSpinBox" name="spinBoxHighVoltageValue">
|
<widget class="QSpinBox" name="spinBoxHighVoltageValue">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>350</x>
|
<x>239</x>
|
||||||
<y>80</y>
|
<y>60</y>
|
||||||
<width>121</width>
|
<width>121</width>
|
||||||
<height>37</height>
|
<height>37</height>
|
||||||
</rect>
|
</rect>
|
||||||
@@ -82,9 +82,9 @@
|
|||||||
<widget class="QLabel" name="label_3">
|
<widget class="QLabel" name="label_3">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>140</x>
|
<x>39</x>
|
||||||
<y>150</y>
|
<y>130</y>
|
||||||
<width>201</width>
|
<width>191</width>
|
||||||
<height>37</height>
|
<height>37</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@@ -104,8 +104,8 @@
|
|||||||
<widget class="QSpinBox" name="spinBoxColDelay">
|
<widget class="QSpinBox" name="spinBoxColDelay">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>350</x>
|
<x>239</x>
|
||||||
<y>150</y>
|
<y>130</y>
|
||||||
<width>122</width>
|
<width>122</width>
|
||||||
<height>37</height>
|
<height>37</height>
|
||||||
</rect>
|
</rect>
|
||||||
@@ -123,9 +123,9 @@
|
|||||||
<widget class="QLabel" name="label_38">
|
<widget class="QLabel" name="label_38">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>120</x>
|
<x>29</x>
|
||||||
<y>230</y>
|
<y>210</y>
|
||||||
<width>221</width>
|
<width>201</width>
|
||||||
<height>37</height>
|
<height>37</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@@ -139,8 +139,8 @@
|
|||||||
<widget class="QComboBox" name="comboBox_selcetVolPara">
|
<widget class="QComboBox" name="comboBox_selcetVolPara">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>351</x>
|
<x>240</x>
|
||||||
<y>230</y>
|
<y>210</y>
|
||||||
<width>220</width>
|
<width>220</width>
|
||||||
<height>37</height>
|
<height>37</height>
|
||||||
</rect>
|
</rect>
|
||||||
@@ -167,6 +167,58 @@
|
|||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QCheckBox" name="checkBoxLeftRightInverse">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>480</x>
|
||||||
|
<y>130</y>
|
||||||
|
<width>161</width>
|
||||||
|
<height>37</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>37</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="layoutDirection">
|
||||||
|
<enum>Qt::RightToLeft</enum>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>信息左右颠倒</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="image.qrc">
|
||||||
|
<normaloff>:/icon/leftright.png</normaloff>:/icon/leftright.png</iconset>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QCheckBox" name="checkBoxUpDownInverse">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>480</x>
|
||||||
|
<y>60</y>
|
||||||
|
<width>161</width>
|
||||||
|
<height>37</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>37</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="layoutDirection">
|
||||||
|
<enum>Qt::RightToLeft</enum>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>信息上下颠倒</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="image.qrc">
|
||||||
|
<normaloff>:/icon/updown.png</normaloff>:/icon/updown.png</iconset>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="tab_4">
|
<widget class="QWidget" name="tab_4">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
@@ -296,7 +348,7 @@
|
|||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="lb_printingDelay">
|
<widget class="QLabel" name="labelEleEyeTriggerPrintDelay">
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>16777215</width>
|
<width>16777215</width>
|
||||||
@@ -315,7 +367,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QSpinBox" name="sb_printingDelay">
|
<widget class="QSpinBox" name="spinBoxEleEyeTriggerPrintDelay">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
@@ -701,6 +753,16 @@
|
|||||||
<string>同步器只反转打印</string>
|
<string>同步器只反转打印</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>带补偿的正转打印</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>带补偿的反转打印</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
@@ -758,274 +820,6 @@
|
|||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>其他设置</string>
|
<string>其他设置</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<widget class="QCheckBox" name="checkBoxUpDownInverse">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>434</x>
|
|
||||||
<y>90</y>
|
|
||||||
<width>161</width>
|
|
||||||
<height>37</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>37</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="layoutDirection">
|
|
||||||
<enum>Qt::RightToLeft</enum>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>信息上下颠倒</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="image.qrc">
|
|
||||||
<normaloff>:/icon/updown.png</normaloff>:/icon/updown.png</iconset>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QCheckBox" name="checkBoxLeftRightInverse">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>434</x>
|
|
||||||
<y>140</y>
|
|
||||||
<width>161</width>
|
|
||||||
<height>37</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>37</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="layoutDirection">
|
|
||||||
<enum>Qt::RightToLeft</enum>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>信息左右颠倒</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="image.qrc">
|
|
||||||
<normaloff>:/icon/leftright.png</normaloff>:/icon/leftright.png</iconset>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="layoutWidget_9">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>40</x>
|
|
||||||
<y>30</y>
|
|
||||||
<width>311</width>
|
|
||||||
<height>211</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_8" columnstretch="1,1" columnminimumwidth="1,1">
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QSpinBox" name="spinBoxAltMirrorGap">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>37</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<number>65535</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="label_6">
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true"/>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>脉冲信号值:</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBoxAltMirrType">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>150</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>110</width>
|
|
||||||
<height>37</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>无镜像打印</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>自动水平翻转 </string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>自动垂直翻转</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>中心对称旋转</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QSpinBox" name="spinBoxpluseSinal">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>37</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="prefix">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<number>100</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="1">
|
|
||||||
<widget class="QSpinBox" name="spinBoxOutputPulseDelayMs">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>100</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="minimum">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<number>65535</number>
|
|
||||||
</property>
|
|
||||||
<property name="singleStep">
|
|
||||||
<number>1</number>
|
|
||||||
</property>
|
|
||||||
<property name="value">
|
|
||||||
<number>10</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label_7">
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true"/>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>镜象交替类型:</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="0">
|
|
||||||
<widget class="QLabel" name="labelOutputPulseDelayMs">
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true"/>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>延时(毫秒):</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="label_8">
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true"/>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>镜像交替间隔:</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="ClickLabel" name="labelEleEyeTriggerPrintDelay">
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true"/>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>触发延时(毫秒):</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QSpinBox" name="spinBoxEleEyeTriggerPrintDelay">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>37</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="minimum">
|
|
||||||
<number>1</number>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<number>100000</number>
|
|
||||||
</property>
|
|
||||||
<property name="singleStep">
|
|
||||||
<number>1</number>
|
|
||||||
</property>
|
|
||||||
<property name="value">
|
|
||||||
<number>1</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="QComboBox" name="comboBoxEleEyeMakeClean">
|
<widget class="QComboBox" name="comboBoxEleEyeMakeClean">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
@@ -1307,6 +1101,251 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QWidget" name="layoutWidget">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>41</x>
|
||||||
|
<y>31</y>
|
||||||
|
<width>311</width>
|
||||||
|
<height>211</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinBoxAltMirrorGap">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>37</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>65535</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBoxAltMirrType">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>150</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>110</width>
|
||||||
|
<height>37</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>无镜像打印</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>自动水平翻转 </string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>自动垂直翻转</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>中心对称旋转</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label_7">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true"/>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>镜象交替类型:</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_8">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true"/>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>镜像交替间隔:</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinBoxOutputPulseDelayMs">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>31</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>65535</number>
|
||||||
|
</property>
|
||||||
|
<property name="singleStep">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>10</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="labelOutputPulseDelayMs">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true"/>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>延时(毫秒):</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_6">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true"/>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>脉冲信号值:</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinBoxpluseSinal">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>37</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="prefix">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>100</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="tab_2">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>调试设置</string>
|
||||||
|
</attribute>
|
||||||
|
<widget class="QCheckBox" name="enbFlightCompCtrl">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>30</x>
|
||||||
|
<y>10</y>
|
||||||
|
<width>181</width>
|
||||||
|
<height>31</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>开启墨点飞行补偿</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="flightCompPanel" native="true">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>20</x>
|
||||||
|
<y>40</y>
|
||||||
|
<width>771</width>
|
||||||
|
<height>111</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<widget class="QLabel" name="labFlightComp">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>751</width>
|
||||||
|
<height>31</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>墨点飞行补偿统计窗口(系统时钟周期), 0表示使用相检得到的飞行时间</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QSpinBox" name="flightCompWindowCycles">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>30</y>
|
||||||
|
<width>241</width>
|
||||||
|
<height>31</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="buttonSymbols">
|
||||||
|
<enum>QAbstractSpinBox::NoButtons</enum>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>999999999</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QCheckBox" name="enbAccelDecelPredict">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>70</y>
|
||||||
|
<width>301</width>
|
||||||
|
<height>31</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>启用加减速预测</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QPushButton" name="closeBtn">
|
<widget class="QPushButton" name="closeBtn">
|
||||||
@@ -1349,5 +1388,22 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<include location="image.qrc"/>
|
<include location="image.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections/>
|
<connections>
|
||||||
|
<connection>
|
||||||
|
<sender>enbFlightCompCtrl</sender>
|
||||||
|
<signal>toggled(bool)</signal>
|
||||||
|
<receiver>flightCompPanel</receiver>
|
||||||
|
<slot>setEnabled(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>86</x>
|
||||||
|
<y>41</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>446</x>
|
||||||
|
<y>129</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
</connections>
|
||||||
</ui>
|
</ui>
|
||||||
|
|||||||
+1
-1
@@ -489,7 +489,7 @@ void SysPara::loadPrintParaFromFile(QString fileName){
|
|||||||
para.timeTriggerPrintDelayMs = print.timeTriggerPrintDelayMs ;
|
para.timeTriggerPrintDelayMs = print.timeTriggerPrintDelayMs ;
|
||||||
para.timeTriggerPrintMode = print.timeTriggerPrintMode ;
|
para.timeTriggerPrintMode = print.timeTriggerPrintMode ;
|
||||||
para.upDownInverse = print.upDownInverse ;
|
para.upDownInverse = print.upDownInverse ;
|
||||||
z
|
|
||||||
para.varLen = print.varLen;
|
para.varLen = print.varLen;
|
||||||
print.varLen1 = para.varLen1;
|
print.varLen1 = para.varLen1;
|
||||||
para.varLenEn = print.varLenEn?1:0;
|
para.varLenEn = print.varLenEn?1:0;
|
||||||
|
|||||||
@@ -604,7 +604,7 @@ typedef struct {
|
|||||||
|
|
||||||
unsigned char Cnt1NatureValue:1; //自然数
|
unsigned char Cnt1NatureValue:1; //自然数
|
||||||
unsigned char eleEyeTriggerSynPrintEn:1; //电眼触发的同步打印使能
|
unsigned char eleEyeTriggerSynPrintEn:1; //电眼触发的同步打印使能
|
||||||
unsigned char autoSynSpeedEn:1; //同步打印自动模式
|
unsigned char syncRevCompDisable:1; //同步打印自动模式
|
||||||
unsigned char newAmplifyPlate:1;
|
unsigned char newAmplifyPlate:1;
|
||||||
unsigned char SynCntEn1:1; // 不打印走米
|
unsigned char SynCntEn1:1; // 不打印走米
|
||||||
unsigned char Vol1of8En:1; //打印优化
|
unsigned char Vol1of8En:1; //打印优化
|
||||||
|
|||||||
+1
-1
@@ -892,7 +892,7 @@
|
|||||||
}</string>
|
}</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>JET2neo-TEST</string>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
+3
-3
@@ -5,9 +5,9 @@
|
|||||||
Major.Minor.Rivison.yyyy-MM-DD_Beta
|
Major.Minor.Rivison.yyyy-MM-DD_Beta
|
||||||
*/
|
*/
|
||||||
#define UP_PRINTER_MAJOR_VER 6
|
#define UP_PRINTER_MAJOR_VER 6
|
||||||
#define UP_PRINTER_MINOR_VER 3
|
#define UP_PRINTER_MINOR_VER 6
|
||||||
#define UP_PRINTER_RIVISION_VER 6
|
#define UP_PRINTER_RIVISION_VER 1
|
||||||
#define SUB_VERSION "_V2"
|
#define SUB_VERSION "_test"
|
||||||
#ifdef __RFID_OLD
|
#ifdef __RFID_OLD
|
||||||
#define SUB_RFID "_RO"
|
#define SUB_RFID "_RO"
|
||||||
#else
|
#else
|
||||||
|
|||||||
+766
-674
File diff suppressed because it is too large
Load Diff
+766
-674
File diff suppressed because it is too large
Load Diff
+98
-16
@@ -69,8 +69,8 @@ MainWidget::MainWidget(QWidget* parent)
|
|||||||
|
|
||||||
// ui.labelRunStatus->setWordWrap(true);
|
// ui.labelRunStatus->setWordWrap(true);
|
||||||
|
|
||||||
ui.sub3->installEventFilter(this);
|
// ui.sub3->installEventFilter(this);
|
||||||
ui.fra_state->installEventFilter(this);
|
// ui.fra_state->installEventFilter(this);
|
||||||
ui.labelTotalProductCnt->hide();
|
ui.labelTotalProductCnt->hide();
|
||||||
ui.lb_counter->hide();
|
ui.lb_counter->hide();
|
||||||
|
|
||||||
@@ -95,6 +95,8 @@ MainWidget::MainWidget(QWidget* parent)
|
|||||||
|
|
||||||
scroller->setScrollerProperties(properties);
|
scroller->setScrollerProperties(properties);
|
||||||
scroller->grabGesture(ui.scrollArea->viewport(), QScroller::LeftMouseButtonGesture);
|
scroller->grabGesture(ui.scrollArea->viewport(), QScroller::LeftMouseButtonGesture);
|
||||||
|
|
||||||
|
connect(ui.btn_newFile, &QPushButton::clicked, this, &MainWidget::newFileAcquired);
|
||||||
}
|
}
|
||||||
|
|
||||||
MainWidget::~MainWidget()
|
MainWidget::~MainWidget()
|
||||||
@@ -1534,6 +1536,9 @@ void MainWidget::enableReclaimCtrlButton(bool enable){
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MainWidget::enablePrintButton(bool enable){
|
void MainWidget::enablePrintButton(bool enable){
|
||||||
|
#ifdef QT_DEBUG
|
||||||
|
enable = true;
|
||||||
|
#endif
|
||||||
m_StartBtn->setEnabled(enable);
|
m_StartBtn->setEnabled(enable);
|
||||||
m_StopBtn->setEnabled(enable);
|
m_StopBtn->setEnabled(enable);
|
||||||
}
|
}
|
||||||
@@ -1593,6 +1598,7 @@ void MainWidget::on_m_StartBtn_clicked()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/******2020/2/29 end*****/
|
/******2020/2/29 end*****/
|
||||||
|
#ifndef QT_DEBUG
|
||||||
if(!SIMULATE_PRINTING_MODE){
|
if(!SIMULATE_PRINTING_MODE){
|
||||||
if (!sysPara->status.reclainTankReachEnd) {
|
if (!sysPara->status.reclainTankReachEnd) {
|
||||||
return;
|
return;
|
||||||
@@ -1606,6 +1612,7 @@ void MainWidget::on_m_StartBtn_clicked()
|
|||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
sysPara->devOp->highVoltageCtrl(1);
|
sysPara->devOp->highVoltageCtrl(1);
|
||||||
sysPara->devOp->setHighVoltageAmplitudetoSTM32();
|
sysPara->devOp->setHighVoltageAmplitudetoSTM32();
|
||||||
@@ -2344,8 +2351,8 @@ void MainWidget::updateSysStatusToUI(){ //100ms
|
|||||||
// ui->pushButton_Reboot->setEnabled(false);
|
// ui->pushButton_Reboot->setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(sysPara->RFIDPara.inkCardTimeOut || sysPara->RFIDPara.solventCardTimeOut || sysPara->RFIDPara.needMaintenance)
|
// if(sysPara->RFIDPara.inkCardTimeOut || sysPara->RFIDPara.solventCardTimeOut || sysPara->RFIDPara.needMaintenance)
|
||||||
m_RightBtn->setEnabled(false);
|
// m_RightBtn->setEnabled(false); todo
|
||||||
// else if(sysPara->status.selfCheckDone == 1)
|
// else if(sysPara->status.selfCheckDone == 1)
|
||||||
// {
|
// {
|
||||||
// m_RightBtn->setEnabled(true);
|
// m_RightBtn->setEnabled(true);
|
||||||
@@ -3525,27 +3532,102 @@ bool MainWidget::updatePhaseIndicatorLight(){
|
|||||||
return sysPara->status.lastPhaseFault;
|
return sysPara->status.lastPhaseFault;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MainWidget::eventFilter(QObject *watched, QEvent *event)
|
|
||||||
|
//void MainWidget::mouseDoubleClickEvent(QMouseEvent *event)
|
||||||
|
//{
|
||||||
|
// if (event->button() != Qt::LeftButton) {
|
||||||
|
// QWidget::mouseDoubleClickEvent(event);
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// QPoint globalPos = event->globalPos();
|
||||||
|
// const int expandSize = 50; // 扩大到50像素
|
||||||
|
|
||||||
|
// // 检测函数
|
||||||
|
// auto isInExpandedRect = [&](QWidget* widget) -> bool {
|
||||||
|
// if (!widget) return false;
|
||||||
|
// QRect rect = widget->geometry();
|
||||||
|
// rect.translate(widget->parentWidget()->mapToGlobal(QPoint(0, 0)));
|
||||||
|
// rect.adjust(-expandSize, -expandSize, expandSize, expandSize);
|
||||||
|
// return rect.contains(globalPos);
|
||||||
|
// };
|
||||||
|
|
||||||
|
// if (isInExpandedRect(ui.sub3)) {
|
||||||
|
// if (m_setNumDlg) {
|
||||||
|
// m_setNumDlg->show();
|
||||||
|
// event->accept();
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if (isInExpandedRect(ui.fra_state)) {
|
||||||
|
// LogInfoCtrl::instance()->emitSigShow();
|
||||||
|
// event->accept();
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// QWidget::mouseDoubleClickEvent(event);
|
||||||
|
//}
|
||||||
|
|
||||||
|
void MainWidget::mousePressEvent(QMouseEvent *event)
|
||||||
{
|
{
|
||||||
if (event->type() == QEvent::MouseButtonDblClick) {
|
if (event->button() != Qt::LeftButton) {
|
||||||
//双击事件,设置总数xxx,打印该数量后停止
|
QWidget::mousePressEvent(event);
|
||||||
if (watched == ui.sub3 || watched == ui.labelProductCnt) {
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
QPoint currentPos = event->globalPos();
|
||||||
|
qint64 currentTime = QDateTime::currentMSecsSinceEpoch();
|
||||||
|
|
||||||
|
// 计算时间和距离
|
||||||
|
qint64 timeDiff = currentTime - m_lastClickTime;
|
||||||
|
int distance = QLineF(m_lastClickPos, currentPos).length();
|
||||||
|
|
||||||
|
// 判断是否为双击(使用自定义阈值)
|
||||||
|
if (timeDiff <= m_doubleClickInterval && distance <= m_doubleClickDistance) {
|
||||||
|
// 触发双击逻辑
|
||||||
|
handleDoubleClick(event);
|
||||||
|
m_lastClickTime = 0; // 重置,防止三连击触发多次
|
||||||
|
m_lastClickPos = QPoint();
|
||||||
|
event->accept();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新最后一次点击信息
|
||||||
|
m_lastClickPos = currentPos;
|
||||||
|
m_lastClickTime = currentTime;
|
||||||
|
|
||||||
|
QWidget::mousePressEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWidget::handleDoubleClick(QMouseEvent *event)
|
||||||
|
{
|
||||||
|
QPoint globalPos = event->globalPos();
|
||||||
|
|
||||||
|
// 检查目标区域
|
||||||
|
if (isInExpandedRect(ui.sub3, globalPos, m_doubleClickDistance)) {
|
||||||
if (m_setNumDlg) {
|
if (m_setNumDlg) {
|
||||||
m_setNumDlg->show();
|
m_setNumDlg->show();
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isInExpandedRect(ui.fra_state, globalPos, m_doubleClickDistance)) {
|
||||||
|
LogInfoCtrl::instance()->emitSigShow();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event->type() == QEvent::MouseButtonDblClick) {
|
bool MainWidget::isInExpandedRect(QWidget* widget, const QPoint& globalPos, int expandSize)
|
||||||
if (watched == ui.fra_state || ui.lb_generalState) {
|
{
|
||||||
LogInfoCtrl::instance()->emitSigShow();
|
if (!widget || !widget->isVisible()) return false;
|
||||||
return true;
|
QRect rect = widget->geometry();
|
||||||
}
|
rect.translate(widget->parentWidget()->mapToGlobal(QPoint(0, 0)));
|
||||||
}
|
rect.adjust(-expandSize, -expandSize, expandSize, expandSize);
|
||||||
return false;
|
return rect.contains(globalPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWidget::onLabelFaultRusumePressed(){
|
void MainWidget::onLabelFaultRusumePressed(){
|
||||||
if(sysPara){
|
if(sysPara){
|
||||||
sysPara->status.flagOfSpeedAlarm = false;
|
sysPara->status.flagOfSpeedAlarm = false;
|
||||||
|
|||||||
+14
-1
@@ -113,7 +113,8 @@ public:
|
|||||||
|
|
||||||
AlarmStatus alarmStatus;
|
AlarmStatus alarmStatus;
|
||||||
|
|
||||||
bool eventFilter(QObject *watched, QEvent *event) override;
|
// void mouseDoubleClickEvent(QMouseEvent *event) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// UI对象
|
// UI对象
|
||||||
Ui::MainWidget ui;
|
Ui::MainWidget ui;
|
||||||
@@ -148,6 +149,16 @@ private:
|
|||||||
int dlgMyWarringShowDlyCnt;
|
int dlgMyWarringShowDlyCnt;
|
||||||
|
|
||||||
SetNumDlg* m_setNumDlg = nullptr;
|
SetNumDlg* m_setNumDlg = nullptr;
|
||||||
|
|
||||||
|
//------自定义双击------
|
||||||
|
QPoint m_lastClickPos;
|
||||||
|
qint64 m_lastClickTime = 0;
|
||||||
|
const int m_doubleClickDistance = 25; // 自定义距离阈值(像素)
|
||||||
|
const int m_doubleClickInterval = 500; // 自定义时间阈值(毫秒)
|
||||||
|
void mousePressEvent(QMouseEvent *event) override;
|
||||||
|
void handleDoubleClick(QMouseEvent *event);
|
||||||
|
bool isInExpandedRect(QWidget* widget, const QPoint& globalPos, int expandSize);
|
||||||
|
//--------------------
|
||||||
public slots:
|
public slots:
|
||||||
void powerOffConfirmed();
|
void powerOffConfirmed();
|
||||||
void on_m_StartBtn_clicked();
|
void on_m_StartBtn_clicked();
|
||||||
@@ -191,6 +202,8 @@ signals:
|
|||||||
|
|
||||||
void repeatInitedPid();
|
void repeatInitedPid();
|
||||||
void clearPressureFault();
|
void clearPressureFault();
|
||||||
|
|
||||||
|
void newFileAcquired();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MainWidget_H
|
#endif // MainWidget_H
|
||||||
|
|||||||
+10
-1
@@ -345,7 +345,7 @@ void BarcodeEditor::onBarcodeFormatConfirmed()
|
|||||||
void BarcodeEditor::onQrcodeFormatConfirmed()
|
void BarcodeEditor::onQrcodeFormatConfirmed()
|
||||||
{
|
{
|
||||||
m_vm.format.setValue(m_qrcodeFormatEditor.viewModel());
|
m_vm.format.setValue(m_qrcodeFormatEditor.viewModel());
|
||||||
m_vm.type = BARCODE_TYPE_QRCODE;
|
// m_vm.type = BARCODE_TYPE_QRCODE;
|
||||||
|
|
||||||
auto b = ui->cbBoxType->blockSignals(true);
|
auto b = ui->cbBoxType->blockSignals(true);
|
||||||
ui->cbBoxType->setCurrentIndex(int(m_vm.type));
|
ui->cbBoxType->setCurrentIndex(int(m_vm.type));
|
||||||
@@ -586,3 +586,12 @@ QString BarcodeViewModel::toString(const BarcodeViewModel &vm)
|
|||||||
|
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void BarcodeEditor::on_cbBoxType_currentIndexChanged(int index)
|
||||||
|
{
|
||||||
|
//bar 0; qr 1; dm 2;
|
||||||
|
m_vm.type = index;
|
||||||
|
if (index == 0) return;
|
||||||
|
m_qrcodeFormatEditor.setCodeType(ui->cbBoxType->currentText());
|
||||||
|
onQrcodeFormatConfirmed();
|
||||||
|
}
|
||||||
|
|||||||
@@ -15,8 +15,9 @@ class DateReplaceEditor;
|
|||||||
class CounterEditor;
|
class CounterEditor;
|
||||||
|
|
||||||
enum BarcodeType {
|
enum BarcodeType {
|
||||||
BARCODE_TYPE_BARCODE,
|
BARCODE_TYPE_BARCODE = 0,
|
||||||
BARCODE_TYPE_QRCODE,
|
BARCODE_TYPE_QRCODE = 1,
|
||||||
|
BARCODE_TYPE_DMCODE = 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -179,6 +180,8 @@ private slots:
|
|||||||
|
|
||||||
void onTypeChanged(int i);
|
void onTypeChanged(int i);
|
||||||
|
|
||||||
|
void on_cbBoxType_currentIndexChanged(int index);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool eventFilter(QObject* obj, QEvent* event) override;
|
virtual bool eventFilter(QObject* obj, QEvent* event) override;
|
||||||
|
|
||||||
|
|||||||
@@ -277,7 +277,12 @@ QSpinBox::down-arrow {
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>二维码</string>
|
<string>QRCode</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>DataMatrix</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -291,7 +296,7 @@ QSpinBox::down-arrow {
|
|||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>条形码格式</string>
|
<string>码格式</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QGroupBox" name="groupBox">
|
<widget class="QGroupBox" name="groupBox">
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ QComboBox::drop-down {
|
|||||||
|
|
||||||
/* 下拉箭头图标 */
|
/* 下拉箭头图标 */
|
||||||
QComboBox::down-arrow {
|
QComboBox::down-arrow {
|
||||||
image: url(image/down_white.png);
|
image: url(:/image/down_white.png);
|
||||||
width: 16px; /* 图标显示宽度 */
|
width: 16px; /* 图标显示宽度 */
|
||||||
height: 16px; /* 图标显示高度 */
|
height: 16px; /* 图标显示高度 */
|
||||||
}
|
}
|
||||||
@@ -107,7 +107,7 @@ QSpinBox::up-button {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QSpinBox::up-arrow {
|
QSpinBox::up-arrow {
|
||||||
image: url(image/up_white.png);
|
image: url(:/image/up_white.png);
|
||||||
}
|
}
|
||||||
|
|
||||||
QSpinBox::down-button {
|
QSpinBox::down-button {
|
||||||
@@ -119,7 +119,7 @@ QSpinBox::down-button {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QSpinBox::down-arrow {
|
QSpinBox::down-arrow {
|
||||||
image: url(image/down_white.png);
|
image: url(:/image/down_white.png);
|
||||||
}
|
}
|
||||||
</string>
|
</string>
|
||||||
</property>
|
</property>
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ DlgQrcodeFormat::DlgQrcodeFormat(QWidget *parent) :
|
|||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
setViewModel(m_vm);
|
setViewModel(m_vm);
|
||||||
|
ui->comboBoxType->setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
DlgQrcodeFormat::~DlgQrcodeFormat()
|
DlgQrcodeFormat::~DlgQrcodeFormat()
|
||||||
@@ -31,3 +32,9 @@ DlgQrcodeFormatVM DlgQrcodeFormat::viewModel()
|
|||||||
m_vm.size = QRCodeSize(ui->comboBox_DMType->currentIndex());
|
m_vm.size = QRCodeSize(ui->comboBox_DMType->currentIndex());
|
||||||
return m_vm;
|
return m_vm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DlgQrcodeFormat::setCodeType(QString type)
|
||||||
|
{
|
||||||
|
// type = "QRCode" "DataMatrix"
|
||||||
|
ui->comboBoxType->setCurrentText(type);
|
||||||
|
}
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ public:
|
|||||||
|
|
||||||
DlgQrcodeFormatVM viewModel();
|
DlgQrcodeFormatVM viewModel();
|
||||||
|
|
||||||
|
void setCodeType(QString type);
|
||||||
private:
|
private:
|
||||||
Ui::DlgQrcodeFormat *ui;
|
Ui::DlgQrcodeFormat *ui;
|
||||||
|
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ QComboBox::drop-down {
|
|||||||
|
|
||||||
/* 下拉箭头图标 */
|
/* 下拉箭头图标 */
|
||||||
QComboBox::down-arrow {
|
QComboBox::down-arrow {
|
||||||
image: url(image/down_white.png);
|
image: url(:/image/down_white.png);
|
||||||
width: 16px; /* 图标显示宽度 */
|
width: 16px; /* 图标显示宽度 */
|
||||||
height: 16px; /* 图标显示高度 */
|
height: 16px; /* 图标显示高度 */
|
||||||
}
|
}
|
||||||
@@ -110,7 +110,7 @@ QSpinBox::up-button {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QSpinBox::up-arrow {
|
QSpinBox::up-arrow {
|
||||||
image: url(image/up_white.png);
|
image: url(:/image/up_white.png);
|
||||||
}
|
}
|
||||||
|
|
||||||
QSpinBox::down-button {
|
QSpinBox::down-button {
|
||||||
@@ -122,7 +122,7 @@ QSpinBox::down-button {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QSpinBox::down-arrow {
|
QSpinBox::down-arrow {
|
||||||
image: url(image/down_white.png);
|
image: url(:/image/down_white.png);
|
||||||
}
|
}
|
||||||
</string>
|
</string>
|
||||||
</property>
|
</property>
|
||||||
|
|||||||
@@ -460,7 +460,7 @@ QImage ItemUtils::generateBarcodeImage(const QString &content, BarcodeType type,
|
|||||||
return QImage();
|
return QImage();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type == BARCODE_TYPE_QRCODE) {
|
if (type == BARCODE_TYPE_QRCODE || type == BARCODE_TYPE_DMCODE) {
|
||||||
// 优先级:完整VM配置 > 简化int配置 > 默认配置
|
// 优先级:完整VM配置 > 简化int配置 > 默认配置
|
||||||
// 原因:支持从UI直接传递结构体,同时保留向后兼容的快速路径
|
// 原因:支持从UI直接传递结构体,同时保留向后兼容的快速路径
|
||||||
if (format.canConvert<DlgQrcodeFormatVM>()) {
|
if (format.canConvert<DlgQrcodeFormatVM>()) {
|
||||||
|
|||||||
@@ -440,11 +440,6 @@ QImage PicTextItem::strToImage(const QString &str)
|
|||||||
QPainter painter;
|
QPainter painter;
|
||||||
QFontMetrics fm(font());
|
QFontMetrics fm(font());
|
||||||
QImage img(fm.horizontalAdvance(str), fm.height(), QImage::Format_ARGB32);
|
QImage img(fm.horizontalAdvance(str), fm.height(), QImage::Format_ARGB32);
|
||||||
qDebug() << "strToImage: letterSpace: " << letterSpace();
|
|
||||||
|
|
||||||
if(letterSpace() == 2) {
|
|
||||||
qDebug() << "Break point";
|
|
||||||
}
|
|
||||||
|
|
||||||
QRgb txtColor = colorReversal() ? 0xffffffff : 0xff000000;
|
QRgb txtColor = colorReversal() ? 0xffffffff : 0xff000000;
|
||||||
QRgb bgColor = colorReversal() ? 0xff000000 : 0x00000000;
|
QRgb bgColor = colorReversal() ? 0xff000000 : 0x00000000;
|
||||||
|
|||||||
+766
-674
File diff suppressed because it is too large
Load Diff
+23
-293
@@ -20,9 +20,7 @@
|
|||||||
|
|
||||||
#pragma execution_character_set("utf-8")
|
#pragma execution_character_set("utf-8")
|
||||||
|
|
||||||
extern unsigned char vartypeR;
|
|
||||||
//extern QMap<int,QStringList> replaceValueMap;
|
|
||||||
extern QMap<int,QMap<int,QString>> replaceValueMap;
|
|
||||||
TestPrintWidget::TestPrintWidget(QWidget* parent)
|
TestPrintWidget::TestPrintWidget(QWidget* parent)
|
||||||
: QWidget(parent)
|
: QWidget(parent)
|
||||||
{
|
{
|
||||||
@@ -45,8 +43,6 @@ TestPrintWidget::TestPrintWidget(QWidget* parent)
|
|||||||
m_ButtonGroup->addButton(ui.btnArrow, 6);
|
m_ButtonGroup->addButton(ui.btnArrow, 6);
|
||||||
// m_ButtonGroup->addButton(ui.btnList, 7);
|
// m_ButtonGroup->addButton(ui.btnList, 7);
|
||||||
|
|
||||||
dialogFontSize = new DialogFontSize(0);
|
|
||||||
|
|
||||||
dialogSaveFile =new DialogSaveFile(0);
|
dialogSaveFile =new DialogSaveFile(0);
|
||||||
|
|
||||||
dialogFileOperation = new DialogFileOperation(0);
|
dialogFileOperation = new DialogFileOperation(0);
|
||||||
@@ -56,13 +52,10 @@ TestPrintWidget::TestPrintWidget(QWidget* parent)
|
|||||||
m_pSavePicScene->setSceneRect(QRectF(0, 0, 3200, MAX_PRINT_ROW_NUM)); //生成图片的场景
|
m_pSavePicScene->setSceneRect(QRectF(0, 0, 3200, MAX_PRINT_ROW_NUM)); //生成图片的场景
|
||||||
|
|
||||||
editMode = SCENE;
|
editMode = SCENE;
|
||||||
// 窗口基础设置(UI文件已配置,此处可保留或移除)
|
|
||||||
setWindowTitle("Testprint");
|
|
||||||
resize(800, 600);
|
|
||||||
// setStyleSheet("QWidget { font-family: Arial; font-size: 12px; }");
|
|
||||||
|
|
||||||
m_TextEdit = new QTextEdit(0);
|
m_TextEdit = new QTextEdit(0);
|
||||||
m_TextEdit->setLineWrapMode(QTextEdit::NoWrap);
|
m_TextEdit->setLineWrapMode(QTextEdit::NoWrap);
|
||||||
|
|
||||||
// 获取文档并设置边距为0
|
// 获取文档并设置边距为0
|
||||||
m_TextEdit->document()->setDocumentMargin(0);
|
m_TextEdit->document()->setDocumentMargin(0);
|
||||||
QFont font;
|
QFont font;
|
||||||
@@ -79,14 +72,11 @@ TestPrintWidget::TestPrintWidget(QWidget* parent)
|
|||||||
// ui->senceEditOption->bindScene(pPicScene, ui->graphicsView, ui->textEdit);
|
// ui->senceEditOption->bindScene(pPicScene, ui->graphicsView, ui->textEdit);
|
||||||
this->pPicScene->setIsdrawBackground(true);
|
this->pPicScene->setIsdrawBackground(true);
|
||||||
|
|
||||||
|
// 哪个天才写的?拿view和scene计算一下会死吗?
|
||||||
for(int i=0;i<3;i++){
|
for(int i=0;i<3;i++){
|
||||||
on_enlargeButton_pressed();
|
on_enlargeButton_pressed();
|
||||||
}
|
}
|
||||||
|
|
||||||
// connect(dialogSaveFile,SIGNAL(saveFile(QString,bool)),this,SLOT(onSaveASFile(QString,bool)));
|
|
||||||
|
|
||||||
// ui.graphicsView->installEventFilter(this);
|
|
||||||
|
|
||||||
connect(pPicScene,&PicScene::selectionChanged,this,[=]() {
|
connect(pPicScene,&PicScene::selectionChanged,this,[=]() {
|
||||||
getShowSelectItemText();
|
getShowSelectItemText();
|
||||||
});
|
});
|
||||||
@@ -114,10 +104,6 @@ TestPrintWidget::TestPrintWidget(QWidget* parent)
|
|||||||
connect(ui.btnListConfig, &QPushButton::clicked, [this]() {
|
connect(ui.btnListConfig, &QPushButton::clicked, [this]() {
|
||||||
emit sendButtonClickedSignal(9);
|
emit sendButtonClickedSignal(9);
|
||||||
});
|
});
|
||||||
// connect(ui.btnAConfig, &QPushButton::clicked, [this]() {
|
|
||||||
// emit sendButtonClickedSignal(10);
|
|
||||||
// // on_buttonSelectFont_pressed();
|
|
||||||
// });
|
|
||||||
|
|
||||||
connect(ui.btnItemConfig, &QPushButton::clicked, this, &TestPrintWidget::onBtnItemConfigClicked);
|
connect(ui.btnItemConfig, &QPushButton::clicked, this, &TestPrintWidget::onBtnItemConfigClicked);
|
||||||
|
|
||||||
@@ -127,15 +113,6 @@ TestPrintWidget::TestPrintWidget(QWidget* parent)
|
|||||||
on_delButton_pressed();
|
on_delButton_pressed();
|
||||||
});
|
});
|
||||||
|
|
||||||
// 分辨率下拉框(保留原空逻辑)
|
|
||||||
// mei le
|
|
||||||
|
|
||||||
// 地区下拉框(保留原空逻辑)
|
|
||||||
connect(ui.cbLocale, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
|
||||||
[=](int index) {
|
|
||||||
//qDebug() << "选择地区:" << ui.cbLocale->currentText();
|
|
||||||
});
|
|
||||||
|
|
||||||
// 控制区第一行按钮
|
// 控制区第一行按钮
|
||||||
connect(ui.m_btnLeft_Control1, &QPushButton::clicked, this, &TestPrintWidget::selectPreviousItem);
|
connect(ui.m_btnLeft_Control1, &QPushButton::clicked, this, &TestPrintWidget::selectPreviousItem);
|
||||||
connect(ui.m_btnRight_Control1, &QPushButton::clicked, this, &TestPrintWidget::selectNextItem);
|
connect(ui.m_btnRight_Control1, &QPushButton::clicked, this, &TestPrintWidget::selectNextItem);
|
||||||
@@ -220,8 +197,6 @@ TestPrintWidget::TestPrintWidget(QWidget* parent)
|
|||||||
m_LineEdit->setProperty("Enter replace enter", true);
|
m_LineEdit->setProperty("Enter replace enter", true);
|
||||||
connect(m_LineEdit, &QLineEdit::returnPressed, this, &TestPrintWidget::onLineEditReturnPressed);
|
connect(m_LineEdit, &QLineEdit::returnPressed, this, &TestPrintWidget::onLineEditReturnPressed);
|
||||||
|
|
||||||
initSelecteCodeDlg();
|
|
||||||
|
|
||||||
// 网络通信,暂时屏蔽
|
// 网络通信,暂时屏蔽
|
||||||
// ui.btnList->hide();
|
// ui.btnList->hide();
|
||||||
}
|
}
|
||||||
@@ -284,6 +259,8 @@ void TestPrintWidget::on_enlargeButton_pressed()
|
|||||||
// qDebug() << pViewer->devicePixelRatioFScale();
|
// qDebug() << pViewer->devicePixelRatioFScale();
|
||||||
// qDebug() << pViewer->devicePixelRatioF();
|
// qDebug() << pViewer->devicePixelRatioF();
|
||||||
// pViewer->scale(scaleFactor, scaleFactor);
|
// pViewer->scale(scaleFactor, scaleFactor);
|
||||||
|
|
||||||
|
// TODO:: 保留,以后真的要用到放大缩小
|
||||||
((MyView*)pViewer)->ZoomOut();
|
((MyView*)pViewer)->ZoomOut();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -291,7 +268,6 @@ void TestPrintWidget::on_addButton_pressed(const SourceType type)
|
|||||||
{
|
{
|
||||||
addItemFlag = false;
|
addItemFlag = false;
|
||||||
m_LineEdit->setEnabled(true);
|
m_LineEdit->setEnabled(true);
|
||||||
m_TextEdit->clear();
|
|
||||||
m_LineEdit->setText("");
|
m_LineEdit->setText("");
|
||||||
pPicScene->clearSelection();
|
pPicScene->clearSelection();
|
||||||
textItem = new PicTextItem(0, 0, type);
|
textItem = new PicTextItem(0, 0, type);
|
||||||
@@ -310,172 +286,29 @@ void TestPrintWidget::on_addButton_pressed(const SourceType type)
|
|||||||
textItem->setPlainText("");
|
textItem->setPlainText("");
|
||||||
textItem->setSelected(true);
|
textItem->setSelected(true);
|
||||||
|
|
||||||
if(varReplaceItemMap.size()>0){
|
|
||||||
QMap<int, ItemReplaceInfo> newMap;
|
|
||||||
for (auto it = varReplaceItemMap.begin(); it != varReplaceItemMap.end(); ++it) {
|
|
||||||
newMap.insert(it.key() + 1, it.value()); // key直接+1
|
|
||||||
}
|
|
||||||
varReplaceItemMap = newMap; // 原子替换
|
|
||||||
}
|
|
||||||
|
|
||||||
addItemFlag = true;
|
addItemFlag = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestPrintWidget::onEditItemDone()
|
void TestPrintWidget::onEditItemDone()
|
||||||
{
|
{
|
||||||
//Scene Test
|
const QString content = m_LineEdit->text();
|
||||||
QList<QGraphicsItem *> items=pPicScene->items();
|
|
||||||
int index=0;
|
|
||||||
bool flag = false;
|
|
||||||
for(int i=0;i<items.size();i++){
|
|
||||||
index=i;
|
|
||||||
if(items.at(i)->isSelected()){
|
|
||||||
flag = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
QString content = m_LineEdit->text();
|
|
||||||
m_TextEdit->setText(content);
|
|
||||||
if(!flag){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!m_TextEdit->toHtml().contains("<img src=")){
|
|
||||||
QString content = m_LineEdit->text();
|
|
||||||
m_TextEdit->clear();
|
|
||||||
m_TextEdit->setText(content);
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (QGraphicsItem *item, pPicScene->selectedItems())
|
foreach (QGraphicsItem *item, pPicScene->selectedItems())
|
||||||
{
|
{
|
||||||
PicTextItem *pTextItem = (PicTextItem *)item;
|
PicTextItem *pTextItem = (PicTextItem *)item;
|
||||||
QFont font = pTextItem->font();
|
if(pTextItem->sourceType() == SourceType::TEXT)
|
||||||
font.setLetterSpacing(QFont::AbsoluteSpacing,sysPara->para.textEditCharSpace);
|
|
||||||
font.setStyleStrategy(QFont::NoAntialias);
|
|
||||||
pTextItem->setLetterSpace(sysPara->para.textEditCharSpace);
|
|
||||||
pTextItem->setFont(font);
|
|
||||||
m_TextEdit->setFont(font);
|
|
||||||
|
|
||||||
createItemImage();
|
|
||||||
QString html = "<img src=\"/home/plg/doc/scene.png\" />";
|
|
||||||
m_TextEdit->setHtml(html);
|
|
||||||
|
|
||||||
pTextItem->setHtml(m_TextEdit->toHtml());
|
|
||||||
pTextItem->setSource(content);
|
pTextItem->setSource(content);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestPrintWidget::onEditItemCounterDone(){
|
|
||||||
|
|
||||||
//Scene Test
|
|
||||||
QList<QGraphicsItem *> items=pPicScene->items();
|
|
||||||
int index = checkSelectScene();
|
|
||||||
if (index < 0) return;
|
|
||||||
|
|
||||||
QString html = m_TextEdit->toHtml();
|
|
||||||
|
|
||||||
// 计数器1、2的source值 image path: "/7/7...."
|
|
||||||
QString source = html.contains("7/7")? SOURCE_COUNTER1 : SOURCE_COUNTER2;
|
|
||||||
|
|
||||||
foreach (QGraphicsItem *item, pPicScene->selectedItems())
|
|
||||||
{
|
|
||||||
PicTextItem *pTextItem = (PicTextItem *)item;
|
|
||||||
QFont font = pTextItem->font();
|
|
||||||
font.setLetterSpacing(QFont::AbsoluteSpacing,sysPara->para.textEditCharSpace);
|
|
||||||
font.setStyleStrategy(QFont::NoAntialias);
|
|
||||||
pTextItem->setFont(font);
|
|
||||||
pTextItem->setSource(source);
|
|
||||||
|
|
||||||
if(!m_TextEdit->toHtml().contains("<img src=")){
|
|
||||||
//把当前内容保存为图片
|
|
||||||
createItemImage();
|
|
||||||
//将图片设置到编辑器里
|
|
||||||
QString html = "<img src=\"/home/plg/doc/scene.png\" />";
|
|
||||||
m_TextEdit->setHtml(html);
|
|
||||||
}
|
|
||||||
|
|
||||||
pTextItem->setHtml(m_TextEdit->toHtml());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void TestPrintWidget::onReplaceVarEditDone()
|
|
||||||
{
|
|
||||||
//Scene Test
|
|
||||||
QList<QGraphicsItem *> items=pPicScene->items();
|
|
||||||
int index=0;
|
|
||||||
for(int i=0;i<items.size();i++){
|
|
||||||
index=i;
|
|
||||||
if(items.at(i)->isSelected()){
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (QGraphicsItem *item, pPicScene->selectedItems())
|
|
||||||
{
|
|
||||||
if(item)
|
|
||||||
{
|
|
||||||
PicTextItem *pTextItem = (PicTextItem *)item;
|
|
||||||
QFont font = pTextItem->font();
|
|
||||||
// font.setLetterSpacing(QFont::AbsoluteSpacing,sysPara->para.textEditCharSpace);
|
|
||||||
pTextItem->setFont(font);
|
|
||||||
|
|
||||||
if(!m_TextEdit->toHtml().contains("<img src=")){
|
|
||||||
createItemImage();
|
|
||||||
QString html = "<img src=\"/home/plg/doc/scene.png\" />";
|
|
||||||
m_TextEdit->setHtml(html);
|
|
||||||
}
|
|
||||||
// std::cout<<"m_TextEdit:"<<m_TextEdit->toHtml().toStdString()<<std::endl;
|
|
||||||
pTextItem->setHtml(m_TextEdit->toHtml());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void TestPrintWidget::createItemImage()
|
|
||||||
{
|
|
||||||
int coldot = (int)m_TextEdit->document()->size().width();
|
|
||||||
QSize size(coldot,20);
|
|
||||||
// doc->adjustSize();
|
|
||||||
// QSize docSize = doc->size().toSize();
|
|
||||||
m_TextEdit->document()->adjustSize(); // 或 m_TextEdit->document()->size().toSize();
|
|
||||||
m_TextEdit->adjustSize();
|
|
||||||
QSize docSize = m_TextEdit->document()->size().toSize();
|
|
||||||
QImage image(docSize,QImage::Format_ARGB32);
|
|
||||||
// image.fill(0x00ffffff);//填充白色
|
|
||||||
image.fill(Qt::transparent);
|
|
||||||
QPainter painter(&image);
|
|
||||||
m_TextEdit->document()->drawContents (&painter, image.rect()); /*将text写到pic*/
|
|
||||||
image.save("/home/plg/doc/scene.png");
|
|
||||||
}
|
|
||||||
|
|
||||||
void TestPrintWidget::getShowSelectItemText()
|
void TestPrintWidget::getShowSelectItemText()
|
||||||
{
|
{
|
||||||
//Scene Test
|
//Scene Test
|
||||||
QList<QGraphicsItem *> items=pPicScene->items();
|
|
||||||
int index=0;
|
|
||||||
bool flag = false;
|
|
||||||
for(int i=0;i<items.size();i++){
|
|
||||||
index=i;
|
|
||||||
if(items.at(i)->isSelected()){
|
|
||||||
flag = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(flag){
|
|
||||||
if(varReplaceItemMap.contains(index) && addItemFlag){
|
|
||||||
ui.m_LineEdit->setEnabled(false);
|
|
||||||
ui.m_LineEdit->setText("{t}");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
ui.m_LineEdit->setEnabled(true);
|
|
||||||
}else{
|
|
||||||
ui.m_LineEdit->setEnabled(false);
|
ui.m_LineEdit->setEnabled(false);
|
||||||
ui.m_LineEdit->setText("");
|
ui.m_LineEdit->setText("");
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// 选择最后一个被选中的 item,防一手而已,事实上不应允许多选
|
||||||
|
// 直接选第一个被选中的 item,也是可以的
|
||||||
auto selectedItems = pPicScene->selectedItems();
|
auto selectedItems = pPicScene->selectedItems();
|
||||||
|
|
||||||
PicTextItem* lastSelectedTxtItem = nullptr;
|
PicTextItem* lastSelectedTxtItem = nullptr;
|
||||||
@@ -492,6 +325,7 @@ void TestPrintWidget::getShowSelectItemText()
|
|||||||
|
|
||||||
// 对于文本item,将它的文本显示到编辑框
|
// 对于文本item,将它的文本显示到编辑框
|
||||||
if(lastSelectedTxtItem->sourceType() == SourceType::TEXT) {
|
if(lastSelectedTxtItem->sourceType() == SourceType::TEXT) {
|
||||||
|
ui.m_LineEdit->setEnabled(true);
|
||||||
m_LineEdit->setText(lastSelectedTxtItem->source().toString());
|
m_LineEdit->setText(lastSelectedTxtItem->source().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -512,9 +346,11 @@ void TestPrintWidget::getShowSelectItemText()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 锁住信号再设置,避免设置后触发 cbResolution 的信号
|
||||||
auto b = ui.cbResolution->blockSignals(true);
|
auto b = ui.cbResolution->blockSignals(true);
|
||||||
ui.cbResolution->setCurrentIndex(fontNameToIndex[currItemFontFamily]);
|
ui.cbResolution->setCurrentIndex(fontNameToIndex[currItemFontFamily]);
|
||||||
ui.cbResolution->blockSignals(b);
|
ui.cbResolution->blockSignals(b);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -717,14 +553,6 @@ void TestPrintWidget::onFileOpen(QString filePath,bool insertFlag){
|
|||||||
//qDebug()<<"textedit txt mode onFileOpen" << sysPara->sysFile;
|
//qDebug()<<"textedit txt mode onFileOpen" << sysPara->sysFile;
|
||||||
snprintf(sysPara->para.lastOpenedFileName,sizeof(sysPara->para.lastOpenedFileName),"%s",filePath.toLatin1().constData());
|
snprintf(sysPara->para.lastOpenedFileName,sizeof(sysPara->para.lastOpenedFileName),"%s",filePath.toLatin1().constData());
|
||||||
}
|
}
|
||||||
|
|
||||||
// emit fileNameChanged(QFileInfo(xmlfileName).fileName());
|
|
||||||
// ui->saveButton->setEnabled(false);
|
|
||||||
QList<QGraphicsItem *> items = pPicScene->items();
|
|
||||||
foreach (QGraphicsItem *item, items) {
|
|
||||||
PicTextItem *picText = qgraphicsitem_cast<PicTextItem*>(item);
|
|
||||||
onSceneAccepted(picText);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -914,54 +742,10 @@ void TestPrintWidget::parseVbfile(QXmlStreamReader &reader) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestPrintWidget::onSceneAccepted(PicTextItem *pTextItem){
|
|
||||||
//dialogLineSpace->getValue(&sysPara->para.textEditLineSpace,&sysPara->para.textEditCharSpace);
|
|
||||||
for(QTextBlock textBlock = pTextItem->document()->begin();textBlock != pTextItem->document()->end(); textBlock = textBlock.next()){
|
|
||||||
// textBlock.setVisible(false);
|
|
||||||
QTextBlockFormat textBlockFormat = textBlock.blockFormat();
|
|
||||||
textBlockFormat.setAlignment(Qt::AlignTop);
|
|
||||||
textBlockFormat.setTopMargin(-1);
|
|
||||||
//textBlockFormat.setLineHeight(sysPara->para.fontPixelSize + sysPara->para.textEditLineSpace, QTextBlockFormat::FixedHeight);
|
|
||||||
//textBlockFormat.setLineHeight(0, QTextBlockFormat::LineDistanceHeight);
|
|
||||||
textBlockFormat.setBottomMargin(sysPara->para.textEditLineSpace-1);
|
|
||||||
//textBlockFormat.setBottomMargin(-1);
|
|
||||||
QTextCursor textCursor = pTextItem->textCursor();
|
|
||||||
textCursor.setPosition(textBlock.position());
|
|
||||||
textCursor.setBlockFormat(textBlockFormat);
|
|
||||||
pTextItem->setTextCursor(textCursor);
|
|
||||||
}
|
|
||||||
|
|
||||||
// QTextCharFormat fmt;
|
|
||||||
// //fmt.setFontWordSpacing(sysPara->para.textEditCharSpace);
|
|
||||||
// fmt.setFontLetterSpacing(sysPara->para.textEditCharSpace); qDebug() << sysPara->para.textEditCharSpace;
|
|
||||||
// mergeFormatOnWordOrSelection(fmt);
|
|
||||||
// pTextItem->setLetterSpace(sysPara->para.textEditCharSpace);
|
|
||||||
sysPara->saveParaToFile();
|
|
||||||
}
|
|
||||||
|
|
||||||
void TestPrintWidget::initSelecteCodeDlg()
|
|
||||||
{
|
|
||||||
m_SelectCodeDlg = new SelectCodeDlg(this);
|
|
||||||
connect(m_SelectCodeDlg, &SelectCodeDlg::sig_cancelEdit, this, [=]() {
|
|
||||||
m_SelectCodeDlg->close();
|
|
||||||
} );
|
|
||||||
|
|
||||||
connect(m_SelectCodeDlg, &SelectCodeDlg::sig_editBarCode, this, [=]() {
|
|
||||||
m_SelectCodeDlg->close();
|
|
||||||
emit sendButtonClickedSignal(201);
|
|
||||||
} );
|
|
||||||
|
|
||||||
connect(m_SelectCodeDlg, &SelectCodeDlg::sig_editQRCode, this, [=]() {
|
|
||||||
m_SelectCodeDlg->close();
|
|
||||||
emit sendButtonClickedSignal(202);
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
|
|
||||||
void TestPrintWidget::addCodeItem(QString str)
|
void TestPrintWidget::addCodeItem(QString str)
|
||||||
{
|
{
|
||||||
addItemFlag = false;
|
addItemFlag = false;
|
||||||
m_LineEdit->setEnabled(true);
|
m_LineEdit->setEnabled(true);
|
||||||
m_TextEdit->clear();
|
|
||||||
m_LineEdit->setText("");
|
m_LineEdit->setText("");
|
||||||
pPicScene->clearSelection();
|
pPicScene->clearSelection();
|
||||||
codeItem_Operation = new PicCodeItem(0, 0, SourceType::CODE);
|
codeItem_Operation = new PicCodeItem(0, 0, SourceType::CODE);
|
||||||
@@ -1163,22 +947,7 @@ void TestPrintWidget::on_delButton_pressed()
|
|||||||
foreach (QGraphicsItem *item, pPicScene->selectedItems()) {
|
foreach (QGraphicsItem *item, pPicScene->selectedItems()) {
|
||||||
pPicScene->removeItem(item);
|
pPicScene->removeItem(item);
|
||||||
delete item;
|
delete item;
|
||||||
// ui->saveButton->setEnabled(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(varReplaceItemMap.size()>0){
|
|
||||||
QMap<int, ItemReplaceInfo> newMap;
|
|
||||||
for (auto it = varReplaceItemMap.begin(); it != varReplaceItemMap.end(); ++it) {
|
|
||||||
int oldKey = it.key();
|
|
||||||
if (oldKey == index) {
|
|
||||||
continue; // 跳过删除项
|
|
||||||
}
|
|
||||||
int newKey = (oldKey > index) ? oldKey - 1 : oldKey;
|
|
||||||
newMap.insert(newKey, it.value());
|
|
||||||
}
|
|
||||||
varReplaceItemMap = newMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TestPrintWidget::eventFilter(QObject *watched, QEvent *event) {
|
bool TestPrintWidget::eventFilter(QObject *watched, QEvent *event) {
|
||||||
@@ -1246,9 +1015,6 @@ void TestPrintWidget::onBtnItemConfigClicked()
|
|||||||
// 如果是日期类型,则唤醒DateVarSet
|
// 如果是日期类型,则唤醒DateVarSet
|
||||||
if(item->data(0).toString() == "datetime") {
|
if(item->data(0).toString() == "datetime") {
|
||||||
// @see TestPrintWidget::addDateItem
|
// @see TestPrintWidget::addDateItem
|
||||||
vartypeR = 0x00;
|
|
||||||
replaceValueMap.clear();
|
|
||||||
m_TextEdit->clear();
|
|
||||||
emit sendButtonClickedSignal(16);
|
emit sendButtonClickedSignal(16);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1290,8 +1056,9 @@ void TestPrintWidget::onBtnItemConfigClicked()
|
|||||||
|
|
||||||
void TestPrintWidget::onItemEditorAccepted()
|
void TestPrintWidget::onItemEditorAccepted()
|
||||||
{
|
{
|
||||||
if(itemEditor->currentItem()->source() == SourceType::UNKNOWN)
|
if(itemEditor->currentItem()->source() == SourceType::UNKNOWN) {
|
||||||
onEditItemCounterDone();
|
// Nothing....
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
PicTextItem* textItem = itemEditor->currentItem();
|
PicTextItem* textItem = itemEditor->currentItem();
|
||||||
textItem->applyModify();
|
textItem->applyModify();
|
||||||
@@ -1310,7 +1077,9 @@ void TestPrintWidget::on_newfileButton_pressed(){
|
|||||||
pPicScene->clear();
|
pPicScene->clear();
|
||||||
pViewer->viewport()->update();
|
pViewer->viewport()->update();
|
||||||
xmlfileName = "";
|
xmlfileName = "";
|
||||||
QFile file(xmlfileName);
|
|
||||||
|
// TODO:: 新建文件的入口
|
||||||
|
|
||||||
sendButtonClickedSignal(21); //新建文件完成
|
sendButtonClickedSignal(21); //新建文件完成
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1347,27 +1116,6 @@ void TestPrintWidget::slt_BarCodeItemDone()
|
|||||||
item->setSelected(true);
|
item->setSelected(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestPrintWidget::slt_QRCodeItemDone(QString str)
|
|
||||||
{
|
|
||||||
if (editCodeFlag) {
|
|
||||||
on_delButton_pressed();
|
|
||||||
editCodeFlag = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
addCodeItem(str);
|
|
||||||
m_TextEdit->clear();
|
|
||||||
|
|
||||||
int index = checkSelectScene();
|
|
||||||
if (index == -1) return;
|
|
||||||
|
|
||||||
QString html = m_TextEdit->toHtml();
|
|
||||||
foreach (QGraphicsItem *item, pPicScene->selectedItems())
|
|
||||||
{
|
|
||||||
PicCodeItem *pItem = (PicCodeItem *)item;
|
|
||||||
pItem->setHtml(html);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
QGraphicsItem* findClosestItemToViewCenter(QGraphicsView* view)
|
QGraphicsItem* findClosestItemToViewCenter(QGraphicsView* view)
|
||||||
{
|
{
|
||||||
if (!view || !view->scene())
|
if (!view || !view->scene())
|
||||||
@@ -1506,29 +1254,6 @@ void TestPrintWidget::on_cbResolution_currentIndexChanged(int index)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestPrintWidget::setFontNameIndex(float fontsize)
|
|
||||||
{
|
|
||||||
int currIndex=0;
|
|
||||||
|
|
||||||
if(fontsize <=5 ){ //5dot -- 3.75pt
|
|
||||||
currIndex = 0;
|
|
||||||
}else if(fontsize<=7){ //7dot -- 5.25pt
|
|
||||||
currIndex = 1;
|
|
||||||
}else if(fontsize<=9){ //9dot -- 6.75
|
|
||||||
currIndex = 2;
|
|
||||||
}else if(fontsize<=12){ //12dot -- 9pt
|
|
||||||
currIndex = 3;
|
|
||||||
}else if(fontsize<=16){ //16dot -- 12pt
|
|
||||||
currIndex = 4;
|
|
||||||
}else if(fontsize<=24){ //24dot -- 18pt
|
|
||||||
currIndex = 5;
|
|
||||||
}else if(fontsize<=32){ //32dot -- 24pt
|
|
||||||
currIndex = 6;
|
|
||||||
}
|
|
||||||
if(currIndex<ui.cbResolution->count())
|
|
||||||
ui.cbResolution->setCurrentIndex(currIndex);
|
|
||||||
}
|
|
||||||
|
|
||||||
void TestPrintWidget::addDateTimeItem(const DateItemModel &model, const TextItemModel& textModel)
|
void TestPrintWidget::addDateTimeItem(const DateItemModel &model, const TextItemModel& textModel)
|
||||||
{
|
{
|
||||||
// 如果当前选中了一个日期时间item,则直接设置模型
|
// 如果当前选中了一个日期时间item,则直接设置模型
|
||||||
@@ -1634,6 +1359,11 @@ void TestPrintWidget::addCounterItem(CounterViewModel vm, QSharedPointer<QFont>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString TestPrintWidget::currentFile()
|
||||||
|
{
|
||||||
|
return xmlfileName;
|
||||||
|
}
|
||||||
|
|
||||||
void TestPrintWidget::showBarcodeEditor(bool restoreViewModel)
|
void TestPrintWidget::showBarcodeEditor(bool restoreViewModel)
|
||||||
{
|
{
|
||||||
#if defined(ARCH_AARCH64)
|
#if defined(ARCH_AARCH64)
|
||||||
|
|||||||
+3
-15
@@ -12,7 +12,6 @@
|
|||||||
// 包含UI自动生成的头文件
|
// 包含UI自动生成的头文件
|
||||||
#include "ui_TestPrintWidget.h"
|
#include "ui_TestPrintWidget.h"
|
||||||
|
|
||||||
#include "DialogFontSize.h"
|
|
||||||
#include "scene/picscene.h"
|
#include "scene/picscene.h"
|
||||||
|
|
||||||
#include "ImageLoader.h"
|
#include "ImageLoader.h"
|
||||||
@@ -54,7 +53,6 @@ public:
|
|||||||
QTextEdit* getQTextEdit();
|
QTextEdit* getQTextEdit();
|
||||||
PicScene* getPicScene();
|
PicScene* getPicScene();
|
||||||
|
|
||||||
void createItemImage();
|
|
||||||
void getShowSelectItemText();
|
void getShowSelectItemText();
|
||||||
void bindSysPara(SysPara *sysPara);
|
void bindSysPara(SysPara *sysPara);
|
||||||
|
|
||||||
@@ -69,14 +67,14 @@ public:
|
|||||||
|
|
||||||
void on_delButton_pressed();
|
void on_delButton_pressed();
|
||||||
|
|
||||||
void setFontNameIndex(float);
|
|
||||||
|
|
||||||
void addDateTimeItem(const DateItemModel& model, const TextItemModel& textModel);
|
void addDateTimeItem(const DateItemModel& model, const TextItemModel& textModel);
|
||||||
|
|
||||||
void addScheduleShiftsItem(QVector<ScheduleModel> schedules, TextItemModel txtModel);
|
void addScheduleShiftsItem(QVector<ScheduleModel> schedules, TextItemModel txtModel);
|
||||||
|
|
||||||
void addCounterItem(CounterViewModel vm, QSharedPointer<QFont> font = nullptr);
|
void addCounterItem(CounterViewModel vm, QSharedPointer<QFont> font = nullptr);
|
||||||
|
|
||||||
|
QString currentFile();
|
||||||
|
|
||||||
bool addItemFlag;
|
bool addItemFlag;
|
||||||
// QString getReplateAfterStr(QString);
|
// QString getReplateAfterStr(QString);
|
||||||
// QMap<int,QString> varReplaceItemMap;
|
// QMap<int,QString> varReplaceItemMap;
|
||||||
@@ -86,9 +84,6 @@ public slots:
|
|||||||
void on_enlargeButton_pressed();
|
void on_enlargeButton_pressed();
|
||||||
void on_addButton_pressed(const SourceType type = SourceType::UNKNOWN);
|
void on_addButton_pressed(const SourceType type = SourceType::UNKNOWN);
|
||||||
void onEditItemDone();
|
void onEditItemDone();
|
||||||
void onEditItemCounterDone();
|
|
||||||
|
|
||||||
void onReplaceVarEditDone();
|
|
||||||
|
|
||||||
void on_saveButton_pressed();
|
void on_saveButton_pressed();
|
||||||
void onSaveASFile(QString filename,bool Flag);
|
void onSaveASFile(QString filename,bool Flag);
|
||||||
@@ -100,8 +95,6 @@ public slots:
|
|||||||
|
|
||||||
void slt_BarCodeItemDone();
|
void slt_BarCodeItemDone();
|
||||||
|
|
||||||
void slt_QRCodeItemDone(QString str);
|
|
||||||
|
|
||||||
void selectNextItem();
|
void selectNextItem();
|
||||||
|
|
||||||
void selectPreviousItem();
|
void selectPreviousItem();
|
||||||
@@ -140,7 +133,7 @@ private:
|
|||||||
|
|
||||||
// 控件成员变量(关联UI控件)
|
// 控件成员变量(关联UI控件)
|
||||||
QButtonGroup* m_ButtonGroup;
|
QButtonGroup* m_ButtonGroup;
|
||||||
QTextEdit* m_TextEdit;
|
QTextEdit* m_TextEdit = nullptr;
|
||||||
QLineEdit* m_LineEdit;
|
QLineEdit* m_LineEdit;
|
||||||
|
|
||||||
void parseVbfile(QXmlStreamReader &reader);
|
void parseVbfile(QXmlStreamReader &reader);
|
||||||
@@ -155,8 +148,6 @@ private:
|
|||||||
// 加载图标(保留原功能)
|
// 加载图标(保留原功能)
|
||||||
QPixmap loadIcon(const QString& iconName, const QSize& size = QSize(40, 40));
|
QPixmap loadIcon(const QString& iconName, const QSize& size = QSize(40, 40));
|
||||||
|
|
||||||
DialogFontSize *dialogFontSize;
|
|
||||||
|
|
||||||
PicScene *pPicScene; //保存Item的Html
|
PicScene *pPicScene; //保存Item的Html
|
||||||
// PicScene *pPicScene2; // 保存Item的Html对应的图片 解决场景模式文本无法放大的问题
|
// PicScene *pPicScene2; // 保存Item的Html对应的图片 解决场景模式文本无法放大的问题
|
||||||
QGraphicsView *view;
|
QGraphicsView *view;
|
||||||
@@ -181,9 +172,6 @@ private:
|
|||||||
bool m_CreateImageFlag;
|
bool m_CreateImageFlag;
|
||||||
QGraphicsScene *m_pSavePicScene;
|
QGraphicsScene *m_pSavePicScene;
|
||||||
|
|
||||||
SelectCodeDlg* m_SelectCodeDlg = nullptr;
|
|
||||||
|
|
||||||
void onSceneAccepted(PicTextItem *pTextItem);
|
|
||||||
// 条形码和二维码的选择界面
|
// 条形码和二维码的选择界面
|
||||||
void initSelecteCodeDlg();
|
void initSelecteCodeDlg();
|
||||||
// 在界面添加显示条形码和二维码的场景
|
// 在界面添加显示条形码和二维码的场景
|
||||||
|
|||||||
Reference in New Issue
Block a user