hlp:桂林国际齿轮泵代码

This commit is contained in:
kite_lucs
2026-10-09 10:25:24 +08:00
commit fd606b3c81
2447 changed files with 999531 additions and 0 deletions
@@ -0,0 +1,290 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>DlgInputAddr</class>
<widget class="QDialog" name="DlgInputAddr">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>319</width>
<height>297</height>
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<layout class="QGridLayout" name="gridLayout">
<item row="12" column="0">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLineEdit" name="lineEdit">
<property name="inputMethodHints">
<set>Qt::ImhNone</set>
</property>
<property name="maxLength">
<number>6</number>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>请输入6位机编号(前3位为经销商编号)</string>
</property>
</widget>
</item>
<item row="3" column="0">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="labPowerMinuteCnt">
<property name="text">
<string>PowerOnCnt</string>
</property>
</widget>
</item>
<item>
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="labPrintDotCnt">
<property name="text">
<string>PrintDotCnt</string>
</property>
</widget>
</item>
<item>
<widget class="Line" name="line_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="labPowerMax">
<property name="text">
<string>PowerMax</string>
</property>
</widget>
</item>
<item>
<widget class="Line" name="line_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="labPrintMax">
<property name="text">
<string>PrintMax</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="2" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="label_3">
<property name="text">
<string>开始时间</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="EditStartTime">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>结束时间</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="EditEndTime">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item row="4" column="0">
<widget class="QLabel" name="superNodeIP">
<property name="text">
<string>SuperNodeIP:</string>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="edgeIP">
<property name="text">
<string>edgeIP:</string>
</property>
</widget>
</item>
<item row="6" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QLineEdit" name="superNodeIp3">
<property name="maxLength">
<number>3</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_4">
<property name="text">
<string>.</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="superNodeIp2">
<property name="maxLength">
<number>3</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_5">
<property name="text">
<string>.</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="superNodeIp1">
<property name="maxLength">
<number>3</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_6">
<property name="text">
<string>.</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="superNodeIp0">
<property name="maxLength">
<number>3</number>
</property>
</widget>
</item>
</layout>
</item>
<item row="8" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QLineEdit" name="edgeIp3">
<property name="maxLength">
<number>3</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_7">
<property name="text">
<string>.</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="edgeIp2">
<property name="maxLength">
<number>3</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_8">
<property name="text">
<string>.</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="edgeIp1">
<property name="maxLength">
<number>3</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_9">
<property name="text">
<string>.</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="edgeIp0">
<property name="maxLength">
<number>3</number>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>DlgInputAddr</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>DlgInputAddr</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 918 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

@@ -0,0 +1,107 @@
#include <QDebug>
#include <QMessageBox>
#include "SecondThread.h"
#include "VerBVersion.h"
SecondThread::SecondThread(QObject* par) : QThread(par)
,m_runCount(20)
{
pDdlgShowMsg = new DlgShowMsg;
pDdlgShowMsg->hide();
pTimer10s = new QTimer();
pTimer10s->setInterval(10000);
//connect(pTimer10s, SIGNAL(timeout()), this, &SecondThread::timeoutSlot);
connect(pTimer10s, SIGNAL(timeout()), this, SLOT(timeoutSlot()),Qt::QueuedConnection);
pUpLicManager = new LicenseManger();
licState = pUpLicManager->getLicState();
if(licState)
{
//pDdlgShowMsg->showMsg(tr("license file was invalid,error code:%1").arg(licState));
emit printerLicErr(licState);
qDebug()<<"asdfsdf";
}
bLicFileUpdating = false;
}
SecondThread::~SecondThread()
{
qDebug() << "SecondThread::~SecondThread()";
}
void SecondThread::setSomething()
{
msleep(500);
QString str = QString("%1->%2,thread id:%3").arg(__FUNCTION__).arg(__FILE__).arg((int)QThread::currentThreadId());
emit message(str);
}
void SecondThread::getSomething()
{
msleep(500);
emit message(QString("%1->%2,thread id:%3").arg(__FUNCTION__).arg(__FILE__).arg((int)QThread::currentThreadId()));
}
void SecondThread::setRunCount(int count)
{
m_runCount = count;
emit message(QString("%1->%2,thread id:%3").arg(__FUNCTION__).arg(__FILE__).arg((int)QThread::currentThreadId()));
}
void SecondThread::timeoutSlot()
{
QTime curTime=QTime::currentTime();
qDebug()<<curTime.toString()<<"second thread";
qint32 remaining_time;
if(!bLicFileUpdating)
{
if(licState == LICENSE_STATE_OK)
{
remaining_time = pUpLicManager->CheckRemainingTime();
if(remaining_time <= 3)
{
licState = -LICENSE_STATE_REMAIN_TIME_REARCH;
emit printerLicErr(licState);
}
}
emit printerLicErr(licState);
}
}
void SecondThread::update_license_file()
{
pUpLicManager->UpdateLicenseFileData();
licState = pUpLicManager->getLicState();
}
void SecondThread::update_license_process()
{
qint8 updateFileState = pUpLicManager->CheckUpdateFileState();
if(updateFileState != UPDATE_LICENSE_FILE_OK)
{
//QMessageBox::critical(this,tr("错误"),tr("升级软件错误,错误码:%1").arg(updateState));
emit update_license_complete(updateFileState);
}
else
{
bLicFileUpdating = true;
update_license_file();
emit update_license_complete(UPDATE_LICENSE_FILE_OK);
bLicFileUpdating = false;
}
}
void SecondThread::set_serial_number_process(quint32 serial_number)
{
qDebug()<<"set_serial_number_process"<<serial_number;
pUpLicManager->setMachineInfo(serial_number);
}
void SecondThread::run()
{
qDebug()<<"second thread run";
pTimer10s->start();
this->exec();
}
void SecondThread::doSomething()
{
msleep(500);
emit message(QString("%1->%2,thread id:%3").arg(__FUNCTION__).arg(__FILE__).arg((int)QThread::currentThreadId()));
}