添加了 归零等操作

增加了testdll 样例
This commit is contained in:
xin
2020-09-03 14:52:28 +08:00
parent 4f5169ed2f
commit 495f947827
30 changed files with 1051 additions and 42 deletions

View File

@ -0,0 +1,131 @@
/****************************************************************************
** Meta object code from reading C++ file 'testdll.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.8.0)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include "../../testdll.h"
#include <QtCore/qbytearray.h>
#include <QtCore/qmetatype.h>
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'testdll.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.8.0. 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
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_testdll_t {
QByteArrayData data[8];
char stringdata0[65];
};
#define QT_MOC_LITERAL(idx, ofs, len) \
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
qptrdiff(offsetof(qt_meta_stringdata_testdll_t, stringdata0) + ofs \
- idx * sizeof(QByteArrayData)) \
)
static const qt_meta_stringdata_testdll_t qt_meta_stringdata_testdll = {
{
QT_MOC_LITERAL(0, 0, 7), // "testdll"
QT_MOC_LITERAL(1, 8, 12), // "onbeginstart"
QT_MOC_LITERAL(2, 21, 0), // ""
QT_MOC_LITERAL(3, 22, 10), // "onfanzhuan"
QT_MOC_LITERAL(4, 33, 6), // "onstop"
QT_MOC_LITERAL(5, 40, 8), // "onlogcom"
QT_MOC_LITERAL(6, 49, 3), // "str"
QT_MOC_LITERAL(7, 53, 11) // "oninfomotor"
},
"testdll\0onbeginstart\0\0onfanzhuan\0"
"onstop\0onlogcom\0str\0oninfomotor"
};
#undef QT_MOC_LITERAL
static const uint qt_meta_data_testdll[] = {
// content:
7, // revision
0, // classname
0, 0, // classinfo
5, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
0, // signalCount
// slots: name, argc, parameters, tag, flags
1, 0, 39, 2, 0x0a /* Public */,
3, 0, 40, 2, 0x0a /* Public */,
4, 0, 41, 2, 0x0a /* Public */,
5, 1, 42, 2, 0x0a /* Public */,
7, 0, 45, 2, 0x0a /* Public */,
// slots: parameters
QMetaType::Void,
QMetaType::Void,
QMetaType::Void,
QMetaType::Void, QMetaType::QString, 6,
QMetaType::Void,
0 // eod
};
void testdll::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
testdll *_t = static_cast<testdll *>(_o);
Q_UNUSED(_t)
switch (_id) {
case 0: _t->onbeginstart(); break;
case 1: _t->onfanzhuan(); break;
case 2: _t->onstop(); break;
case 3: _t->onlogcom((*reinterpret_cast< QString(*)>(_a[1]))); break;
case 4: _t->oninfomotor(); break;
default: ;
}
}
}
const QMetaObject testdll::staticMetaObject = {
{ &QMainWindow::staticMetaObject, qt_meta_stringdata_testdll.data,
qt_meta_data_testdll, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
};
const QMetaObject *testdll::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
}
void *testdll::qt_metacast(const char *_clname)
{
if (!_clname) return Q_NULLPTR;
if (!strcmp(_clname, qt_meta_stringdata_testdll.stringdata0))
return static_cast<void*>(const_cast< testdll*>(this));
return QMainWindow::qt_metacast(_clname);
}
int testdll::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QMainWindow::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 5)
qt_static_metacall(this, _c, _id, _a);
_id -= 5;
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
if (_id < 5)
*reinterpret_cast<int*>(_a[0]) = -1;
_id -= 5;
}
return _id;
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE

View File

