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,173 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>565</width>
<height>435</height>
</rect>
</property>
<property name="windowTitle">
<string>MainWindow</string>
</property>
<widget class="QWidget" name="centralwidget">
<widget class="QPushButton" name="pushButton">
<property name="geometry">
<rect>
<x>330</x>
<y>350</y>
<width>99</width>
<height>27</height>
</rect>
</property>
<property name="text">
<string>encode</string>
</property>
</widget>
<widget class="QTextEdit" name="textEdit">
<property name="geometry">
<rect>
<x>10</x>
<y>290</y>
<width>541</width>
<height>51</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>20</x>
<y>270</y>
<width>67</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>Message</string>
</property>
</widget>
<widget class="QComboBox" name="comboBox_size">
<property name="geometry">
<rect>
<x>450</x>
<y>240</y>
<width>85</width>
<height>27</height>
</rect>
</property>
<item>
<property name="text">
<string>3</string>
</property>
</item>
<item>
<property name="text">
<string>4</string>
</property>
</item>
<item>
<property name="text">
<string>5</string>
</property>
</item>
<item>
<property name="text">
<string>6</string>
</property>
</item>
</widget>
<widget class="QComboBox" name="comboBox_level">
<property name="geometry">
<rect>
<x>310</x>
<y>240</y>
<width>85</width>
<height>27</height>
</rect>
</property>
<item>
<property name="text">
<string>L</string>
</property>
</item>
<item>
<property name="text">
<string>M</string>
</property>
</item>
<item>
<property name="text">
<string>H</string>
</property>
</item>
<item>
<property name="text">
<string>Q</string>
</property>
</item>
</widget>
<widget class="QLabel" name="label_2">
<property name="geometry">
<rect>
<x>370</x>
<y>240</y>
<width>67</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>size:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
<widget class="QLabel" name="label_3">
<property name="geometry">
<rect>
<x>230</x>
<y>250</y>
<width>67</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>level:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
<widget class="QLabel" name="labQRImage">
<property name="geometry">
<rect>
<x>40</x>
<y>10</y>
<width>431</width>
<height>211</height>
</rect>
</property>
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</widget>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>565</width>
<height>23</height>
</rect>
</property>
</widget>
<widget class="QStatusBar" name="statusbar"/>
</widget>
<resources/>
<connections/>
</ui>
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,68 @@
#include <stdio.h>
#include <string.h>
//
// U08 *OutBuff, U16 cRows, U16 cColumns, U08 MSize
#include "dm200.h"
#include "QImage"
#include "QDebug"
#define MAX_WIDTH_BYTE 48 // 384/8
char DataMatrixdDraw(U08 *OutBuff, U16 cRows, U16 cColumns, U08 MSize);
//char DataMatrixdDrawImg(U08 *OutBuff, U16 cRows, U16 cColumns, U08 MSize,QImage *pImg);
void Draw_Matrix(unsigned char *buffer)
{
U16 sColumns, sRows;
U08 *Grid;
sColumns = sRows = 0;
Grid = 0;
sColumns = sRows = 0;
short sizeType = 0;
Grid = iec16022ecc200((short*)&sRows, (short*)&sColumns, buffer, &sizeType);
DataMatrixdDraw(Grid,sRows,sColumns,2);
}
char DataMatrixdDraw(U08 *OutBuff, U16 cRows, U16 cColumns, U08 MSize)
{
int Size=MSize;
int w = cColumns*Size;
int h = cRows*Size;
//qDebug()<<w<<h<<Size;
QImage QRImage(w,h,QImage::Format_ARGB32 );
QImage *img;
img = &QRImage;
img->fill(0x00ffffff);
/* data */
int margin=0;
U08 *p = OutBuff;
int ypos=0;//margin * Size;
int xpos=0;
int x,y,xx,yy,bit;
for(y=0; y<cRows; y++) {
bit = 7;
bit = 7 - (margin * Size % 8);
xpos=margin * Size;
for(x=0; x<cColumns; x++) {
for(xx=0; xx<Size; xx++) {
if((*p & 1) << bit){
for(yy=0; yy<Size; yy++) {
img->setPixel(xpos,h-1-(ypos+yy),0xff000000);
}
}
xpos++;
}
p++;
bit--;
if(bit < 0) {
//q++;
bit = 7;
}
}
ypos+=Size;
}
img->save("Myqr.bmp");
return 0;
}
@@ -0,0 +1,80 @@
/****************************************************************************
** Meta object code from reading C++ file 'DialogInputTxt.h'
**
** Created by: The Qt Meta Object Compiler version 63 (Qt 4.8.5)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include "../DialogInputTxt.h"
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'DialogInputTxt.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 63
#error "This file was generated using the moc from 4.8.5. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
static const uint qt_meta_data_DialogInputTxt[] = {
// content:
6, // revision
0, // classname
0, 0, // classinfo
0, 0, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
0, // signalCount
0 // eod
};
static const char qt_meta_stringdata_DialogInputTxt[] = {
"DialogInputTxt\0"
};
void DialogInputTxt::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
Q_UNUSED(_o);
Q_UNUSED(_id);
Q_UNUSED(_c);
Q_UNUSED(_a);
}
const QMetaObjectExtraData DialogInputTxt::staticMetaObjectExtraData = {
0, qt_static_metacall
};
const QMetaObject DialogInputTxt::staticMetaObject = {
{ &QDialog::staticMetaObject, qt_meta_stringdata_DialogInputTxt,
qt_meta_data_DialogInputTxt, &staticMetaObjectExtraData }
};
#ifdef Q_NO_DATA_RELOCATION
const QMetaObject &DialogInputTxt::getStaticMetaObject() { return staticMetaObject; }
#endif //Q_NO_DATA_RELOCATION
const QMetaObject *DialogInputTxt::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
}
void *DialogInputTxt::qt_metacast(const char *_clname)
{
if (!_clname) return 0;
if (!strcmp(_clname, qt_meta_stringdata_DialogInputTxt))
return static_cast<void*>(const_cast< DialogInputTxt*>(this));
return QDialog::qt_metacast(_clname);
}
int DialogInputTxt::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QDialog::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
return _id;
}
QT_END_MOC_NAMESPACE