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
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

@@ -0,0 +1,37 @@
/*
* wpa_gui - StringQuery class
* Copyright (c) 2009, Atheros Communications
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Alternatively, this software may be distributed under the terms of BSD
* license.
*
* See README and COPYING for more details.
*/
#include <cstdio>
#include <QLabel>
#include "stringquery.h"
StringQuery::StringQuery(QString label)
{
edit = new QLineEdit;
edit->setFocus();
QGridLayout *layout = new QGridLayout;
layout->addWidget(new QLabel(label), 0, 0);
layout->addWidget(edit, 0, 1);
setLayout(layout);
connect(edit, SIGNAL(returnPressed()), this, SLOT(accept()));
}
QString StringQuery::get_string()
{
return edit->text();
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 918 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

@@ -0,0 +1,88 @@
/*
* FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
* Copyright (c) 2006 Christian Walter <wolti@sil.at>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* File: $Id: mbfuncother.c,v 1.8 2006/12/07 22:10:34 wolti Exp $
*/
/* ----------------------- System includes ----------------------------------*/
#include "stdlib.h"
#include "string.h"
/* ----------------------- Platform includes --------------------------------*/
#include "port.h"
/* ----------------------- Modbus includes ----------------------------------*/
#include "mb.h"
#include "mbframe.h"
#include "mbproto.h"
#include "mbconfig.h"
#if MB_FUNC_OTHER_REP_SLAVEID_ENABLED > 0
/* ----------------------- Static variables ---------------------------------*/
static UCHAR ucMBSlaveID[MB_FUNC_OTHER_REP_SLAVEID_BUF];
static USHORT usMBSlaveIDLen;
/* ----------------------- Start implementation -----------------------------*/
eMBErrorCode
eMBSetSlaveID( UCHAR ucSlaveID, BOOL xIsRunning,
UCHAR const *pucAdditional, USHORT usAdditionalLen )
{
eMBErrorCode eStatus = MB_ENOERR;
/* the first byte and second byte in the buffer is reserved for
* the parameter ucSlaveID and the running flag. The rest of
* the buffer is available for additional data. */
if( usAdditionalLen + 2 < MB_FUNC_OTHER_REP_SLAVEID_BUF )
{
usMBSlaveIDLen = 0;
ucMBSlaveID[usMBSlaveIDLen++] = ucSlaveID;
ucMBSlaveID[usMBSlaveIDLen++] = ( UCHAR )( xIsRunning ? 0xFF : 0x00 );
if( usAdditionalLen > 0 )
{
memcpy( &ucMBSlaveID[usMBSlaveIDLen], pucAdditional,
( size_t )usAdditionalLen );
usMBSlaveIDLen += usAdditionalLen;
}
}
else
{
eStatus = MB_ENORES;
}
return eStatus;
}
eMBException
eMBFuncReportSlaveID( UCHAR * pucFrame, USHORT * usLen )
{
memcpy( &pucFrame[MB_PDU_DATA_OFF], &ucMBSlaveID[0], ( size_t )usMBSlaveIDLen );
*usLen = ( USHORT )( MB_PDU_DATA_OFF + usMBSlaveIDLen );
return MB_EX_NONE;
}
#endif
@@ -0,0 +1,152 @@
/********************************************************************************
** Form generated from reading UI file 'dialogshowcounter.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_DIALOGSHOWCOUNTER_H
#define UI_DIALOGSHOWCOUNTER_H
#include <QtCore/QVariant>
#include <QtGui/QAction>
#include <QtGui/QApplication>
#include <QtGui/QButtonGroup>
#include <QtGui/QDialog>
#include <QtGui/QDialogButtonBox>
#include <QtGui/QHeaderView>
#include <QtGui/QLCDNumber>
#include <QtGui/QLabel>
#include <QtGui/QPushButton>
QT_BEGIN_NAMESPACE
class Ui_DialogShowCounter
{
public:
QDialogButtonBox *buttonBox;
QLCDNumber *lcdNumber;
QLabel *label;
QLabel *label_2;
QLCDNumber *lcdCycleStartNumber;
QLabel *label_3;
QLabel *label_4;
QLabel *label_5;
QLCDNumber *lcdLessNumber;
QLCDNumber *lcdCycleTimeNumber;
QLabel *label_6;
QPushButton *pushButton;
QLabel *label_7;
QLCDNumber *lcdCycleEndNumber;
QLabel *label_8;
QLabel *label_9;
void setupUi(QDialog *DialogShowCounter)
{
if (DialogShowCounter->objectName().isEmpty())
DialogShowCounter->setObjectName(QString::fromUtf8("DialogShowCounter"));
DialogShowCounter->resize(640, 480);
buttonBox = new QDialogButtonBox(DialogShowCounter);
buttonBox->setObjectName(QString::fromUtf8("buttonBox"));
buttonBox->setGeometry(QRect(290, 440, 341, 32));
buttonBox->setOrientation(Qt::Horizontal);
buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
lcdNumber = new QLCDNumber(DialogShowCounter);
lcdNumber->setObjectName(QString::fromUtf8("lcdNumber"));
lcdNumber->setGeometry(QRect(160, 20, 471, 411));
lcdNumber->setDigitCount(4);
label = new QLabel(DialogShowCounter);
label->setObjectName(QString::fromUtf8("label"));
label->setGeometry(QRect(170, 0, 61, 21));
label_2 = new QLabel(DialogShowCounter);
label_2->setObjectName(QString::fromUtf8("label_2"));
label_2->setGeometry(QRect(10, 10, 91, 16));
lcdCycleStartNumber = new QLCDNumber(DialogShowCounter);
lcdCycleStartNumber->setObjectName(QString::fromUtf8("lcdCycleStartNumber"));
lcdCycleStartNumber->setGeometry(QRect(40, 30, 101, 61));
lcdCycleStartNumber->setDigitCount(4);
label_3 = new QLabel(DialogShowCounter);
label_3->setObjectName(QString::fromUtf8("label_3"));
label_3->setGeometry(QRect(140, 70, 16, 16));
label_4 = new QLabel(DialogShowCounter);
label_4->setObjectName(QString::fromUtf8("label_4"));
label_4->setGeometry(QRect(10, 190, 91, 16));
label_5 = new QLabel(DialogShowCounter);
label_5->setObjectName(QString::fromUtf8("label_5"));
label_5->setGeometry(QRect(140, 300, 16, 16));
lcdLessNumber = new QLCDNumber(DialogShowCounter);
lcdLessNumber->setObjectName(QString::fromUtf8("lcdLessNumber"));
lcdLessNumber->setGeometry(QRect(0, 210, 141, 111));
lcdLessNumber->setDigitCount(4);
lcdCycleTimeNumber = new QLCDNumber(DialogShowCounter);
lcdCycleTimeNumber->setObjectName(QString::fromUtf8("lcdCycleTimeNumber"));
lcdCycleTimeNumber->setGeometry(QRect(0, 340, 141, 91));
lcdCycleTimeNumber->setDigitCount(4);
label_6 = new QLabel(DialogShowCounter);
label_6->setObjectName(QString::fromUtf8("label_6"));
label_6->setGeometry(QRect(0, 320, 91, 16));
pushButton = new QPushButton(DialogShowCounter);
pushButton->setObjectName(QString::fromUtf8("pushButton"));
pushButton->setGeometry(QRect(20, 440, 91, 23));
label_7 = new QLabel(DialogShowCounter);
label_7->setObjectName(QString::fromUtf8("label_7"));
label_7->setGeometry(QRect(140, 150, 16, 16));
lcdCycleEndNumber = new QLCDNumber(DialogShowCounter);
lcdCycleEndNumber->setObjectName(QString::fromUtf8("lcdCycleEndNumber"));
lcdCycleEndNumber->setGeometry(QRect(40, 110, 101, 61));
lcdCycleEndNumber->setDigitCount(4);
label_8 = new QLabel(DialogShowCounter);
label_8->setObjectName(QString::fromUtf8("label_8"));
label_8->setGeometry(QRect(10, 70, 31, 16));
label_9 = new QLabel(DialogShowCounter);
label_9->setObjectName(QString::fromUtf8("label_9"));
label_9->setGeometry(QRect(10, 150, 31, 16));
lcdNumber->raise();
buttonBox->raise();
label->raise();
label_2->raise();
lcdCycleStartNumber->raise();
label_3->raise();
label_4->raise();
label_5->raise();
lcdLessNumber->raise();
lcdCycleTimeNumber->raise();
label_6->raise();
pushButton->raise();
label_7->raise();
lcdCycleEndNumber->raise();
label_8->raise();
label_9->raise();
retranslateUi(DialogShowCounter);
QObject::connect(buttonBox, SIGNAL(accepted()), DialogShowCounter, SLOT(accept()));
QObject::connect(buttonBox, SIGNAL(rejected()), DialogShowCounter, SLOT(reject()));
QMetaObject::connectSlotsByName(DialogShowCounter);
} // setupUi
void retranslateUi(QDialog *DialogShowCounter)
{
DialogShowCounter->setWindowTitle(QApplication::translate("DialogShowCounter", "Dialog", 0, QApplication::UnicodeUTF8));
label->setText(QApplication::translate("DialogShowCounter", "\347\261\263\346\240\207\346\230\276\347\244\272\357\274\232", 0, QApplication::UnicodeUTF8));
label_2->setText(QApplication::translate("DialogShowCounter", "\347\233\256\345\211\215\345\276\252\347\216\257\350\214\203\345\233\264:", 0, QApplication::UnicodeUTF8));
label_3->setText(QApplication::translate("DialogShowCounter", "\347\261\263", 0, QApplication::UnicodeUTF8));
label_4->setText(QApplication::translate("DialogShowCounter", "\345\211\251\344\275\231\347\261\263\346\225\260:", 0, QApplication::UnicodeUTF8));
label_5->setText(QApplication::translate("DialogShowCounter", "\347\261\263", 0, QApplication::UnicodeUTF8));
label_6->setText(QApplication::translate("DialogShowCounter", "\345\276\252\347\216\257\346\254\241\346\225\260:", 0, QApplication::UnicodeUTF8));
pushButton->setText(QApplication::translate("DialogShowCounter", "\347\253\213\345\215\263\351\207\215\346\226\260\350\256\241\347\261\263", 0, QApplication::UnicodeUTF8));
label_7->setText(QApplication::translate("DialogShowCounter", "\347\261\263", 0, QApplication::UnicodeUTF8));
label_8->setText(QApplication::translate("DialogShowCounter", "\350\265\267\345\247\213:", 0, QApplication::UnicodeUTF8));
label_9->setText(QApplication::translate("DialogShowCounter", "\347\273\223\346\235\237:", 0, QApplication::UnicodeUTF8));
} // retranslateUi
};
namespace Ui {
class DialogShowCounter: public Ui_DialogShowCounter {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_DIALOGSHOWCOUNTER_H