抽离场景打开逻辑、添加编辑界面的左右拖动功能

This commit is contained in:
2026-07-16 11:04:12 +08:00
parent 570f359339
commit 808a38628e
10 changed files with 330 additions and 27 deletions
+10 -10
View File
@@ -1008,8 +1008,15 @@ void InkJetPrinter::timerHandler(void){
}
// byons: 时间类型图元更新 @2026年4月11日
auto updateArea = m_MainWidget->variableItemsUpdate();
if (!updateArea.isNull()) {
// byons: 变量类图元现在优化为局部更新,避免每次都要把整个打印内容发送给FPGA,现在只发送被更新的列区间 2026年7月16日
auto updateAreas = m_MainWidget->variableItemsUpdate();
if(sysPara->status.isPrinting && !updateAreas.isEmpty()){
for(const auto& area : updateAreas) {
m_MainWidget->SendPrintDataToFpga(0, area.left(), area.width());
}
}
if (!updateAreas.isEmpty() && m_StackedWidget->currentWidget() == m_MainWidget) {
// // 统计追踪更新频率
// static QElapsedTimer bnsTimer;
// static int toogleCount = 0;
@@ -1019,14 +1026,7 @@ void InkJetPrinter::timerHandler(void){
// qDebug() << (QString("timeHandler avg elapsed: %1 s").arg(elapsed / qreal(toogleCount) / 1000.0));
// toogleCount = 0;
// }
if(sysPara->status.isPrinting) {
m_MainWidget->SendPrintDataToFpga(0, updateArea.left(), updateArea.width());
}
if(m_StackedWidget->currentWidget() == m_MainWidget) {
m_MainWidget->updatePrintDisplayLabel();
}
m_MainWidget->updatePrintDisplayLabel();
}
// if (modbus->getModbusStatus() == 1) {