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,212 @@
/********************************************************************************
** Form generated from reading UI file 'dialogsavefile.ui'
**
** Created by: Qt User Interface Compiler version 4.8.5
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_DIALOGSAVEFILE_H
#define UI_DIALOGSAVEFILE_H
#include <QtCore/QVariant>
#include <QtGui/QAction>
#include <QtGui/QApplication>
#include <QtGui/QButtonGroup>
#include <QtGui/QDialog>
#include <QtGui/QGridLayout>
#include <QtGui/QHeaderView>
#include <QtGui/QLabel>
#include <QtGui/QLineEdit>
#include <QtGui/QListView>
#include <QtGui/QPushButton>
#include <QtGui/QRadioButton>
#include <QtGui/QSpacerItem>
#include <QtGui/QTextEdit>
#include <QtGui/QVBoxLayout>
QT_BEGIN_NAMESPACE
class Ui_DialogSaveFile
{
public:
QGridLayout *gridLayout_4;
QVBoxLayout *verticalLayout;
QGridLayout *gridLayout_3;
QRadioButton *radioButtonLocal;
QRadioButton *radioButtonUdisk;
QSpacerItem *horizontalSpacer_2;
QListView *listViewFile;
QGridLayout *gridLayout;
QLabel *label;
QPushButton *pushButtonLast;
QPushButton *pushButtonNext;
QSpacerItem *horizontalSpacer;
QTextEdit *textEditView;
QGridLayout *gridLayout_2;
QLabel *labelName;
QLineEdit *lineEdit;
QPushButton *pushButtonExit;
QPushButton *pushButtonSave;
void setupUi(QDialog *DialogSaveFile)
{
if (DialogSaveFile->objectName().isEmpty())
DialogSaveFile->setObjectName(QString::fromUtf8("DialogSaveFile"));
DialogSaveFile->setWindowModality(Qt::WindowModal);
DialogSaveFile->resize(640, 460);
DialogSaveFile->setFocusPolicy(Qt::NoFocus);
DialogSaveFile->setInputMethodHints(Qt::ImhHiddenText|Qt::ImhNoAutoUppercase|Qt::ImhPreferNumbers);
gridLayout_4 = new QGridLayout(DialogSaveFile);
gridLayout_4->setObjectName(QString::fromUtf8("gridLayout_4"));
verticalLayout = new QVBoxLayout();
verticalLayout->setSpacing(0);
verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
gridLayout_3 = new QGridLayout();
gridLayout_3->setObjectName(QString::fromUtf8("gridLayout_3"));
gridLayout_3->setVerticalSpacing(0);
radioButtonLocal = new QRadioButton(DialogSaveFile);
radioButtonLocal->setObjectName(QString::fromUtf8("radioButtonLocal"));
radioButtonLocal->setMaximumSize(QSize(100, 16777215));
radioButtonLocal->setLayoutDirection(Qt::LeftToRight);
QIcon icon;
icon.addFile(QString::fromUtf8(":/icon/localdisk.png"), QSize(), QIcon::Normal, QIcon::Off);
radioButtonLocal->setIcon(icon);
radioButtonLocal->setChecked(true);
gridLayout_3->addWidget(radioButtonLocal, 0, 0, 1, 1);
radioButtonUdisk = new QRadioButton(DialogSaveFile);
radioButtonUdisk->setObjectName(QString::fromUtf8("radioButtonUdisk"));
radioButtonUdisk->setMaximumSize(QSize(120, 16777215));
radioButtonUdisk->setLayoutDirection(Qt::LeftToRight);
QIcon icon1;
icon1.addFile(QString::fromUtf8(":/icon/udisk.png"), QSize(), QIcon::Normal, QIcon::Off);
radioButtonUdisk->setIcon(icon1);
gridLayout_3->addWidget(radioButtonUdisk, 0, 1, 1, 1);
horizontalSpacer_2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
gridLayout_3->addItem(horizontalSpacer_2, 0, 2, 1, 1);
verticalLayout->addLayout(gridLayout_3);
listViewFile = new QListView(DialogSaveFile);
listViewFile->setObjectName(QString::fromUtf8("listViewFile"));
QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(listViewFile->sizePolicy().hasHeightForWidth());
listViewFile->setSizePolicy(sizePolicy);
verticalLayout->addWidget(listViewFile);
gridLayout = new QGridLayout();
gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
gridLayout->setHorizontalSpacing(6);
gridLayout->setVerticalSpacing(0);
label = new QLabel(DialogSaveFile);
label->setObjectName(QString::fromUtf8("label"));
gridLayout->addWidget(label, 0, 0, 1, 1);
pushButtonLast = new QPushButton(DialogSaveFile);
pushButtonLast->setObjectName(QString::fromUtf8("pushButtonLast"));
pushButtonLast->setMaximumSize(QSize(90, 16777215));
QIcon icon2;
icon2.addFile(QString::fromUtf8(":/icon/lastpage.png"), QSize(), QIcon::Normal, QIcon::Off);
pushButtonLast->setIcon(icon2);
gridLayout->addWidget(pushButtonLast, 0, 2, 1, 1);
pushButtonNext = new QPushButton(DialogSaveFile);
pushButtonNext->setObjectName(QString::fromUtf8("pushButtonNext"));
pushButtonNext->setMaximumSize(QSize(90, 16777215));
QIcon icon3;
icon3.addFile(QString::fromUtf8(":/icon/nextpage.png"), QSize(), QIcon::Normal, QIcon::Off);
pushButtonNext->setIcon(icon3);
gridLayout->addWidget(pushButtonNext, 0, 3, 1, 1);
horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
gridLayout->addItem(horizontalSpacer, 0, 1, 1, 1);
verticalLayout->addLayout(gridLayout);
textEditView = new QTextEdit(DialogSaveFile);
textEditView->setObjectName(QString::fromUtf8("textEditView"));
textEditView->setEnabled(true);
textEditView->setMaximumSize(QSize(16777215, 60));
textEditView->setAutoFillBackground(false);
verticalLayout->addWidget(textEditView);
gridLayout_2 = new QGridLayout();
gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2"));
labelName = new QLabel(DialogSaveFile);
labelName->setObjectName(QString::fromUtf8("labelName"));
gridLayout_2->addWidget(labelName, 0, 0, 1, 1);
lineEdit = new QLineEdit(DialogSaveFile);
lineEdit->setObjectName(QString::fromUtf8("lineEdit"));
lineEdit->setMinimumSize(QSize(0, 30));
gridLayout_2->addWidget(lineEdit, 0, 1, 1, 1);
pushButtonExit = new QPushButton(DialogSaveFile);
pushButtonExit->setObjectName(QString::fromUtf8("pushButtonExit"));
pushButtonExit->setMaximumSize(QSize(90, 16777215));
QIcon icon4;
icon4.addFile(QString::fromUtf8(":/icon/exit.png"), QSize(), QIcon::Normal, QIcon::Off);
pushButtonExit->setIcon(icon4);
gridLayout_2->addWidget(pushButtonExit, 0, 3, 1, 1);
pushButtonSave = new QPushButton(DialogSaveFile);
pushButtonSave->setObjectName(QString::fromUtf8("pushButtonSave"));
pushButtonSave->setMaximumSize(QSize(90, 16777215));
QIcon icon5;
icon5.addFile(QString::fromUtf8(":/icon/filesave.png"), QSize(), QIcon::Normal, QIcon::Off);
pushButtonSave->setIcon(icon5);
gridLayout_2->addWidget(pushButtonSave, 0, 2, 1, 1);
verticalLayout->addLayout(gridLayout_2);
gridLayout_4->addLayout(verticalLayout, 0, 0, 1, 1);
retranslateUi(DialogSaveFile);
QMetaObject::connectSlotsByName(DialogSaveFile);
} // setupUi
void retranslateUi(QDialog *DialogSaveFile)
{
DialogSaveFile->setWindowTitle(QApplication::translate("DialogSaveFile", "Dialog", 0, QApplication::UnicodeUTF8));
radioButtonLocal->setText(QApplication::translate("DialogSaveFile", "\346\234\254\345\234\260\346\226\207\344\273\266", 0, QApplication::UnicodeUTF8));
radioButtonUdisk->setText(QApplication::translate("DialogSaveFile", "U\347\233\230\346\226\207\344\273\266", 0, QApplication::UnicodeUTF8));
label->setText(QApplication::translate("DialogSaveFile", "\351\242\204\350\247\210\346\226\207\344\273\266\345\206\205\345\256\271\357\274\232", 0, QApplication::UnicodeUTF8));
pushButtonLast->setText(QApplication::translate("DialogSaveFile", "\344\270\212\344\270\200\344\270\252", 0, QApplication::UnicodeUTF8));
pushButtonNext->setText(QApplication::translate("DialogSaveFile", "\344\270\213\344\270\200\344\270\252", 0, QApplication::UnicodeUTF8));
labelName->setText(QApplication::translate("DialogSaveFile", "\350\257\267\350\276\223\345\205\245\346\226\207\344\273\266\345\220\215\357\274\232", 0, QApplication::UnicodeUTF8));
pushButtonExit->setText(QApplication::translate("DialogSaveFile", "\345\217\226\346\266\210", 0, QApplication::UnicodeUTF8));
pushButtonSave->setText(QApplication::translate("DialogSaveFile", "\344\277\235\345\255\230", 0, QApplication::UnicodeUTF8));
} // retranslateUi
};
namespace Ui {
class DialogSaveFile: public Ui_DialogSaveFile {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_DIALOGSAVEFILE_H
@@ -0,0 +1,280 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qjsonwriter_p.h"
#include "qjson_p.h"
QT_BEGIN_NAMESPACE
using namespace QJsonPrivate;
static void objectContentToJson(const QJsonPrivate::Object *o, QByteArray &json, int indent, bool compact);
static void arrayContentToJson(const QJsonPrivate::Array *a, QByteArray &json, int indent, bool compact);
// some code from qutfcodec.cpp, inlined here for performance reasons
// to allow fast escaping of strings
static inline bool isUnicodeNonCharacter(uint ucs4)
{
// Unicode has a couple of "non-characters" that one can use internally,
// but are not allowed to be used for text interchange.
//
// Those are the last two entries each Unicode Plane (U+FFFE, U+FFFF,
// U+1FFFE, U+1FFFF, etc.) as well as the entries between U+FDD0 and
// U+FDEF (inclusive)
return (ucs4 & 0xfffe) == 0xfffe
|| (ucs4 - 0xfdd0U) < 16;
}
static inline uchar hexdig(uint u)
{
return (u < 0xa ? '0' + u : 'a' + u - 0xa);
}
static QByteArray escapedString(const QString &s)
{
const uchar replacement = '?';
QByteArray ba(s.length(), Qt::Uninitialized);
uchar *cursor = (uchar *)ba.data();
const uchar *ba_end = cursor + ba.length();
const QChar *ch = (const QChar *)s.constData();
const QChar *end = ch + s.length();
int surrogate_high = -1;
while (ch < end) {
if (cursor >= ba_end - 6) {
// ensure we have enough space
int pos = cursor - (const uchar *)ba.constData();
ba.resize(ba.size()*2);
cursor = (uchar *)ba.data() + pos;
ba_end = (const uchar *)ba.constData() + ba.length();
}
uint u = ch->unicode();
if (surrogate_high >= 0) {
if (ch->isLowSurrogate()) {
u = QChar::surrogateToUcs4(surrogate_high, u);
surrogate_high = -1;
} else {
// high surrogate without low
*cursor = replacement;
++ch;
surrogate_high = -1;
continue;
}
} else if (ch->isLowSurrogate()) {
// low surrogate without high
*cursor = replacement;
++ch;
continue;
} else if (ch->isHighSurrogate()) {
surrogate_high = u;
++ch;
continue;
}
if (u < 0x80) {
if (u < 0x20 || u == 0x22 || u == 0x5c) {
*cursor++ = '\\';
switch (u) {
case 0x22:
*cursor++ = '"';
break;
case 0x5c:
*cursor++ = '\\';
break;
case 0x8:
*cursor++ = 'b';
break;
case 0xc:
*cursor++ = 'f';
break;
case 0xa:
*cursor++ = 'n';
break;
case 0xd:
*cursor++ = 'r';
break;
case 0x9:
*cursor++ = 't';
break;
default:
*cursor++ = 'u';
*cursor++ = '0';
*cursor++ = '0';
*cursor++ = hexdig(u>>4);
*cursor++ = hexdig(u & 0xf);
}
} else {
*cursor++ = (uchar)u;
}
} else {
if (u < 0x0800) {
*cursor++ = 0xc0 | ((uchar) (u >> 6));
} else {
// is it one of the Unicode non-characters?
if (isUnicodeNonCharacter(u)) {
*cursor++ = replacement;
++ch;
continue;
}
if (u > 0xffff) {
*cursor++ = 0xf0 | ((uchar) (u >> 18));
*cursor++ = 0x80 | (((uchar) (u >> 12)) & 0x3f);
} else {
*cursor++ = 0xe0 | (((uchar) (u >> 12)) & 0x3f);
}
*cursor++ = 0x80 | (((uchar) (u >> 6)) & 0x3f);
}
*cursor++ = 0x80 | ((uchar) (u&0x3f));
}
++ch;
}
ba.resize(cursor - (const uchar *)ba.constData());
return ba;
}
static void valueToJson(const QJsonPrivate::Base *b, const QJsonPrivate::Value &v, QByteArray &json, int indent, bool compact)
{
QJsonValue::Type type = (QJsonValue::Type)(uint)v.type;
switch (type) {
case QJsonValue::Bool:
json += v.toBoolean() ? "true" : "false";
break;
case QJsonValue::Double:
json += QByteArray::number(v.toDouble(b));
break;
case QJsonValue::String:
json += '"';
json += escapedString(v.toString(b));
json += '"';
break;
case QJsonValue::Array:
json += compact ? "[" : "[\n";
arrayContentToJson(static_cast<QJsonPrivate::Array *>(v.base(b)), json, indent + (compact ? 0 : 1), compact);
json += QByteArray(4*indent, ' ');
json += "]";
break;
case QJsonValue::Object:
json += compact ? "{" : "{\n";
objectContentToJson(static_cast<QJsonPrivate::Object *>(v.base(b)), json, indent + (compact ? 0 : 1), compact);
json += QByteArray(4*indent, ' ');
json += "}";
break;
case QJsonValue::Null:
default:
json += "null";
}
}
static void arrayContentToJson(const QJsonPrivate::Array *a, QByteArray &json, int indent, bool compact)
{
if (!a || !a->length)
return;
QByteArray indentString(4*indent, ' ');
uint i = 0;
while (1) {
json += indentString;
valueToJson(a, a->at(i), json, indent, compact);
if (++i == a->length) {
if (!compact)
json += '\n';
break;
}
json += compact ? "," : ",\n";
}
}
static void objectContentToJson(const QJsonPrivate::Object *o, QByteArray &json, int indent, bool compact)
{
if (!o || !o->length)
return;
QByteArray indentString(4*indent, ' ');
uint i = 0;
while (1) {
QJsonPrivate::Entry *e = o->entryAt(i);
json += indentString;
json += '"';
json += escapedString(e->key());
json += "\": ";
valueToJson(o, e->value, json, indent, compact);
if (++i == o->length) {
if (!compact)
json += '\n';
break;
}
json += compact ? "," : ",\n";
}
}
void Writer::objectToJson(const QJsonPrivate::Object *o, QByteArray &json, int indent, bool compact)
{
json.reserve(json.size() + (o ? (int)o->size : 16));
json += compact ? "{" : "{\n";
objectContentToJson(o, json, indent + (compact ? 0 : 1), compact);
json += QByteArray(4*indent, ' ');
json += compact ? "}" : "}\n";
}
void Writer::arrayToJson(const QJsonPrivate::Array *a, QByteArray &json, int indent, bool compact)
{
json.reserve(json.size() + (a ? (int)a->size : 16));
json += compact ? "[" : "[\n";
arrayContentToJson(a, json, indent + (compact ? 0 : 1), compact);
json += QByteArray(4*indent, ' ');
json += compact ? "]" : "]\n";
}
QT_END_NAMESPACE