@ -0,0 +1,46 @@
/****************************************************************************
** Resource object code
**
** Created by: The Resource Compiler for Qt version 5.8.0
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#ifdef QT_NAMESPACE
# define QT_RCC_PREPEND_NAMESPACE(name) ::QT_NAMESPACE::name
# define QT_RCC_MANGLE_NAMESPACE0(x) x
# define QT_RCC_MANGLE_NAMESPACE1(a, b) a##_##b
# define QT_RCC_MANGLE_NAMESPACE2(a, b) QT_RCC_MANGLE_NAMESPACE1(a,b)
# define QT_RCC_MANGLE_NAMESPACE(name) QT_RCC_MANGLE_NAMESPACE2( \
QT_RCC_MANGLE_NAMESPACE0(name), QT_RCC_MANGLE_NAMESPACE0(QT_NAMESPACE))
#else
# define QT_RCC_PREPEND_NAMESPACE(name) name
# define QT_RCC_MANGLE_NAMESPACE(name) name
#endif
#ifdef QT_NAMESPACE
namespace QT_NAMESPACE {
#endif
#ifdef QT_NAMESPACE
}
#endif
int QT_RCC_MANGLE_NAMESPACE(qInitResources_testdll)();
int QT_RCC_MANGLE_NAMESPACE(qInitResources_testdll)()
{
return 1;
}
int QT_RCC_MANGLE_NAMESPACE(qCleanupResources_testdll)();
int QT_RCC_MANGLE_NAMESPACE(qCleanupResources_testdll)()
{
return 1;
}
namespace {
struct initializer {
initializer() { QT_RCC_MANGLE_NAMESPACE(qInitResources_testdll)(); }
~initializer() { QT_RCC_MANGLE_NAMESPACE(qCleanupResources_testdll)(); }
} dummy;
}

View File

@ -0,0 +1,149 @@
/********************************************************************************
** Form generated from reading UI file 'testdll.ui'
**
** Created by: Qt User Interface Compiler version 5.8.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_TESTDLL_H
#define UI_TESTDLL_H
#include <QtCore/QVariant>
#include <QtWidgets/QAction>
#include <QtWidgets/QApplication>
#include <QtWidgets/QButtonGroup>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QHeaderView>
#include <QtWidgets/QLabel>
#include <QtWidgets/QLineEdit>
#include <QtWidgets/QMainWindow>
#include <QtWidgets/QMenuBar>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QSpacerItem>
#include <QtWidgets/QStatusBar>
#include <QtWidgets/QTextEdit>
#include <QtWidgets/QToolBar>
#include <QtWidgets/QVBoxLayout>
#include <QtWidgets/QWidget>
QT_BEGIN_NAMESPACE
class Ui_testdllClass
{
public:
QWidget *centralWidget;
QVBoxLayout *verticalLayout;
QHBoxLayout *horizontalLayout_2;
QLabel *label;
QLineEdit *lineEdit;
QSpacerItem *horizontalSpacer;
QHBoxLayout *horizontalLayout;
QPushButton *startmotor;
QPushButton *pushButton;
QPushButton *pushButton_3;
QPushButton *pushButton_2;
QTextEdit *textEdit;
QMenuBar *menuBar;
QToolBar *mainToolBar;
QStatusBar *statusBar;
void setupUi(QMainWindow *testdllClass)
{
if (testdllClass->objectName().isEmpty())
testdllClass->setObjectName(QStringLiteral("testdllClass"));
testdllClass->resize(600, 400);
centralWidget = new QWidget(testdllClass);
centralWidget->setObjectName(QStringLiteral("centralWidget"));
verticalLayout = new QVBoxLayout(centralWidget);
verticalLayout->setSpacing(6);
verticalLayout->setContentsMargins(11, 11, 11, 11);
verticalLayout->setObjectName(QStringLiteral("verticalLayout"));
horizontalLayout_2 = new QHBoxLayout();
horizontalLayout_2->setSpacing(6);
horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2"));
label = new QLabel(centralWidget);
label->setObjectName(QStringLiteral("label"));
horizontalLayout_2->addWidget(label);
lineEdit = new QLineEdit(centralWidget);
lineEdit->setObjectName(QStringLiteral("lineEdit"));
horizontalLayout_2->addWidget(lineEdit);
horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
horizontalLayout_2->addItem(horizontalSpacer);
verticalLayout->addLayout(horizontalLayout_2);
horizontalLayout = new QHBoxLayout();
horizontalLayout->setSpacing(6);
horizontalLayout->setObjectName(QStringLiteral("horizontalLayout"));
startmotor = new QPushButton(centralWidget);
startmotor->setObjectName(QStringLiteral("startmotor"));
horizontalLayout->addWidget(startmotor);
pushButton = new QPushButton(centralWidget);
pushButton->setObjectName(QStringLiteral("pushButton"));
horizontalLayout->addWidget(pushButton);
pushButton_3 = new QPushButton(centralWidget);
pushButton_3->setObjectName(QStringLiteral("pushButton_3"));
horizontalLayout->addWidget(pushButton_3);
pushButton_2 = new QPushButton(centralWidget);
pushButton_2->setObjectName(QStringLiteral("pushButton_2"));
horizontalLayout->addWidget(pushButton_2);
verticalLayout->addLayout(horizontalLayout);
textEdit = new QTextEdit(centralWidget);
textEdit->setObjectName(QStringLiteral("textEdit"));
verticalLayout->addWidget(textEdit);
testdllClass->setCentralWidget(centralWidget);
menuBar = new QMenuBar(testdllClass);
menuBar->setObjectName(QStringLiteral("menuBar"));
menuBar->setGeometry(QRect(0, 0, 600, 23));
testdllClass->setMenuBar(menuBar);
mainToolBar = new QToolBar(testdllClass);
mainToolBar->setObjectName(QStringLiteral("mainToolBar"));
testdllClass->addToolBar(Qt::TopToolBarArea, mainToolBar);
statusBar = new QStatusBar(testdllClass);
statusBar->setObjectName(QStringLiteral("statusBar"));
testdllClass->setStatusBar(statusBar);
retranslateUi(testdllClass);
QMetaObject::connectSlotsByName(testdllClass);
} // setupUi
void retranslateUi(QMainWindow *testdllClass)
{
testdllClass->setWindowTitle(QApplication::translate("testdllClass", "testdll", Q_NULLPTR));
label->setText(QApplication::translate("testdllClass", "\351\200\237\345\272\246", Q_NULLPTR));
lineEdit->setText(QApplication::translate("testdllClass", "2000", Q_NULLPTR));
startmotor->setText(QApplication::translate("testdllClass", "\346\255\243\350\275\254", Q_NULLPTR));
pushButton->setText(QApplication::translate("testdllClass", "\345\217\215\350\275\254", Q_NULLPTR));
pushButton_3->setText(QApplication::translate("testdllClass", "\346\237\245\350\257\242\347\212\266\346\200\201", Q_NULLPTR));
pushButton_2->setText(QApplication::translate("testdllClass", "\345\201\234\346\255\242", Q_NULLPTR));
} // retranslateUi
};
namespace Ui {
class testdllClass: public Ui_testdllClass {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_TESTDLL_H