diff --git a/123.txt b/123.txt index c2d5175..ece27d3 100644 --- a/123.txt +++ b/123.txt @@ -2,13 +2,11 @@ connect plc success >>> connect to monitor successfully! >>> >>> load system parameter successfully! >>> welcome dk ! - Display ID: SF3000-GE04K-10C-00 00:26:ac:a1:00:9d [192.168.15.105] - Display ID: FX10e 70:f8:e7:b0:07:c4 [169.254.128.27] + Display ID: FX10e 70:f8:e7:b0:07:c4 [169.254.109.87] set ip success -*** Unable to connect to FX10e 70:f8:e7:b0:07:c4 [169.254.128.27] +*** Unable to connect to FX10e 70:f8:e7:b0:07:c4 [169.254.109.87] *** init camera error, error code: -1 *** >>> try to init camera again... >>> - Display ID: SF3000-GE04K-10C-00 00:26:ac:a1:00:9d [192.168.15.105] Display ID: FX10e 70:f8:e7:b0:07:c4 [192.168.123.3] set ip success >>> Successfully connected to FX10e 70:f8:e7:b0:07:c4 [192.168.123.3] @@ -19,12 +17,12 @@ set ip success >>> init camera successfully hello dk ! ->>> spec threshold 4 send to python ->>> rgb threshold 6 send to python +>>> spec threshold 8 send to python +>>> rgb threshold 8 send to python new connection to lower machine! -receive message from suhandong -start -queue buffer successfully... -running on 0 -queue buffer successfully... ->>> start acquisition >>> +>>> close and free lstream >>> +>>> disconnect and free camera device >>> +dkkkkkkkkkkkkkkk +>>> rgb_camera: close and free lstream >>> +>>> rgb_camera: disconnect and free camera device >>> +rgb_camera: dkkkkkkkkkkkkkkk diff --git a/image/njfu.jpg b/image/njfu.jpg new file mode 100644 index 0000000..bf1f77d Binary files /dev/null and b/image/njfu.jpg differ diff --git a/moc_camera.cpp b/moc_camera.cpp new file mode 100644 index 0000000..b9014f5 --- /dev/null +++ b/moc_camera.cpp @@ -0,0 +1,394 @@ +/**************************************************************************** +** Meta object code from reading C++ file 'camera.h' +** +** Created by: The Qt Meta Object Compiler version 67 (Qt 5.9.5) +** +** WARNING! All changes made in this file will be lost! +*****************************************************************************/ + +#include "camera.h" +#include +#include +#if !defined(Q_MOC_OUTPUT_REVISION) +#error "The header file 'camera.h' doesn't include ." +#elif Q_MOC_OUTPUT_REVISION != 67 +#error "This file was generated using the moc from 5.9.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 +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED +struct qt_meta_stringdata_Camera_t { + QByteArrayData data[6]; + char stringdata0[84]; +}; +#define QT_MOC_LITERAL(idx, ofs, len) \ + Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ + qptrdiff(offsetof(qt_meta_stringdata_Camera_t, stringdata0) + ofs \ + - idx * sizeof(QByteArrayData)) \ + ) +static const qt_meta_stringdata_Camera_t qt_meta_stringdata_Camera = { + { +QT_MOC_LITERAL(0, 0, 6), // "Camera" +QT_MOC_LITERAL(1, 7, 33), // "send_calibration_finished_mes..." +QT_MOC_LITERAL(2, 41, 0), // "" +QT_MOC_LITERAL(3, 42, 15), // "send_data_to_ui" +QT_MOC_LITERAL(4, 58, 8), // "uint8_t*" +QT_MOC_LITERAL(5, 67, 16) // "load_calibration" + + }, + "Camera\0send_calibration_finished_message\0" + "\0send_data_to_ui\0uint8_t*\0load_calibration" +}; +#undef QT_MOC_LITERAL + +static const uint qt_meta_data_Camera[] = { + + // content: + 7, // revision + 0, // classname + 0, 0, // classinfo + 3, 14, // methods + 0, 0, // properties + 0, 0, // enums/sets + 0, 0, // constructors + 0, // flags + 2, // signalCount + + // signals: name, argc, parameters, tag, flags + 1, 0, 29, 2, 0x06 /* Public */, + 3, 1, 30, 2, 0x06 /* Public */, + + // slots: name, argc, parameters, tag, flags + 5, 0, 33, 2, 0x0a /* Public */, + + // signals: parameters + QMetaType::Void, + QMetaType::Void, 0x80000000 | 4, 2, + + // slots: parameters + QMetaType::Void, + + 0 // eod +}; + +void Camera::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) +{ + if (_c == QMetaObject::InvokeMetaMethod) { + Camera *_t = static_cast(_o); + Q_UNUSED(_t) + switch (_id) { + case 0: _t->send_calibration_finished_message(); break; + case 1: _t->send_data_to_ui((*reinterpret_cast< uint8_t*(*)>(_a[1]))); break; + case 2: _t->load_calibration(); break; + default: ; + } + } else if (_c == QMetaObject::IndexOfMethod) { + int *result = reinterpret_cast(_a[0]); + { + typedef void (Camera::*_t)(); + if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&Camera::send_calibration_finished_message)) { + *result = 0; + return; + } + } + { + typedef void (Camera::*_t)(uint8_t * ); + if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&Camera::send_data_to_ui)) { + *result = 1; + return; + } + } + } +} + +const QMetaObject Camera::staticMetaObject = { + { &QObject::staticMetaObject, qt_meta_stringdata_Camera.data, + qt_meta_data_Camera, qt_static_metacall, nullptr, nullptr} +}; + + +const QMetaObject *Camera::metaObject() const +{ + return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; +} + +void *Camera::qt_metacast(const char *_clname) +{ + if (!_clname) return nullptr; + if (!strcmp(_clname, qt_meta_stringdata_Camera.stringdata0)) + return static_cast(this); + return QObject::qt_metacast(_clname); +} + +int Camera::qt_metacall(QMetaObject::Call _c, int _id, void **_a) +{ + _id = QObject::qt_metacall(_c, _id, _a); + if (_id < 0) + return _id; + if (_c == QMetaObject::InvokeMetaMethod) { + if (_id < 3) + qt_static_metacall(this, _c, _id, _a); + _id -= 3; + } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { + if (_id < 3) + *reinterpret_cast(_a[0]) = -1; + _id -= 3; + } + return _id; +} + +// SIGNAL 0 +void Camera::send_calibration_finished_message() +{ + QMetaObject::activate(this, &staticMetaObject, 0, nullptr); +} + +// SIGNAL 1 +void Camera::send_data_to_ui(uint8_t * _t1) +{ + void *_a[] = { nullptr, const_cast(reinterpret_cast(&_t1)) }; + QMetaObject::activate(this, &staticMetaObject, 1, _a); +} +struct qt_meta_stringdata_CaptureThread_t { + QByteArrayData data[1]; + char stringdata0[14]; +}; +#define QT_MOC_LITERAL(idx, ofs, len) \ + Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ + qptrdiff(offsetof(qt_meta_stringdata_CaptureThread_t, stringdata0) + ofs \ + - idx * sizeof(QByteArrayData)) \ + ) +static const qt_meta_stringdata_CaptureThread_t qt_meta_stringdata_CaptureThread = { + { +QT_MOC_LITERAL(0, 0, 13) // "CaptureThread" + + }, + "CaptureThread" +}; +#undef QT_MOC_LITERAL + +static const uint qt_meta_data_CaptureThread[] = { + + // content: + 7, // 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 +}; + +void CaptureThread::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 QMetaObject CaptureThread::staticMetaObject = { + { &QThread::staticMetaObject, qt_meta_stringdata_CaptureThread.data, + qt_meta_data_CaptureThread, qt_static_metacall, nullptr, nullptr} +}; + + +const QMetaObject *CaptureThread::metaObject() const +{ + return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; +} + +void *CaptureThread::qt_metacast(const char *_clname) +{ + if (!_clname) return nullptr; + if (!strcmp(_clname, qt_meta_stringdata_CaptureThread.stringdata0)) + return static_cast(this); + return QThread::qt_metacast(_clname); +} + +int CaptureThread::qt_metacall(QMetaObject::Call _c, int _id, void **_a) +{ + _id = QThread::qt_metacall(_c, _id, _a); + return _id; +} +struct qt_meta_stringdata_RGB_CaptureThread_t { + QByteArrayData data[1]; + char stringdata0[18]; +}; +#define QT_MOC_LITERAL(idx, ofs, len) \ + Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ + qptrdiff(offsetof(qt_meta_stringdata_RGB_CaptureThread_t, stringdata0) + ofs \ + - idx * sizeof(QByteArrayData)) \ + ) +static const qt_meta_stringdata_RGB_CaptureThread_t qt_meta_stringdata_RGB_CaptureThread = { + { +QT_MOC_LITERAL(0, 0, 17) // "RGB_CaptureThread" + + }, + "RGB_CaptureThread" +}; +#undef QT_MOC_LITERAL + +static const uint qt_meta_data_RGB_CaptureThread[] = { + + // content: + 7, // 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 +}; + +void RGB_CaptureThread::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 QMetaObject RGB_CaptureThread::staticMetaObject = { + { &QThread::staticMetaObject, qt_meta_stringdata_RGB_CaptureThread.data, + qt_meta_data_RGB_CaptureThread, qt_static_metacall, nullptr, nullptr} +}; + + +const QMetaObject *RGB_CaptureThread::metaObject() const +{ + return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; +} + +void *RGB_CaptureThread::qt_metacast(const char *_clname) +{ + if (!_clname) return nullptr; + if (!strcmp(_clname, qt_meta_stringdata_RGB_CaptureThread.stringdata0)) + return static_cast(this); + return QThread::qt_metacast(_clname); +} + +int RGB_CaptureThread::qt_metacall(QMetaObject::Call _c, int _id, void **_a) +{ + _id = QThread::qt_metacall(_c, _id, _a); + return _id; +} +struct qt_meta_stringdata_RGB_Camera_t { + QByteArrayData data[4]; + char stringdata0[40]; +}; +#define QT_MOC_LITERAL(idx, ofs, len) \ + Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ + qptrdiff(offsetof(qt_meta_stringdata_RGB_Camera_t, stringdata0) + ofs \ + - idx * sizeof(QByteArrayData)) \ + ) +static const qt_meta_stringdata_RGB_Camera_t qt_meta_stringdata_RGB_Camera = { + { +QT_MOC_LITERAL(0, 0, 10), // "RGB_Camera" +QT_MOC_LITERAL(1, 11, 18), // "send_rgbdata_to_ui" +QT_MOC_LITERAL(2, 30, 0), // "" +QT_MOC_LITERAL(3, 31, 8) // "uint8_t*" + + }, + "RGB_Camera\0send_rgbdata_to_ui\0\0uint8_t*" +}; +#undef QT_MOC_LITERAL + +static const uint qt_meta_data_RGB_Camera[] = { + + // content: + 7, // revision + 0, // classname + 0, 0, // classinfo + 1, 14, // methods + 0, 0, // properties + 0, 0, // enums/sets + 0, 0, // constructors + 0, // flags + 1, // signalCount + + // signals: name, argc, parameters, tag, flags + 1, 1, 19, 2, 0x06 /* Public */, + + // signals: parameters + QMetaType::Void, 0x80000000 | 3, 2, + + 0 // eod +}; + +void RGB_Camera::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) +{ + if (_c == QMetaObject::InvokeMetaMethod) { + RGB_Camera *_t = static_cast(_o); + Q_UNUSED(_t) + switch (_id) { + case 0: _t->send_rgbdata_to_ui((*reinterpret_cast< uint8_t*(*)>(_a[1]))); break; + default: ; + } + } else if (_c == QMetaObject::IndexOfMethod) { + int *result = reinterpret_cast(_a[0]); + { + typedef void (RGB_Camera::*_t)(uint8_t * ); + if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&RGB_Camera::send_rgbdata_to_ui)) { + *result = 0; + return; + } + } + } +} + +const QMetaObject RGB_Camera::staticMetaObject = { + { &QObject::staticMetaObject, qt_meta_stringdata_RGB_Camera.data, + qt_meta_data_RGB_Camera, qt_static_metacall, nullptr, nullptr} +}; + + +const QMetaObject *RGB_Camera::metaObject() const +{ + return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; +} + +void *RGB_Camera::qt_metacast(const char *_clname) +{ + if (!_clname) return nullptr; + if (!strcmp(_clname, qt_meta_stringdata_RGB_Camera.stringdata0)) + return static_cast(this); + return QObject::qt_metacast(_clname); +} + +int RGB_Camera::qt_metacall(QMetaObject::Call _c, int _id, void **_a) +{ + _id = QObject::qt_metacall(_c, _id, _a); + if (_id < 0) + return _id; + if (_c == QMetaObject::InvokeMetaMethod) { + if (_id < 1) + qt_static_metacall(this, _c, _id, _a); + _id -= 1; + } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { + if (_id < 1) + *reinterpret_cast(_a[0]) = -1; + _id -= 1; + } + return _id; +} + +// SIGNAL 0 +void RGB_Camera::send_rgbdata_to_ui(uint8_t * _t1) +{ + void *_a[] = { nullptr, const_cast(reinterpret_cast(&_t1)) }; + QMetaObject::activate(this, &staticMetaObject, 0, _a); +} +QT_WARNING_POP +QT_END_MOC_NAMESPACE diff --git a/moc_predefs.h b/moc_predefs.h new file mode 100644 index 0000000..17f0b39 --- /dev/null +++ b/moc_predefs.h @@ -0,0 +1,390 @@ +#define __SSP_STRONG__ 3 +#define __DBL_MIN_EXP__ (-1021) +#define __FLT32X_MAX_EXP__ 1024 +#define __cpp_attributes 200809 +#define __UINT_LEAST16_MAX__ 0xffff +#define __ATOMIC_ACQUIRE 2 +#define __FLT128_MAX_10_EXP__ 4932 +#define __FLT_MIN__ 1.17549435082228750796873653722224568e-38F +#define __GCC_IEC_559_COMPLEX 2 +#define __cpp_aggregate_nsdmi 201304 +#define __UINT_LEAST8_TYPE__ unsigned char +#define __SIZEOF_FLOAT80__ 16 +#define __INTMAX_C(c) c ## L +#define __CHAR_BIT__ 8 +#define __UINT8_MAX__ 0xff +#define __WINT_MAX__ 0xffffffffU +#define __FLT32_MIN_EXP__ (-125) +#define __cpp_static_assert 200410 +#define __ORDER_LITTLE_ENDIAN__ 1234 +#define __SIZE_MAX__ 0xffffffffffffffffUL +#define __WCHAR_MAX__ 0x7fffffff +#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 +#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 +#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 +#define __DBL_DENORM_MIN__ double(4.94065645841246544176568792868221372e-324L) +#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 +#define __GCC_ATOMIC_CHAR_LOCK_FREE 2 +#define __GCC_IEC_559 2 +#define __FLT32X_DECIMAL_DIG__ 17 +#define __FLT_EVAL_METHOD__ 0 +#define __unix__ 1 +#define __cpp_binary_literals 201304 +#define __FLT64_DECIMAL_DIG__ 17 +#define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 2 +#define __x86_64 1 +#define __cpp_variadic_templates 200704 +#define __UINT_FAST64_MAX__ 0xffffffffffffffffUL +#define __SIG_ATOMIC_TYPE__ int +#define __DBL_MIN_10_EXP__ (-307) +#define __FINITE_MATH_ONLY__ 0 +#define __cpp_variable_templates 201304 +#define __GNUC_PATCHLEVEL__ 0 +#define __FLT32_HAS_DENORM__ 1 +#define __UINT_FAST8_MAX__ 0xff +#define __has_include(STR) __has_include__(STR) +#define __DEC64_MAX_EXP__ 385 +#define __INT8_C(c) c +#define __INT_LEAST8_WIDTH__ 8 +#define __UINT_LEAST64_MAX__ 0xffffffffffffffffUL +#define __SHRT_MAX__ 0x7fff +#define __LDBL_MAX__ 1.18973149535723176502126385303097021e+4932L +#define __FLT64X_MAX_10_EXP__ 4932 +#define __UINT_LEAST8_MAX__ 0xff +#define __GCC_ATOMIC_BOOL_LOCK_FREE 2 +#define __FLT128_DENORM_MIN__ 6.47517511943802511092443895822764655e-4966F128 +#define __UINTMAX_TYPE__ long unsigned int +#define __linux 1 +#define __DEC32_EPSILON__ 1E-6DF +#define __FLT_EVAL_METHOD_TS_18661_3__ 0 +#define __OPTIMIZE__ 1 +#define __unix 1 +#define __UINT32_MAX__ 0xffffffffU +#define __GXX_EXPERIMENTAL_CXX0X__ 1 +#define __LDBL_MAX_EXP__ 16384 +#define __FLT128_MIN_EXP__ (-16381) +#define __WINT_MIN__ 0U +#define __linux__ 1 +#define __FLT128_MIN_10_EXP__ (-4931) +#define __INT_LEAST16_WIDTH__ 16 +#define __SCHAR_MAX__ 0x7f +#define __FLT128_MANT_DIG__ 113 +#define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) +#define __INT64_C(c) c ## L +#define __DBL_DIG__ 15 +#define __GCC_ATOMIC_POINTER_LOCK_FREE 2 +#define __FLT64X_MANT_DIG__ 64 +#define _FORTIFY_SOURCE 2 +#define __SIZEOF_INT__ 4 +#define __SIZEOF_POINTER__ 8 +#define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 2 +#define __USER_LABEL_PREFIX__ +#define __FLT64X_EPSILON__ 1.08420217248550443400745280086994171e-19F64x +#define __STDC_HOSTED__ 1 +#define __LDBL_HAS_INFINITY__ 1 +#define __FLT32_DIG__ 6 +#define __FLT_EPSILON__ 1.19209289550781250000000000000000000e-7F +#define __GXX_WEAK__ 1 +#define __SHRT_WIDTH__ 16 +#define __LDBL_MIN__ 3.36210314311209350626267781732175260e-4932L +#define __DEC32_MAX__ 9.999999E96DF +#define __cpp_threadsafe_static_init 200806 +#define __FLT64X_DENORM_MIN__ 3.64519953188247460252840593361941982e-4951F64x +#define __FLT32X_HAS_INFINITY__ 1 +#define __INT32_MAX__ 0x7fffffff +#define __INT_WIDTH__ 32 +#define __SIZEOF_LONG__ 8 +#define __STDC_IEC_559__ 1 +#define __STDC_ISO_10646__ 201706L +#define __UINT16_C(c) c +#define __PTRDIFF_WIDTH__ 64 +#define __DECIMAL_DIG__ 21 +#define __FLT64_EPSILON__ 2.22044604925031308084726333618164062e-16F64 +#define __gnu_linux__ 1 +#define __INTMAX_WIDTH__ 64 +#define __FLT64_MIN_EXP__ (-1021) +#define __has_include_next(STR) __has_include_next__(STR) +#define __FLT64X_MIN_10_EXP__ (-4931) +#define __LDBL_HAS_QUIET_NAN__ 1 +#define __FLT64_MANT_DIG__ 53 +#define __GNUC__ 7 +#define __GXX_RTTI 1 +#define __pie__ 2 +#define __MMX__ 1 +#define __cpp_delegating_constructors 200604 +#define __FLT_HAS_DENORM__ 1 +#define __SIZEOF_LONG_DOUBLE__ 16 +#define __BIGGEST_ALIGNMENT__ 16 +#define __STDC_UTF_16__ 1 +#define __FLT64_MAX_10_EXP__ 308 +#define __FLT32_HAS_INFINITY__ 1 +#define __DBL_MAX__ double(1.79769313486231570814527423731704357e+308L) +#define __cpp_raw_strings 200710 +#define __INT_FAST32_MAX__ 0x7fffffffffffffffL +#define __DBL_HAS_INFINITY__ 1 +#define __INT64_MAX__ 0x7fffffffffffffffL +#define __DEC32_MIN_EXP__ (-94) +#define __INTPTR_WIDTH__ 64 +#define __FLT32X_HAS_DENORM__ 1 +#define __INT_FAST16_TYPE__ long int +#define __LDBL_HAS_DENORM__ 1 +#define __cplusplus 201402L +#define __cpp_ref_qualifiers 200710 +#define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL +#define __INT_LEAST32_MAX__ 0x7fffffff +#define __DEC32_MIN__ 1E-95DF +#define __DEPRECATED 1 +#define __cpp_rvalue_references 200610 +#define __DBL_MAX_EXP__ 1024 +#define __WCHAR_WIDTH__ 32 +#define __FLT32_MAX__ 3.40282346638528859811704183484516925e+38F32 +#define __DEC128_EPSILON__ 1E-33DL +#define __SSE2_MATH__ 1 +#define __ATOMIC_HLE_RELEASE 131072 +#define __PTRDIFF_MAX__ 0x7fffffffffffffffL +#define __amd64 1 +#define __STDC_NO_THREADS__ 1 +#define __ATOMIC_HLE_ACQUIRE 65536 +#define __FLT32_HAS_QUIET_NAN__ 1 +#define __GNUG__ 7 +#define __LONG_LONG_MAX__ 0x7fffffffffffffffLL +#define __SIZEOF_SIZE_T__ 8 +#define __cpp_rvalue_reference 200610 +#define __cpp_nsdmi 200809 +#define __FLT64X_MIN_EXP__ (-16381) +#define __SIZEOF_WINT_T__ 4 +#define __LONG_LONG_WIDTH__ 64 +#define __cpp_initializer_lists 200806 +#define __FLT32_MAX_EXP__ 128 +#define __cpp_hex_float 201603 +#define __GCC_HAVE_DWARF2_CFI_ASM 1 +#define __GXX_ABI_VERSION 1011 +#define __FLT128_HAS_INFINITY__ 1 +#define __FLT_MIN_EXP__ (-125) +#define __cpp_lambdas 200907 +#define __FLT64X_HAS_QUIET_NAN__ 1 +#define __INT_FAST64_TYPE__ long int +#define __FLT64_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F64 +#define __DBL_MIN__ double(2.22507385850720138309023271733240406e-308L) +#define __PIE__ 2 +#define __LP64__ 1 +#define __FLT32X_EPSILON__ 2.22044604925031308084726333618164062e-16F32x +#define __DECIMAL_BID_FORMAT__ 1 +#define __FLT64_MIN_10_EXP__ (-307) +#define __FLT64X_DECIMAL_DIG__ 21 +#define __DEC128_MIN__ 1E-6143DL +#define __REGISTER_PREFIX__ +#define __UINT16_MAX__ 0xffff +#define __DBL_HAS_DENORM__ 1 +#define __FLT32_MIN__ 1.17549435082228750796873653722224568e-38F32 +#define __UINT8_TYPE__ unsigned char +#define __FLT_MANT_DIG__ 24 +#define __LDBL_DECIMAL_DIG__ 21 +#define __VERSION__ "7.5.0" +#define __UINT64_C(c) c ## UL +#define __cpp_unicode_characters 200704 +#define _STDC_PREDEF_H 1 +#define __cpp_decltype_auto 201304 +#define __GCC_ATOMIC_INT_LOCK_FREE 2 +#define __FLT128_MAX_EXP__ 16384 +#define __FLT32_MANT_DIG__ 24 +#define __FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__ +#define __STDC_IEC_559_COMPLEX__ 1 +#define __FLT128_HAS_DENORM__ 1 +#define __FLT128_DIG__ 33 +#define __SCHAR_WIDTH__ 8 +#define __INT32_C(c) c +#define __DEC64_EPSILON__ 1E-15DD +#define __ORDER_PDP_ENDIAN__ 3412 +#define __DEC128_MIN_EXP__ (-6142) +#define __FLT32_MAX_10_EXP__ 38 +#define __INT_FAST32_TYPE__ long int +#define __UINT_LEAST16_TYPE__ short unsigned int +#define __FLT64X_HAS_INFINITY__ 1 +#define unix 1 +#define __INT16_MAX__ 0x7fff +#define __cpp_rtti 199711 +#define __SIZE_TYPE__ long unsigned int +#define __UINT64_MAX__ 0xffffffffffffffffUL +#define __FLT64X_DIG__ 18 +#define __INT8_TYPE__ signed char +#define __cpp_digit_separators 201309 +#define __ELF__ 1 +#define __GCC_ASM_FLAG_OUTPUTS__ 1 +#define __FLT_RADIX__ 2 +#define __INT_LEAST16_TYPE__ short int +#define __LDBL_EPSILON__ 1.08420217248550443400745280086994171e-19L +#define __UINTMAX_C(c) c ## UL +#define __GLIBCXX_BITSIZE_INT_N_0 128 +#define __k8 1 +#define __SIG_ATOMIC_MAX__ 0x7fffffff +#define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 2 +#define __cpp_sized_deallocation 201309 +#define __SIZEOF_PTRDIFF_T__ 8 +#define __FLT32X_MANT_DIG__ 53 +#define __x86_64__ 1 +#define __FLT32X_MIN_EXP__ (-1021) +#define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF +#define __INT_FAST16_MAX__ 0x7fffffffffffffffL +#define __FLT64_DIG__ 15 +#define __UINT_FAST32_MAX__ 0xffffffffffffffffUL +#define __UINT_LEAST64_TYPE__ long unsigned int +#define __FLT_HAS_QUIET_NAN__ 1 +#define __FLT_MAX_10_EXP__ 38 +#define __LONG_MAX__ 0x7fffffffffffffffL +#define __FLT64X_HAS_DENORM__ 1 +#define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL +#define __FLT_HAS_INFINITY__ 1 +#define __cpp_unicode_literals 200710 +#define __UINT_FAST16_TYPE__ long unsigned int +#define __DEC64_MAX__ 9.999999999999999E384DD +#define __INT_FAST32_WIDTH__ 64 +#define __CHAR16_TYPE__ short unsigned int +#define __PRAGMA_REDEFINE_EXTNAME 1 +#define __SIZE_WIDTH__ 64 +#define __SEG_FS 1 +#define __INT_LEAST16_MAX__ 0x7fff +#define __DEC64_MANT_DIG__ 16 +#define __UINT_LEAST32_MAX__ 0xffffffffU +#define __SEG_GS 1 +#define __FLT32_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F32 +#define __GCC_ATOMIC_LONG_LOCK_FREE 2 +#define __SIG_ATOMIC_WIDTH__ 32 +#define __INT_LEAST64_TYPE__ long int +#define __INT16_TYPE__ short int +#define __INT_LEAST8_TYPE__ signed char +#define __DEC32_MAX_EXP__ 97 +#define __INT_FAST8_MAX__ 0x7f +#define __FLT128_MAX__ 1.18973149535723176508575932662800702e+4932F128 +#define __INTPTR_MAX__ 0x7fffffffffffffffL +#define linux 1 +#define __cpp_range_based_for 200907 +#define __FLT64_HAS_QUIET_NAN__ 1 +#define __FLT32_MIN_10_EXP__ (-37) +#define __SSE2__ 1 +#define __EXCEPTIONS 1 +#define __LDBL_MANT_DIG__ 64 +#define __DBL_HAS_QUIET_NAN__ 1 +#define __FLT64_HAS_INFINITY__ 1 +#define __FLT64X_MAX__ 1.18973149535723176502126385303097021e+4932F64x +#define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) +#define __code_model_small__ 1 +#define __cpp_return_type_deduction 201304 +#define __k8__ 1 +#define __INTPTR_TYPE__ long int +#define __UINT16_TYPE__ short unsigned int +#define __WCHAR_TYPE__ int +#define __SIZEOF_FLOAT__ 4 +#define __pic__ 2 +#define __UINTPTR_MAX__ 0xffffffffffffffffUL +#define __INT_FAST64_WIDTH__ 64 +#define __DEC64_MIN_EXP__ (-382) +#define __cpp_decltype 200707 +#define __FLT32_DECIMAL_DIG__ 9 +#define __INT_FAST64_MAX__ 0x7fffffffffffffffL +#define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1 +#define __FLT_DIG__ 6 +#define __FLT64X_MAX_EXP__ 16384 +#define __UINT_FAST64_TYPE__ long unsigned int +#define __INT_MAX__ 0x7fffffff +#define __amd64__ 1 +#define __INT64_TYPE__ long int +#define __FLT_MAX_EXP__ 128 +#define __ORDER_BIG_ENDIAN__ 4321 +#define __DBL_MANT_DIG__ 53 +#define __cpp_inheriting_constructors 201511 +#define __SIZEOF_FLOAT128__ 16 +#define __INT_LEAST64_MAX__ 0x7fffffffffffffffL +#define __DEC64_MIN__ 1E-383DD +#define __WINT_TYPE__ unsigned int +#define __UINT_LEAST32_TYPE__ unsigned int +#define __SIZEOF_SHORT__ 2 +#define __SSE__ 1 +#define __LDBL_MIN_EXP__ (-16381) +#define __FLT64_MAX__ 1.79769313486231570814527423731704357e+308F64 +#define __WINT_WIDTH__ 32 +#define __INT_LEAST8_MAX__ 0x7f +#define __FLT32X_MAX_10_EXP__ 308 +#define __SIZEOF_INT128__ 16 +#define __LDBL_MAX_10_EXP__ 4932 +#define __ATOMIC_RELAXED 0 +#define __DBL_EPSILON__ double(2.22044604925031308084726333618164062e-16L) +#define __FLT128_MIN__ 3.36210314311209350626267781732175260e-4932F128 +#define _LP64 1 +#define __UINT8_C(c) c +#define __FLT64_MAX_EXP__ 1024 +#define __INT_LEAST32_TYPE__ int +#define __SIZEOF_WCHAR_T__ 4 +#define __FLT128_HAS_QUIET_NAN__ 1 +#define __INT_FAST8_TYPE__ signed char +#define __FLT64X_MIN__ 3.36210314311209350626267781732175260e-4932F64x +#define __GNUC_STDC_INLINE__ 1 +#define __FLT64_HAS_DENORM__ 1 +#define __FLT32_EPSILON__ 1.19209289550781250000000000000000000e-7F32 +#define __DBL_DECIMAL_DIG__ 17 +#define __STDC_UTF_32__ 1 +#define __INT_FAST8_WIDTH__ 8 +#define __FXSR__ 1 +#define __DEC_EVAL_METHOD__ 2 +#define __FLT32X_MAX__ 1.79769313486231570814527423731704357e+308F32x +#define __cpp_runtime_arrays 198712 +#define __UINT64_TYPE__ long unsigned int +#define __UINT32_C(c) c ## U +#define __INTMAX_MAX__ 0x7fffffffffffffffL +#define __cpp_alias_templates 200704 +#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__ +#define __FLT_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F +#define __INT8_MAX__ 0x7f +#define __LONG_WIDTH__ 64 +#define __PIC__ 2 +#define __UINT_FAST32_TYPE__ long unsigned int +#define __CHAR32_TYPE__ unsigned int +#define __FLT_MAX__ 3.40282346638528859811704183484516925e+38F +#define __cpp_constexpr 201304 +#define __INT32_TYPE__ int +#define __SIZEOF_DOUBLE__ 8 +#define __cpp_exceptions 199711 +#define __FLT_MIN_10_EXP__ (-37) +#define __FLT64_MIN__ 2.22507385850720138309023271733240406e-308F64 +#define __INT_LEAST32_WIDTH__ 32 +#define __INTMAX_TYPE__ long int +#define __DEC128_MAX_EXP__ 6145 +#define __FLT32X_HAS_QUIET_NAN__ 1 +#define __ATOMIC_CONSUME 1 +#define __GNUC_MINOR__ 5 +#define __GLIBCXX_TYPE_INT_N_0 __int128 +#define __INT_FAST16_WIDTH__ 64 +#define __UINTMAX_MAX__ 0xffffffffffffffffUL +#define __DEC32_MANT_DIG__ 7 +#define __FLT32X_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F32x +#define __DBL_MAX_10_EXP__ 308 +#define __LDBL_DENORM_MIN__ 3.64519953188247460252840593361941982e-4951L +#define __INT16_C(c) c +#define __cpp_generic_lambdas 201304 +#define __STDC__ 1 +#define __FLT32X_DIG__ 15 +#define __PTRDIFF_TYPE__ long int +#define __ATOMIC_SEQ_CST 5 +#define __UINT32_TYPE__ unsigned int +#define __FLT32X_MIN_10_EXP__ (-307) +#define __UINTPTR_TYPE__ long unsigned int +#define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD +#define __DEC128_MANT_DIG__ 34 +#define __LDBL_MIN_10_EXP__ (-4931) +#define __FLT128_EPSILON__ 1.92592994438723585305597794258492732e-34F128 +#define __SSE_MATH__ 1 +#define __SIZEOF_LONG_LONG__ 8 +#define __cpp_user_defined_literals 200809 +#define __FLT128_DECIMAL_DIG__ 36 +#define __GCC_ATOMIC_LLONG_LOCK_FREE 2 +#define __FLT32X_MIN__ 2.22507385850720138309023271733240406e-308F32x +#define __LDBL_DIG__ 18 +#define __FLT_DECIMAL_DIG__ 9 +#define __UINT_FAST16_MAX__ 0xffffffffffffffffUL +#define __GCC_ATOMIC_SHORT_LOCK_FREE 2 +#define __INT_LEAST64_WIDTH__ 64 +#define __UINT_FAST8_TYPE__ unsigned char +#define _GNU_SOURCE 1 +#define __cpp_init_captures 201304 +#define __ATOMIC_ACQ_REL 4 +#define __ATOMIC_RELEASE 3 diff --git a/moc_thread.cpp b/moc_thread.cpp new file mode 100644 index 0000000..5d3a66b --- /dev/null +++ b/moc_thread.cpp @@ -0,0 +1,256 @@ +/**************************************************************************** +** Meta object code from reading C++ file 'thread.h' +** +** Created by: The Qt Meta Object Compiler version 67 (Qt 5.9.5) +** +** WARNING! All changes made in this file will be lost! +*****************************************************************************/ + +#include "thread.h" +#include +#include +#if !defined(Q_MOC_OUTPUT_REVISION) +#error "The header file 'thread.h' doesn't include ." +#elif Q_MOC_OUTPUT_REVISION != 67 +#error "This file was generated using the moc from 5.9.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 +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED +struct qt_meta_stringdata_SendThread_t { + QByteArrayData data[11]; + char stringdata0[107]; +}; +#define QT_MOC_LITERAL(idx, ofs, len) \ + Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ + qptrdiff(offsetof(qt_meta_stringdata_SendThread_t, stringdata0) + ofs \ + - idx * sizeof(QByteArrayData)) \ + ) +static const qt_meta_stringdata_SendThread_t qt_meta_stringdata_SendThread = { + { +QT_MOC_LITERAL(0, 0, 10), // "SendThread" +QT_MOC_LITERAL(1, 11, 15), // "send_valve_data" +QT_MOC_LITERAL(2, 27, 0), // "" +QT_MOC_LITERAL(3, 28, 8), // "uint8_t*" +QT_MOC_LITERAL(4, 37, 9), // "spec_mask" +QT_MOC_LITERAL(5, 47, 18), // "send_to_up_machine" +QT_MOC_LITERAL(6, 66, 6), // "float*" +QT_MOC_LITERAL(7, 73, 9), // "send_mask" +QT_MOC_LITERAL(8, 83, 5), // "char*" +QT_MOC_LITERAL(9, 89, 3), // "buf" +QT_MOC_LITERAL(10, 93, 13) // "send_mask_rgb" + + }, + "SendThread\0send_valve_data\0\0uint8_t*\0" + "spec_mask\0send_to_up_machine\0float*\0" + "send_mask\0char*\0buf\0send_mask_rgb" +}; +#undef QT_MOC_LITERAL + +static const uint qt_meta_data_SendThread[] = { + + // content: + 7, // revision + 0, // classname + 0, 0, // classinfo + 4, 14, // methods + 0, 0, // properties + 0, 0, // enums/sets + 0, 0, // constructors + 0, // flags + 4, // signalCount + + // signals: name, argc, parameters, tag, flags + 1, 1, 34, 2, 0x06 /* Public */, + 5, 1, 37, 2, 0x06 /* Public */, + 7, 1, 40, 2, 0x06 /* Public */, + 10, 1, 43, 2, 0x06 /* Public */, + + // signals: parameters + QMetaType::Void, 0x80000000 | 3, 4, + QMetaType::Void, 0x80000000 | 6, 2, + QMetaType::Void, 0x80000000 | 8, 9, + QMetaType::Void, 0x80000000 | 8, 9, + + 0 // eod +}; + +void SendThread::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) +{ + if (_c == QMetaObject::InvokeMetaMethod) { + SendThread *_t = static_cast(_o); + Q_UNUSED(_t) + switch (_id) { + case 0: _t->send_valve_data((*reinterpret_cast< uint8_t*(*)>(_a[1]))); break; + case 1: _t->send_to_up_machine((*reinterpret_cast< float*(*)>(_a[1]))); break; + case 2: _t->send_mask((*reinterpret_cast< char*(*)>(_a[1]))); break; + case 3: _t->send_mask_rgb((*reinterpret_cast< char*(*)>(_a[1]))); break; + default: ; + } + } else if (_c == QMetaObject::IndexOfMethod) { + int *result = reinterpret_cast(_a[0]); + { + typedef void (SendThread::*_t)(uint8_t * ); + if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&SendThread::send_valve_data)) { + *result = 0; + return; + } + } + { + typedef void (SendThread::*_t)(float * ); + if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&SendThread::send_to_up_machine)) { + *result = 1; + return; + } + } + { + typedef void (SendThread::*_t)(char * ); + if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&SendThread::send_mask)) { + *result = 2; + return; + } + } + { + typedef void (SendThread::*_t)(char * ); + if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&SendThread::send_mask_rgb)) { + *result = 3; + return; + } + } + } +} + +const QMetaObject SendThread::staticMetaObject = { + { &QThread::staticMetaObject, qt_meta_stringdata_SendThread.data, + qt_meta_data_SendThread, qt_static_metacall, nullptr, nullptr} +}; + + +const QMetaObject *SendThread::metaObject() const +{ + return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; +} + +void *SendThread::qt_metacast(const char *_clname) +{ + if (!_clname) return nullptr; + if (!strcmp(_clname, qt_meta_stringdata_SendThread.stringdata0)) + return static_cast(this); + return QThread::qt_metacast(_clname); +} + +int SendThread::qt_metacall(QMetaObject::Call _c, int _id, void **_a) +{ + _id = QThread::qt_metacall(_c, _id, _a); + if (_id < 0) + return _id; + if (_c == QMetaObject::InvokeMetaMethod) { + if (_id < 4) + qt_static_metacall(this, _c, _id, _a); + _id -= 4; + } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { + if (_id < 4) + *reinterpret_cast(_a[0]) = -1; + _id -= 4; + } + return _id; +} + +// SIGNAL 0 +void SendThread::send_valve_data(uint8_t * _t1) +{ + void *_a[] = { nullptr, const_cast(reinterpret_cast(&_t1)) }; + QMetaObject::activate(this, &staticMetaObject, 0, _a); +} + +// SIGNAL 1 +void SendThread::send_to_up_machine(float * _t1) +{ + void *_a[] = { nullptr, const_cast(reinterpret_cast(&_t1)) }; + QMetaObject::activate(this, &staticMetaObject, 1, _a); +} + +// SIGNAL 2 +void SendThread::send_mask(char * _t1) +{ + void *_a[] = { nullptr, const_cast(reinterpret_cast(&_t1)) }; + QMetaObject::activate(this, &staticMetaObject, 2, _a); +} + +// SIGNAL 3 +void SendThread::send_mask_rgb(char * _t1) +{ + void *_a[] = { nullptr, const_cast(reinterpret_cast(&_t1)) }; + QMetaObject::activate(this, &staticMetaObject, 3, _a); +} +struct qt_meta_stringdata_SaveThread_t { + QByteArrayData data[1]; + char stringdata0[11]; +}; +#define QT_MOC_LITERAL(idx, ofs, len) \ + Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ + qptrdiff(offsetof(qt_meta_stringdata_SaveThread_t, stringdata0) + ofs \ + - idx * sizeof(QByteArrayData)) \ + ) +static const qt_meta_stringdata_SaveThread_t qt_meta_stringdata_SaveThread = { + { +QT_MOC_LITERAL(0, 0, 10) // "SaveThread" + + }, + "SaveThread" +}; +#undef QT_MOC_LITERAL + +static const uint qt_meta_data_SaveThread[] = { + + // content: + 7, // 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 +}; + +void SaveThread::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 QMetaObject SaveThread::staticMetaObject = { + { &QThread::staticMetaObject, qt_meta_stringdata_SaveThread.data, + qt_meta_data_SaveThread, qt_static_metacall, nullptr, nullptr} +}; + + +const QMetaObject *SaveThread::metaObject() const +{ + return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; +} + +void *SaveThread::qt_metacast(const char *_clname) +{ + if (!_clname) return nullptr; + if (!strcmp(_clname, qt_meta_stringdata_SaveThread.stringdata0)) + return static_cast(this); + return QThread::qt_metacast(_clname); +} + +int SaveThread::qt_metacall(QMetaObject::Call _c, int _id, void **_a) +{ + _id = QThread::qt_metacall(_c, _id, _a); + return _id; +} +QT_WARNING_POP +QT_END_MOC_NAMESPACE diff --git a/moc_widget.cpp b/moc_widget.cpp new file mode 100644 index 0000000..b914dd3 --- /dev/null +++ b/moc_widget.cpp @@ -0,0 +1,351 @@ +/**************************************************************************** +** Meta object code from reading C++ file 'widget.h' +** +** Created by: The Qt Meta Object Compiler version 67 (Qt 5.9.5) +** +** WARNING! All changes made in this file will be lost! +*****************************************************************************/ + +#include "widget.h" +#include +#include +#if !defined(Q_MOC_OUTPUT_REVISION) +#error "The header file 'widget.h' doesn't include ." +#elif Q_MOC_OUTPUT_REVISION != 67 +#error "This file was generated using the moc from 5.9.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 +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED +struct qt_meta_stringdata_Widget_t { + QByteArrayData data[60]; + char stringdata0[1156]; +}; +#define QT_MOC_LITERAL(idx, ofs, len) \ + Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ + qptrdiff(offsetof(qt_meta_stringdata_Widget_t, stringdata0) + ofs \ + - idx * sizeof(QByteArrayData)) \ + ) +static const qt_meta_stringdata_Widget_t qt_meta_stringdata_Widget = { + { +QT_MOC_LITERAL(0, 0, 6), // "Widget" +QT_MOC_LITERAL(1, 7, 8), // "get_data" +QT_MOC_LITERAL(2, 16, 0), // "" +QT_MOC_LITERAL(3, 17, 8), // "uint8_t*" +QT_MOC_LITERAL(4, 26, 4), // "buff" +QT_MOC_LITERAL(5, 31, 12), // "get_rgb_data" +QT_MOC_LITERAL(6, 44, 20), // "On_btn_start_clicked" +QT_MOC_LITERAL(7, 65, 19), // "On_btn_stop_clicked" +QT_MOC_LITERAL(8, 85, 20), // "On_btn_black_clicked" +QT_MOC_LITERAL(9, 106, 20), // "On_btn_white_clicked" +QT_MOC_LITERAL(10, 127, 22), // "On_btn_capture_clicked" +QT_MOC_LITERAL(11, 150, 8), // "get_mask" +QT_MOC_LITERAL(12, 159, 5), // "char*" +QT_MOC_LITERAL(13, 165, 7), // "get_buf" +QT_MOC_LITERAL(14, 173, 12), // "get_mask_rgb" +QT_MOC_LITERAL(15, 186, 14), // "get_valve_data" +QT_MOC_LITERAL(16, 201, 10), // "valve_data" +QT_MOC_LITERAL(17, 212, 22), // "get_send_to_up_machine" +QT_MOC_LITERAL(18, 235, 6), // "float*" +QT_MOC_LITERAL(19, 242, 7), // "sendbuf" +QT_MOC_LITERAL(20, 250, 19), // "readfrom_up_machine" +QT_MOC_LITERAL(21, 270, 22), // "readfrom_lower_machine" +QT_MOC_LITERAL(22, 293, 25), // "On_btn_sendsingle_clicked" +QT_MOC_LITERAL(23, 319, 23), // "On_btn_autosend_clicked" +QT_MOC_LITERAL(24, 343, 16), // "on_btn_1_clicked" +QT_MOC_LITERAL(25, 360, 16), // "on_btn_2_clicked" +QT_MOC_LITERAL(26, 377, 16), // "on_btn_3_clicked" +QT_MOC_LITERAL(27, 394, 16), // "on_btn_4_clicked" +QT_MOC_LITERAL(28, 411, 16), // "on_btn_5_clicked" +QT_MOC_LITERAL(29, 428, 16), // "on_btn_6_clicked" +QT_MOC_LITERAL(30, 445, 16), // "on_btn_7_clicked" +QT_MOC_LITERAL(31, 462, 16), // "on_btn_8_clicked" +QT_MOC_LITERAL(32, 479, 16), // "on_btn_9_clicked" +QT_MOC_LITERAL(33, 496, 16), // "on_btn_0_clicked" +QT_MOC_LITERAL(34, 513, 20), // "on_btn_clear_clicked" +QT_MOC_LITERAL(35, 534, 18), // "on_btn_del_clicked" +QT_MOC_LITERAL(36, 553, 21), // "on_btn_ensure_clicked" +QT_MOC_LITERAL(37, 575, 19), // "on_btn_back_clicked" +QT_MOC_LITERAL(38, 595, 24), // "on_btn_send_plus_clicked" +QT_MOC_LITERAL(39, 620, 23), // "on_btn_send_min_clicked" +QT_MOC_LITERAL(40, 644, 24), // "On_btn_threshold_clicked" +QT_MOC_LITERAL(41, 669, 24), // "on_btn_set_lower_clicked" +QT_MOC_LITERAL(42, 694, 25), // "on_btn_set_camera_clicked" +QT_MOC_LITERAL(43, 720, 18), // "on_btn_set_clicked" +QT_MOC_LITERAL(44, 739, 24), // "on_btn_rgb_white_clicked" +QT_MOC_LITERAL(45, 764, 24), // "on_btn_rgb_black_clicked" +QT_MOC_LITERAL(46, 789, 26), // "on_btn_save_enable_clicked" +QT_MOC_LITERAL(47, 816, 29), // "on_btn_save_disenable_clicked" +QT_MOC_LITERAL(48, 846, 28), // "on_btn_open_conveyor_clicked" +QT_MOC_LITERAL(49, 875, 29), // "on_btn_close_conveyor_clicked" +QT_MOC_LITERAL(50, 905, 24), // "on_btn_open_lamp_clicked" +QT_MOC_LITERAL(51, 930, 25), // "on_btn_close_lamp_clicked" +QT_MOC_LITERAL(52, 956, 21), // "on_btn_exit_2_clicked" +QT_MOC_LITERAL(53, 978, 21), // "on_btn_0to3_2_clicked" +QT_MOC_LITERAL(54, 1000, 31), // "on_btn_send_single_long_clicked" +QT_MOC_LITERAL(55, 1032, 29), // "on_btn_autosend_valve_clicked" +QT_MOC_LITERAL(56, 1062, 30), // "on_radioButton_manul_2_clicked" +QT_MOC_LITERAL(57, 1093, 7), // "checked" +QT_MOC_LITERAL(58, 1101, 28), // "on_radioButton_manul_clicked" +QT_MOC_LITERAL(59, 1130, 25) // "on_btn_lamp_reset_clicked" + + }, + "Widget\0get_data\0\0uint8_t*\0buff\0" + "get_rgb_data\0On_btn_start_clicked\0" + "On_btn_stop_clicked\0On_btn_black_clicked\0" + "On_btn_white_clicked\0On_btn_capture_clicked\0" + "get_mask\0char*\0get_buf\0get_mask_rgb\0" + "get_valve_data\0valve_data\0" + "get_send_to_up_machine\0float*\0sendbuf\0" + "readfrom_up_machine\0readfrom_lower_machine\0" + "On_btn_sendsingle_clicked\0" + "On_btn_autosend_clicked\0on_btn_1_clicked\0" + "on_btn_2_clicked\0on_btn_3_clicked\0" + "on_btn_4_clicked\0on_btn_5_clicked\0" + "on_btn_6_clicked\0on_btn_7_clicked\0" + "on_btn_8_clicked\0on_btn_9_clicked\0" + "on_btn_0_clicked\0on_btn_clear_clicked\0" + "on_btn_del_clicked\0on_btn_ensure_clicked\0" + "on_btn_back_clicked\0on_btn_send_plus_clicked\0" + "on_btn_send_min_clicked\0" + "On_btn_threshold_clicked\0" + "on_btn_set_lower_clicked\0" + "on_btn_set_camera_clicked\0on_btn_set_clicked\0" + "on_btn_rgb_white_clicked\0" + "on_btn_rgb_black_clicked\0" + "on_btn_save_enable_clicked\0" + "on_btn_save_disenable_clicked\0" + "on_btn_open_conveyor_clicked\0" + "on_btn_close_conveyor_clicked\0" + "on_btn_open_lamp_clicked\0" + "on_btn_close_lamp_clicked\0" + "on_btn_exit_2_clicked\0on_btn_0to3_2_clicked\0" + "on_btn_send_single_long_clicked\0" + "on_btn_autosend_valve_clicked\0" + "on_radioButton_manul_2_clicked\0checked\0" + "on_radioButton_manul_clicked\0" + "on_btn_lamp_reset_clicked" +}; +#undef QT_MOC_LITERAL + +static const uint qt_meta_data_Widget[] = { + + // content: + 7, // revision + 0, // classname + 0, 0, // classinfo + 50, 14, // methods + 0, 0, // properties + 0, 0, // enums/sets + 0, 0, // constructors + 0, // flags + 0, // signalCount + + // slots: name, argc, parameters, tag, flags + 1, 1, 264, 2, 0x08 /* Private */, + 5, 1, 267, 2, 0x08 /* Private */, + 6, 0, 270, 2, 0x08 /* Private */, + 7, 0, 271, 2, 0x08 /* Private */, + 8, 0, 272, 2, 0x08 /* Private */, + 9, 0, 273, 2, 0x08 /* Private */, + 10, 0, 274, 2, 0x08 /* Private */, + 11, 1, 275, 2, 0x08 /* Private */, + 14, 1, 278, 2, 0x08 /* Private */, + 15, 1, 281, 2, 0x08 /* Private */, + 17, 1, 284, 2, 0x08 /* Private */, + 20, 0, 287, 2, 0x08 /* Private */, + 21, 0, 288, 2, 0x08 /* Private */, + 22, 0, 289, 2, 0x08 /* Private */, + 23, 0, 290, 2, 0x08 /* Private */, + 24, 0, 291, 2, 0x08 /* Private */, + 25, 0, 292, 2, 0x08 /* Private */, + 26, 0, 293, 2, 0x08 /* Private */, + 27, 0, 294, 2, 0x08 /* Private */, + 28, 0, 295, 2, 0x08 /* Private */, + 29, 0, 296, 2, 0x08 /* Private */, + 30, 0, 297, 2, 0x08 /* Private */, + 31, 0, 298, 2, 0x08 /* Private */, + 32, 0, 299, 2, 0x08 /* Private */, + 33, 0, 300, 2, 0x08 /* Private */, + 34, 0, 301, 2, 0x08 /* Private */, + 35, 0, 302, 2, 0x08 /* Private */, + 36, 0, 303, 2, 0x08 /* Private */, + 37, 0, 304, 2, 0x08 /* Private */, + 38, 0, 305, 2, 0x08 /* Private */, + 39, 0, 306, 2, 0x08 /* Private */, + 40, 0, 307, 2, 0x08 /* Private */, + 41, 0, 308, 2, 0x08 /* Private */, + 42, 0, 309, 2, 0x08 /* Private */, + 43, 0, 310, 2, 0x08 /* Private */, + 44, 0, 311, 2, 0x08 /* Private */, + 45, 0, 312, 2, 0x08 /* Private */, + 46, 0, 313, 2, 0x08 /* Private */, + 47, 0, 314, 2, 0x08 /* Private */, + 48, 0, 315, 2, 0x08 /* Private */, + 49, 0, 316, 2, 0x08 /* Private */, + 50, 0, 317, 2, 0x08 /* Private */, + 51, 0, 318, 2, 0x08 /* Private */, + 52, 0, 319, 2, 0x08 /* Private */, + 53, 0, 320, 2, 0x08 /* Private */, + 54, 0, 321, 2, 0x08 /* Private */, + 55, 0, 322, 2, 0x08 /* Private */, + 56, 1, 323, 2, 0x08 /* Private */, + 58, 1, 326, 2, 0x08 /* Private */, + 59, 0, 329, 2, 0x08 /* Private */, + + // slots: parameters + QMetaType::Void, 0x80000000 | 3, 4, + QMetaType::Void, 0x80000000 | 3, 4, + QMetaType::Void, + QMetaType::Void, + QMetaType::Void, + QMetaType::Void, + QMetaType::Void, + QMetaType::Void, 0x80000000 | 12, 13, + QMetaType::Void, 0x80000000 | 12, 13, + QMetaType::Void, 0x80000000 | 3, 16, + QMetaType::Void, 0x80000000 | 18, 19, + QMetaType::Void, + QMetaType::Void, + QMetaType::Void, + QMetaType::Void, + QMetaType::Void, + QMetaType::Void, + QMetaType::Void, + QMetaType::Void, + QMetaType::Void, + QMetaType::Void, + QMetaType::Void, + QMetaType::Void, + QMetaType::Void, + QMetaType::Void, + QMetaType::Void, + QMetaType::Void, + QMetaType::Void, + QMetaType::Void, + QMetaType::Void, + QMetaType::Void, + QMetaType::Void, + QMetaType::Void, + QMetaType::Void, + QMetaType::Void, + QMetaType::Void, + QMetaType::Void, + QMetaType::Void, + QMetaType::Void, + QMetaType::Void, + QMetaType::Void, + QMetaType::Void, + QMetaType::Void, + QMetaType::Void, + QMetaType::Void, + QMetaType::Void, + QMetaType::Void, + QMetaType::Void, QMetaType::Bool, 57, + QMetaType::Void, QMetaType::Bool, 57, + QMetaType::Void, + + 0 // eod +}; + +void Widget::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) +{ + if (_c == QMetaObject::InvokeMetaMethod) { + Widget *_t = static_cast(_o); + Q_UNUSED(_t) + switch (_id) { + case 0: _t->get_data((*reinterpret_cast< uint8_t*(*)>(_a[1]))); break; + case 1: _t->get_rgb_data((*reinterpret_cast< uint8_t*(*)>(_a[1]))); break; + case 2: _t->On_btn_start_clicked(); break; + case 3: _t->On_btn_stop_clicked(); break; + case 4: _t->On_btn_black_clicked(); break; + case 5: _t->On_btn_white_clicked(); break; + case 6: _t->On_btn_capture_clicked(); break; + case 7: _t->get_mask((*reinterpret_cast< char*(*)>(_a[1]))); break; + case 8: _t->get_mask_rgb((*reinterpret_cast< char*(*)>(_a[1]))); break; + case 9: _t->get_valve_data((*reinterpret_cast< uint8_t*(*)>(_a[1]))); break; + case 10: _t->get_send_to_up_machine((*reinterpret_cast< float*(*)>(_a[1]))); break; + case 11: _t->readfrom_up_machine(); break; + case 12: _t->readfrom_lower_machine(); break; + case 13: _t->On_btn_sendsingle_clicked(); break; + case 14: _t->On_btn_autosend_clicked(); break; + case 15: _t->on_btn_1_clicked(); break; + case 16: _t->on_btn_2_clicked(); break; + case 17: _t->on_btn_3_clicked(); break; + case 18: _t->on_btn_4_clicked(); break; + case 19: _t->on_btn_5_clicked(); break; + case 20: _t->on_btn_6_clicked(); break; + case 21: _t->on_btn_7_clicked(); break; + case 22: _t->on_btn_8_clicked(); break; + case 23: _t->on_btn_9_clicked(); break; + case 24: _t->on_btn_0_clicked(); break; + case 25: _t->on_btn_clear_clicked(); break; + case 26: _t->on_btn_del_clicked(); break; + case 27: _t->on_btn_ensure_clicked(); break; + case 28: _t->on_btn_back_clicked(); break; + case 29: _t->on_btn_send_plus_clicked(); break; + case 30: _t->on_btn_send_min_clicked(); break; + case 31: _t->On_btn_threshold_clicked(); break; + case 32: _t->on_btn_set_lower_clicked(); break; + case 33: _t->on_btn_set_camera_clicked(); break; + case 34: _t->on_btn_set_clicked(); break; + case 35: _t->on_btn_rgb_white_clicked(); break; + case 36: _t->on_btn_rgb_black_clicked(); break; + case 37: _t->on_btn_save_enable_clicked(); break; + case 38: _t->on_btn_save_disenable_clicked(); break; + case 39: _t->on_btn_open_conveyor_clicked(); break; + case 40: _t->on_btn_close_conveyor_clicked(); break; + case 41: _t->on_btn_open_lamp_clicked(); break; + case 42: _t->on_btn_close_lamp_clicked(); break; + case 43: _t->on_btn_exit_2_clicked(); break; + case 44: _t->on_btn_0to3_2_clicked(); break; + case 45: _t->on_btn_send_single_long_clicked(); break; + case 46: _t->on_btn_autosend_valve_clicked(); break; + case 47: _t->on_radioButton_manul_2_clicked((*reinterpret_cast< bool(*)>(_a[1]))); break; + case 48: _t->on_radioButton_manul_clicked((*reinterpret_cast< bool(*)>(_a[1]))); break; + case 49: _t->on_btn_lamp_reset_clicked(); break; + default: ; + } + } +} + +const QMetaObject Widget::staticMetaObject = { + { &QWidget::staticMetaObject, qt_meta_stringdata_Widget.data, + qt_meta_data_Widget, qt_static_metacall, nullptr, nullptr} +}; + + +const QMetaObject *Widget::metaObject() const +{ + return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; +} + +void *Widget::qt_metacast(const char *_clname) +{ + if (!_clname) return nullptr; + if (!strcmp(_clname, qt_meta_stringdata_Widget.stringdata0)) + return static_cast(this); + return QWidget::qt_metacast(_clname); +} + +int Widget::qt_metacall(QMetaObject::Call _c, int _id, void **_a) +{ + _id = QWidget::qt_metacall(_c, _id, _a); + if (_id < 0) + return _id; + if (_c == QMetaObject::InvokeMetaMethod) { + if (_id < 50) + qt_static_metacall(this, _c, _id, _a); + _id -= 50; + } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { + if (_id < 50) + *reinterpret_cast(_a[0]) = -1; + _id -= 50; + } + return _id; +} +QT_WARNING_POP +QT_END_MOC_NAMESPACE diff --git a/parameter b/parameter index 054e552..f341246 100644 --- a/parameter +++ b/parameter @@ -8,6 +8,6 @@ 15 6 3,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,36 -4 -6 +8 +8 50 diff --git a/parameter.h b/parameter.h index 0764b2a..74d5ae0 100644 --- a/parameter.h +++ b/parameter.h @@ -10,11 +10,15 @@ class Parameter{ public: QTime lamp_timer; + QTime work_timer; uint32_t lamp_used_time = 0; string password; - vector file_info = vector(2); + vector file_info = vector(3); uint32_t valve_cnt_vector[256] = {0}; QDateTime current_time; + QTime starttime; + QTime stoptime; + uint32_t runtime; }; diff --git a/sys_parameter b/sys_parameter index f2304a0..037f7c8 100644 --- a/sys_parameter +++ b/sys_parameter @@ -1,2 +1,3 @@ -151248 +4977848 100 +4977849 diff --git a/tobacco_v1_0 b/tobacco_v1_0 index e61a1b0..75a9782 100644 Binary files a/tobacco_v1_0 and b/tobacco_v1_0 differ diff --git a/tobacco_v1_0.pro.user b/tobacco_v1_0.pro.user index 157fb79..a021207 100644 --- a/tobacco_v1_0.pro.user +++ b/tobacco_v1_0.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId diff --git a/ui_widget.h b/ui_widget.h new file mode 100644 index 0000000..d080fe6 --- /dev/null +++ b/ui_widget.h @@ -0,0 +1,832 @@ +/******************************************************************************** +** Form generated from reading UI file 'widget.ui' +** +** Created by: Qt User Interface Compiler version 5.9.5 +** +** WARNING! All changes made in this file will be lost when recompiling UI file! +********************************************************************************/ + +#ifndef UI_WIDGET_H +#define UI_WIDGET_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Ui_Widget +{ +public: + QTabWidget *tabWidget; + QWidget *tab; + QLabel *lab_show_welcome; + QPushButton *btn_goto_sort; + QPushButton *btn_0to3; + QGroupBox *groupBox_8; + QLabel *label_2; + QLabel *lab_upmachine_isconnect_2; + QLabel *label; + QLabel *lab_lowermachine_isconnect; + QLabel *label_4; + QLabel *lab_plc_isconnect; + QLabel *label_6; + QLabel *lab_spec_isconnect; + QLabel *label_7; + QLabel *lab_rgb_isconnect; + QLabel *label_3; + QPushButton *btn_0to3_2; + QLabel *label_runtime; + QLabel *label_runtime_2; + QLabel *label_lamptime; + QLabel *label_runtime_4; + QLabel *label_runtime_5; + QWidget *tab_2; + QLabel *lab_raw_img; + QLabel *lab_mask_img; + QLabel *lab_show_rgb; + QLabel *lab_info; + QLabel *lab_show_img; + QGroupBox *groupBox_7; + QPushButton *btn_start; + QPushButton *btn_stop; + QPushButton *btn_rgb_white; + QPushButton *btn_rgb_black; + QPushButton *btn_white; + QPushButton *btn_black; + QPushButton *btn_1to2; + QPushButton *btn_1to0; + QPushButton *btn_open_conveyor; + QPushButton *btn_close_conveyor; + QPushButton *btn_open_lamp; + QPushButton *btn_close_lamp; + QLabel *label_5; + QLabel *lab_mask_img_2; + QWidget *tab_3; + QLabel *label_title_3; + QPushButton *btn_2to1; + QPushButton *btn_set; + QGroupBox *groupBox_3; + QLabel *label_explosure; + QDoubleSpinBox *spinbox_explosure; + QLabel *label_MROI; + QLabel *label_valid; + QLineEdit *lineEdit_VALID; + QLineEdit *lineEdit_MROI; + QPushButton *btn_set_camera; + QGroupBox *groupBox_4; + QSpinBox *spinbox_valve; + QSpinBox *spinbox_delaytime; + QLabel *label_encoder_2; + QLabel *label_encoder; + QSpinBox *spinbox_encoder; + QLabel *label_delaytime; + QPushButton *btn_set_lower; + QSpinBox *spinbox_padding; + QLabel *label_padding; + QLabel *label_delaytime_rgb; + QSpinBox *spinbox_delaytime_rgb; + QGroupBox *groupBox_5; + QLabel *label_R; + QSpinBox *spinbox_R; + QLabel *label_G; + QSpinBox *spinbox_G; + QLabel *label_B; + QSpinBox *spinbox_B; + QGroupBox *groupBox_6; + QLabel *label_threshold; + QSpinBox *spinbox_threshold; + QPushButton *btn_threshold_ok; + QLabel *label_threshold_rgb; + QSpinBox *spinbox_threshold_rgb; + QPushButton *btn_save_enable; + QPushButton *btn_save_disenable; + QPushButton *btn_load_calibration; + QPushButton *btn_capture; + QPushButton *btn_exit; + QPushButton *btn_exit_2; + QPushButton *btn_lamp_reset; + QWidget *tab_4; + QPushButton *btn_3to0; + QGroupBox *groupBox; + QLabel *label_explosure_2; + QPushButton *btn_send_single; + QSpinBox *spinBox_channel; + QPushButton *btn_send_plus; + QPushButton *btn_send_min; + QPushButton *btn_send_single_long; + QGroupBox *groupBox_2; + QLabel *label_explosure_3; + QLabel *label_valve_index; + QLabel *label_explosure_4; + QPushButton *btn_autosend_valve; + QLabel *label_title_4; + QGroupBox *groupBox_9; + QRadioButton *radioButton_manul; + QRadioButton *radioButton_manul_2; + QWidget *tab_5; + QLineEdit *line_password; + QPushButton *btn_1; + QPushButton *btn_2; + QPushButton *btn_3; + QPushButton *btn_4; + QPushButton *btn_5; + QPushButton *btn_6; + QPushButton *btn_7; + QPushButton *btn_8; + QPushButton *btn_9; + QPushButton *btn_0; + QPushButton *btn_del; + QPushButton *btn_ensure; + QPushButton *btn_clear; + QPushButton *btn_back; + + void setupUi(QWidget *Widget) + { + if (Widget->objectName().isEmpty()) + Widget->setObjectName(QStringLiteral("Widget")); + Widget->resize(1024, 768); + tabWidget = new QTabWidget(Widget); + tabWidget->setObjectName(QStringLiteral("tabWidget")); + tabWidget->setGeometry(QRect(0, 0, 1024, 768)); + tab = new QWidget(); + tab->setObjectName(QStringLiteral("tab")); + lab_show_welcome = new QLabel(tab); + lab_show_welcome->setObjectName(QStringLiteral("lab_show_welcome")); + lab_show_welcome->setGeometry(QRect(220, 120, 691, 81)); + QFont font; + font.setPointSize(36); + lab_show_welcome->setFont(font); + btn_goto_sort = new QPushButton(tab); + btn_goto_sort->setObjectName(QStringLiteral("btn_goto_sort")); + btn_goto_sort->setGeometry(QRect(150, 340, 181, 81)); + QFont font1; + font1.setPointSize(24); + btn_goto_sort->setFont(font1); + btn_0to3 = new QPushButton(tab); + btn_0to3->setObjectName(QStringLiteral("btn_0to3")); + btn_0to3->setGeometry(QRect(710, 340, 181, 81)); + btn_0to3->setFont(font1); + groupBox_8 = new QGroupBox(tab); + groupBox_8->setObjectName(QStringLiteral("groupBox_8")); + groupBox_8->setGeometry(QRect(220, 530, 551, 94)); + label_2 = new QLabel(groupBox_8); + label_2->setObjectName(QStringLiteral("label_2")); + label_2->setGeometry(QRect(0, 32, 100, 50)); + label_2->setMinimumSize(QSize(100, 50)); + label_2->setSizeIncrement(QSize(0, 0)); + label_2->setBaseSize(QSize(0, 0)); + QFont font2; + font2.setPointSize(14); + label_2->setFont(font2); + lab_upmachine_isconnect_2 = new QLabel(groupBox_8); + lab_upmachine_isconnect_2->setObjectName(QStringLiteral("lab_upmachine_isconnect_2")); + lab_upmachine_isconnect_2->setGeometry(QRect(80, 40, 31, 31)); + lab_upmachine_isconnect_2->setMinimumSize(QSize(31, 31)); + QFont font3; + font3.setPointSize(10); + lab_upmachine_isconnect_2->setFont(font3); + lab_upmachine_isconnect_2->setStyleSheet(QStringLiteral("background-color: rgb(237, 212, 0);")); + label = new QLabel(groupBox_8); + label->setObjectName(QStringLiteral("label")); + label->setGeometry(QRect(100, 32, 100, 50)); + label->setMinimumSize(QSize(100, 50)); + label->setSizeIncrement(QSize(0, 0)); + label->setBaseSize(QSize(0, 0)); + label->setFont(font2); + lab_lowermachine_isconnect = new QLabel(groupBox_8); + lab_lowermachine_isconnect->setObjectName(QStringLiteral("lab_lowermachine_isconnect")); + lab_lowermachine_isconnect->setGeometry(QRect(180, 40, 31, 31)); + lab_lowermachine_isconnect->setMinimumSize(QSize(31, 31)); + lab_lowermachine_isconnect->setFont(font3); + lab_lowermachine_isconnect->setStyleSheet(QStringLiteral("background-color: rgb(237, 212, 0);")); + label_4 = new QLabel(groupBox_8); + label_4->setObjectName(QStringLiteral("label_4")); + label_4->setGeometry(QRect(220, 32, 100, 50)); + label_4->setMinimumSize(QSize(100, 50)); + label_4->setSizeIncrement(QSize(0, 0)); + label_4->setBaseSize(QSize(0, 0)); + label_4->setFont(font2); + lab_plc_isconnect = new QLabel(groupBox_8); + lab_plc_isconnect->setObjectName(QStringLiteral("lab_plc_isconnect")); + lab_plc_isconnect->setGeometry(QRect(260, 40, 31, 31)); + lab_plc_isconnect->setMinimumSize(QSize(31, 31)); + lab_plc_isconnect->setFont(font3); + lab_plc_isconnect->setStyleSheet(QStringLiteral("background-color: rgb(237, 212, 0);")); + label_6 = new QLabel(groupBox_8); + label_6->setObjectName(QStringLiteral("label_6")); + label_6->setGeometry(QRect(300, 30, 100, 50)); + label_6->setMinimumSize(QSize(100, 50)); + label_6->setSizeIncrement(QSize(0, 0)); + label_6->setBaseSize(QSize(0, 0)); + label_6->setFont(font2); + lab_spec_isconnect = new QLabel(groupBox_8); + lab_spec_isconnect->setObjectName(QStringLiteral("lab_spec_isconnect")); + lab_spec_isconnect->setGeometry(QRect(385, 40, 31, 31)); + lab_spec_isconnect->setMinimumSize(QSize(31, 31)); + lab_spec_isconnect->setFont(font3); + lab_spec_isconnect->setStyleSheet(QStringLiteral("background-color: rgb(237, 212, 0);")); + label_7 = new QLabel(groupBox_8); + label_7->setObjectName(QStringLiteral("label_7")); + label_7->setGeometry(QRect(420, 30, 100, 50)); + label_7->setMinimumSize(QSize(100, 50)); + label_7->setSizeIncrement(QSize(0, 0)); + label_7->setBaseSize(QSize(0, 0)); + label_7->setFont(font2); + lab_rgb_isconnect = new QLabel(groupBox_8); + lab_rgb_isconnect->setObjectName(QStringLiteral("lab_rgb_isconnect")); + lab_rgb_isconnect->setGeometry(QRect(505, 40, 31, 31)); + lab_rgb_isconnect->setMinimumSize(QSize(31, 31)); + lab_rgb_isconnect->setFont(font3); + lab_rgb_isconnect->setStyleSheet(QStringLiteral("background-color: rgb(237, 212, 0);")); + label_3 = new QLabel(tab); + label_3->setObjectName(QStringLiteral("label_3")); + label_3->setGeometry(QRect(20, 60, 191, 191)); + label_3->setPixmap(QPixmap(QString::fromUtf8("image/njfu.jpg"))); + btn_0to3_2 = new QPushButton(tab); + btn_0to3_2->setObjectName(QStringLiteral("btn_0to3_2")); + btn_0to3_2->setGeometry(QRect(830, 560, 121, 51)); + btn_0to3_2->setFont(font2); + label_runtime = new QLabel(tab); + label_runtime->setObjectName(QStringLiteral("label_runtime")); + label_runtime->setGeometry(QRect(800, 650, 111, 50)); + label_runtime->setMinimumSize(QSize(100, 50)); + label_runtime->setSizeIncrement(QSize(0, 0)); + label_runtime->setBaseSize(QSize(0, 0)); + label_runtime->setFont(font2); + label_runtime_2 = new QLabel(tab); + label_runtime_2->setObjectName(QStringLiteral("label_runtime_2")); + label_runtime_2->setGeometry(QRect(920, 650, 100, 50)); + label_runtime_2->setMinimumSize(QSize(100, 50)); + label_runtime_2->setSizeIncrement(QSize(0, 0)); + label_runtime_2->setBaseSize(QSize(0, 0)); + label_runtime_2->setFont(font2); + label_lamptime = new QLabel(tab); + label_lamptime->setObjectName(QStringLiteral("label_lamptime")); + label_lamptime->setGeometry(QRect(520, 650, 111, 50)); + label_lamptime->setMinimumSize(QSize(100, 50)); + label_lamptime->setSizeIncrement(QSize(0, 0)); + label_lamptime->setBaseSize(QSize(0, 0)); + label_lamptime->setFont(font2); + label_runtime_4 = new QLabel(tab); + label_runtime_4->setObjectName(QStringLiteral("label_runtime_4")); + label_runtime_4->setGeometry(QRect(640, 650, 100, 50)); + label_runtime_4->setMinimumSize(QSize(100, 50)); + label_runtime_4->setSizeIncrement(QSize(0, 0)); + label_runtime_4->setBaseSize(QSize(0, 0)); + label_runtime_4->setFont(font2); + label_runtime_5 = new QLabel(tab); + label_runtime_5->setObjectName(QStringLiteral("label_runtime_5")); + label_runtime_5->setGeometry(QRect(440, 650, 100, 50)); + label_runtime_5->setMinimumSize(QSize(100, 50)); + label_runtime_5->setSizeIncrement(QSize(0, 0)); + label_runtime_5->setBaseSize(QSize(0, 0)); + label_runtime_5->setFont(font2); + tabWidget->addTab(tab, QString()); + tab_2 = new QWidget(); + tab_2->setObjectName(QStringLiteral("tab_2")); + lab_raw_img = new QLabel(tab_2); + lab_raw_img->setObjectName(QStringLiteral("lab_raw_img")); + lab_raw_img->setGeometry(QRect(310, 220, 111, 31)); + lab_raw_img->setFont(font2); + lab_raw_img->setCursor(QCursor(Qt::UpArrowCursor)); + lab_raw_img->setStyleSheet(QStringLiteral("color: rgb(52, 101, 164);")); + lab_raw_img->setAlignment(Qt::AlignCenter); + lab_mask_img = new QLabel(tab_2); + lab_mask_img->setObjectName(QStringLiteral("lab_mask_img")); + lab_mask_img->setGeometry(QRect(310, 450, 101, 31)); + lab_mask_img->setFont(font2); + lab_mask_img->setCursor(QCursor(Qt::UpArrowCursor)); + lab_mask_img->setStyleSheet(QStringLiteral("color: rgb(52, 101, 164);")); + lab_mask_img->setAlignment(Qt::AlignCenter); + lab_show_rgb = new QLabel(tab_2); + lab_show_rgb->setObjectName(QStringLiteral("lab_show_rgb")); + lab_show_rgb->setGeometry(QRect(10, 490, 700, 175)); + lab_show_rgb->setStyleSheet(QStringLiteral("background-color: rgb(238, 238, 236);")); + lab_info = new QLabel(tab_2); + lab_info->setObjectName(QStringLiteral("lab_info")); + lab_info->setGeometry(QRect(570, 690, 131, 31)); + lab_info->setFont(font3); + lab_show_img = new QLabel(tab_2); + lab_show_img->setObjectName(QStringLiteral("lab_show_img")); + lab_show_img->setGeometry(QRect(10, 260, 700, 175)); + lab_show_img->setStyleSheet(QStringLiteral("background-color: rgb(238, 238, 236);")); + groupBox_7 = new QGroupBox(tab_2); + groupBox_7->setObjectName(QStringLiteral("groupBox_7")); + groupBox_7->setGeometry(QRect(710, 160, 301, 531)); + QFont font4; + font4.setPointSize(20); + groupBox_7->setFont(font4); + btn_start = new QPushButton(groupBox_7); + btn_start->setObjectName(QStringLiteral("btn_start")); + btn_start->setGeometry(QRect(10, 50, 130, 50)); + btn_start->setFont(font4); + btn_start->setStyleSheet(QStringLiteral("background-color: rgb(115, 210, 22);")); + btn_stop = new QPushButton(groupBox_7); + btn_stop->setObjectName(QStringLiteral("btn_stop")); + btn_stop->setGeometry(QRect(160, 50, 130, 50)); + btn_stop->setFont(font4); + btn_stop->setStyleSheet(QStringLiteral("background-color: rgb(245, 121, 0);")); + btn_rgb_white = new QPushButton(groupBox_7); + btn_rgb_white->setObjectName(QStringLiteral("btn_rgb_white")); + btn_rgb_white->setGeometry(QRect(160, 150, 130, 50)); + btn_rgb_white->setFont(font4); + btn_rgb_black = new QPushButton(groupBox_7); + btn_rgb_black->setObjectName(QStringLiteral("btn_rgb_black")); + btn_rgb_black->setGeometry(QRect(10, 150, 130, 50)); + btn_rgb_black->setFont(font4); + btn_white = new QPushButton(groupBox_7); + btn_white->setObjectName(QStringLiteral("btn_white")); + btn_white->setGeometry(QRect(160, 220, 130, 50)); + btn_white->setFont(font4); + btn_black = new QPushButton(groupBox_7); + btn_black->setObjectName(QStringLiteral("btn_black")); + btn_black->setGeometry(QRect(10, 220, 130, 50)); + btn_black->setFont(font4); + btn_1to2 = new QPushButton(groupBox_7); + btn_1to2->setObjectName(QStringLiteral("btn_1to2")); + btn_1to2->setGeometry(QRect(10, 460, 130, 50)); + btn_1to2->setFont(font4); + btn_1to0 = new QPushButton(groupBox_7); + btn_1to0->setObjectName(QStringLiteral("btn_1to0")); + btn_1to0->setGeometry(QRect(160, 460, 130, 50)); + btn_1to0->setFont(font4); + btn_open_conveyor = new QPushButton(groupBox_7); + btn_open_conveyor->setObjectName(QStringLiteral("btn_open_conveyor")); + btn_open_conveyor->setGeometry(QRect(10, 320, 130, 50)); + btn_open_conveyor->setFont(font4); + btn_close_conveyor = new QPushButton(groupBox_7); + btn_close_conveyor->setObjectName(QStringLiteral("btn_close_conveyor")); + btn_close_conveyor->setGeometry(QRect(160, 320, 130, 50)); + btn_close_conveyor->setFont(font4); + btn_open_lamp = new QPushButton(groupBox_7); + btn_open_lamp->setObjectName(QStringLiteral("btn_open_lamp")); + btn_open_lamp->setGeometry(QRect(10, 390, 130, 50)); + btn_open_lamp->setFont(font4); + btn_close_lamp = new QPushButton(groupBox_7); + btn_close_lamp->setObjectName(QStringLiteral("btn_close_lamp")); + btn_close_lamp->setGeometry(QRect(160, 390, 130, 50)); + btn_close_lamp->setFont(font4); + label_5 = new QLabel(tab_2); + label_5->setObjectName(QStringLiteral("label_5")); + label_5->setGeometry(QRect(10, 10, 191, 190)); + label_5->setMinimumSize(QSize(0, 190)); + label_5->setPixmap(QPixmap(QString::fromUtf8("image/njfu.jpg"))); + lab_mask_img_2 = new QLabel(tab_2); + lab_mask_img_2->setObjectName(QStringLiteral("lab_mask_img_2")); + lab_mask_img_2->setGeometry(QRect(210, 90, 741, 41)); + lab_mask_img_2->setFont(font1); + lab_mask_img_2->setCursor(QCursor(Qt::UpArrowCursor)); + lab_mask_img_2->setStyleSheet(QStringLiteral("color: rgb(52, 101, 164);")); + lab_mask_img_2->setAlignment(Qt::AlignCenter); + tabWidget->addTab(tab_2, QString()); + tab_3 = new QWidget(); + tab_3->setObjectName(QStringLiteral("tab_3")); + label_title_3 = new QLabel(tab_3); + label_title_3->setObjectName(QStringLiteral("label_title_3")); + label_title_3->setGeometry(QRect(0, 0, 301, 71)); + QFont font5; + font5.setPointSize(28); + label_title_3->setFont(font5); + btn_2to1 = new QPushButton(tab_3); + btn_2to1->setObjectName(QStringLiteral("btn_2to1")); + btn_2to1->setGeometry(QRect(680, 500, 170, 70)); + btn_2to1->setFont(font); + btn_set = new QPushButton(tab_3); + btn_set->setObjectName(QStringLiteral("btn_set")); + btn_set->setGeometry(QRect(480, 500, 170, 70)); + btn_set->setFont(font4); + groupBox_3 = new QGroupBox(tab_3); + groupBox_3->setObjectName(QStringLiteral("groupBox_3")); + groupBox_3->setGeometry(QRect(10, 60, 401, 311)); + QFont font6; + font6.setPointSize(16); + groupBox_3->setFont(font6); + label_explosure = new QLabel(groupBox_3); + label_explosure->setObjectName(QStringLiteral("label_explosure")); + label_explosure->setGeometry(QRect(10, 20, 131, 81)); + label_explosure->setFont(font1); + spinbox_explosure = new QDoubleSpinBox(groupBox_3); + spinbox_explosure->setObjectName(QStringLiteral("spinbox_explosure")); + spinbox_explosure->setGeometry(QRect(160, 39, 120, 51)); + label_MROI = new QLabel(groupBox_3); + label_MROI->setObjectName(QStringLiteral("label_MROI")); + label_MROI->setGeometry(QRect(10, 100, 111, 81)); + label_MROI->setFont(font1); + label_valid = new QLabel(groupBox_3); + label_valid->setObjectName(QStringLiteral("label_valid")); + label_valid->setGeometry(QRect(10, 170, 141, 81)); + label_valid->setFont(font1); + lineEdit_VALID = new QLineEdit(groupBox_3); + lineEdit_VALID->setObjectName(QStringLiteral("lineEdit_VALID")); + lineEdit_VALID->setGeometry(QRect(160, 190, 231, 50)); + lineEdit_MROI = new QLineEdit(groupBox_3); + lineEdit_MROI->setObjectName(QStringLiteral("lineEdit_MROI")); + lineEdit_MROI->setGeometry(QRect(160, 120, 231, 51)); + btn_set_camera = new QPushButton(groupBox_3); + btn_set_camera->setObjectName(QStringLiteral("btn_set_camera")); + btn_set_camera->setGeometry(QRect(250, 250, 131, 51)); + btn_set_camera->setFont(font6); + groupBox_4 = new QGroupBox(tab_3); + groupBox_4->setObjectName(QStringLiteral("groupBox_4")); + groupBox_4->setGeometry(QRect(10, 370, 401, 321)); + groupBox_4->setFont(font6); + spinbox_valve = new QSpinBox(groupBox_4); + spinbox_valve->setObjectName(QStringLiteral("spinbox_valve")); + spinbox_valve->setGeometry(QRect(250, 200, 120, 41)); + spinbox_delaytime = new QSpinBox(groupBox_4); + spinbox_delaytime->setObjectName(QStringLiteral("spinbox_delaytime")); + spinbox_delaytime->setGeometry(QRect(250, 40, 120, 41)); + label_encoder_2 = new QLabel(groupBox_4); + label_encoder_2->setObjectName(QStringLiteral("label_encoder_2")); + label_encoder_2->setGeometry(QRect(20, 190, 191, 41)); + label_encoder_2->setFont(font1); + label_encoder = new QLabel(groupBox_4); + label_encoder->setObjectName(QStringLiteral("label_encoder")); + label_encoder->setGeometry(QRect(20, 140, 231, 41)); + label_encoder->setFont(font1); + spinbox_encoder = new QSpinBox(groupBox_4); + spinbox_encoder->setObjectName(QStringLiteral("spinbox_encoder")); + spinbox_encoder->setGeometry(QRect(250, 140, 120, 41)); + label_delaytime = new QLabel(groupBox_4); + label_delaytime->setObjectName(QStringLiteral("label_delaytime")); + label_delaytime->setGeometry(QRect(20, 40, 201, 41)); + label_delaytime->setFont(font1); + btn_set_lower = new QPushButton(groupBox_4); + btn_set_lower->setObjectName(QStringLiteral("btn_set_lower")); + btn_set_lower->setGeometry(QRect(250, 250, 121, 51)); + QFont font7; + font7.setPointSize(26); + btn_set_lower->setFont(font7); + spinbox_padding = new QSpinBox(groupBox_4); + spinbox_padding->setObjectName(QStringLiteral("spinbox_padding")); + spinbox_padding->setGeometry(QRect(150, 250, 81, 41)); + label_padding = new QLabel(groupBox_4); + label_padding->setObjectName(QStringLiteral("label_padding")); + label_padding->setGeometry(QRect(20, 250, 121, 41)); + label_padding->setFont(font1); + label_delaytime_rgb = new QLabel(groupBox_4); + label_delaytime_rgb->setObjectName(QStringLiteral("label_delaytime_rgb")); + label_delaytime_rgb->setGeometry(QRect(20, 90, 201, 41)); + label_delaytime_rgb->setFont(font1); + spinbox_delaytime_rgb = new QSpinBox(groupBox_4); + spinbox_delaytime_rgb->setObjectName(QStringLiteral("spinbox_delaytime_rgb")); + spinbox_delaytime_rgb->setGeometry(QRect(250, 90, 120, 41)); + groupBox_5 = new QGroupBox(tab_3); + groupBox_5->setObjectName(QStringLiteral("groupBox_5")); + groupBox_5->setGeometry(QRect(470, 40, 431, 91)); + groupBox_5->setFont(font6); + label_R = new QLabel(groupBox_5); + label_R->setObjectName(QStringLiteral("label_R")); + label_R->setGeometry(QRect(20, 50, 41, 31)); + label_R->setFont(font1); + spinbox_R = new QSpinBox(groupBox_5); + spinbox_R->setObjectName(QStringLiteral("spinbox_R")); + spinbox_R->setGeometry(QRect(50, 40, 81, 41)); + label_G = new QLabel(groupBox_5); + label_G->setObjectName(QStringLiteral("label_G")); + label_G->setGeometry(QRect(160, 50, 41, 31)); + label_G->setFont(font1); + spinbox_G = new QSpinBox(groupBox_5); + spinbox_G->setObjectName(QStringLiteral("spinbox_G")); + spinbox_G->setGeometry(QRect(190, 40, 81, 41)); + label_B = new QLabel(groupBox_5); + label_B->setObjectName(QStringLiteral("label_B")); + label_B->setGeometry(QRect(300, 50, 41, 31)); + label_B->setFont(font1); + spinbox_B = new QSpinBox(groupBox_5); + spinbox_B->setObjectName(QStringLiteral("spinbox_B")); + spinbox_B->setGeometry(QRect(330, 40, 81, 41)); + groupBox_6 = new QGroupBox(tab_3); + groupBox_6->setObjectName(QStringLiteral("groupBox_6")); + groupBox_6->setGeometry(QRect(470, 150, 431, 151)); + groupBox_6->setFont(font6); + label_threshold = new QLabel(groupBox_6); + label_threshold->setObjectName(QStringLiteral("label_threshold")); + label_threshold->setGeometry(QRect(10, 40, 131, 41)); + label_threshold->setFont(font1); + spinbox_threshold = new QSpinBox(groupBox_6); + spinbox_threshold->setObjectName(QStringLiteral("spinbox_threshold")); + spinbox_threshold->setGeometry(QRect(150, 40, 120, 41)); + btn_threshold_ok = new QPushButton(groupBox_6); + btn_threshold_ok->setObjectName(QStringLiteral("btn_threshold_ok")); + btn_threshold_ok->setGeometry(QRect(280, 100, 101, 41)); + btn_threshold_ok->setFont(font4); + label_threshold_rgb = new QLabel(groupBox_6); + label_threshold_rgb->setObjectName(QStringLiteral("label_threshold_rgb")); + label_threshold_rgb->setGeometry(QRect(10, 100, 131, 41)); + label_threshold_rgb->setFont(font1); + spinbox_threshold_rgb = new QSpinBox(groupBox_6); + spinbox_threshold_rgb->setObjectName(QStringLiteral("spinbox_threshold_rgb")); + spinbox_threshold_rgb->setGeometry(QRect(150, 100, 120, 41)); + btn_save_enable = new QPushButton(tab_3); + btn_save_enable->setObjectName(QStringLiteral("btn_save_enable")); + btn_save_enable->setGeometry(QRect(480, 330, 141, 61)); + btn_save_enable->setFont(font4); + btn_save_disenable = new QPushButton(tab_3); + btn_save_disenable->setObjectName(QStringLiteral("btn_save_disenable")); + btn_save_disenable->setGeometry(QRect(640, 330, 141, 61)); + btn_save_disenable->setFont(font4); + btn_load_calibration = new QPushButton(tab_3); + btn_load_calibration->setObjectName(QStringLiteral("btn_load_calibration")); + btn_load_calibration->setGeometry(QRect(480, 410, 130, 50)); + btn_load_calibration->setFont(font4); + btn_capture = new QPushButton(tab_3); + btn_capture->setObjectName(QStringLiteral("btn_capture")); + btn_capture->setGeometry(QRect(640, 410, 130, 50)); + btn_capture->setFont(font4); + btn_exit = new QPushButton(tab_3); + btn_exit->setObjectName(QStringLiteral("btn_exit")); + btn_exit->setGeometry(QRect(780, 620, 181, 81)); + btn_exit->setFont(font1); + btn_exit->setStyleSheet(QStringLiteral("background-color: rgb(239, 41, 41);")); + btn_exit_2 = new QPushButton(tab_3); + btn_exit_2->setObjectName(QStringLiteral("btn_exit_2")); + btn_exit_2->setGeometry(QRect(570, 620, 181, 81)); + btn_exit_2->setFont(font1); + btn_exit_2->setStyleSheet(QStringLiteral("background-color: rgb(245, 121, 0);")); + btn_lamp_reset = new QPushButton(tab_3); + btn_lamp_reset->setObjectName(QStringLiteral("btn_lamp_reset")); + btn_lamp_reset->setGeometry(QRect(800, 410, 130, 50)); + btn_lamp_reset->setFont(font4); + tabWidget->addTab(tab_3, QString()); + tab_4 = new QWidget(); + tab_4->setObjectName(QStringLiteral("tab_4")); + btn_3to0 = new QPushButton(tab_4); + btn_3to0->setObjectName(QStringLiteral("btn_3to0")); + btn_3to0->setGeometry(QRect(700, 440, 170, 70)); + btn_3to0->setFont(font); + groupBox = new QGroupBox(tab_4); + groupBox->setObjectName(QStringLiteral("groupBox")); + groupBox->setEnabled(true); + groupBox->setGeometry(QRect(80, 260, 551, 91)); + groupBox->setFont(font6); + label_explosure_2 = new QLabel(groupBox); + label_explosure_2->setObjectName(QStringLiteral("label_explosure_2")); + label_explosure_2->setGeometry(QRect(20, 40, 71, 41)); + label_explosure_2->setFont(font1); + btn_send_single = new QPushButton(groupBox); + btn_send_single->setObjectName(QStringLiteral("btn_send_single")); + btn_send_single->setGeometry(QRect(220, 40, 101, 41)); + btn_send_single->setFont(font4); + spinBox_channel = new QSpinBox(groupBox); + spinBox_channel->setObjectName(QStringLiteral("spinBox_channel")); + spinBox_channel->setGeometry(QRect(100, 40, 111, 41)); + btn_send_plus = new QPushButton(groupBox); + btn_send_plus->setObjectName(QStringLiteral("btn_send_plus")); + btn_send_plus->setGeometry(QRect(330, 40, 41, 41)); + btn_send_plus->setFont(font4); + btn_send_min = new QPushButton(groupBox); + btn_send_min->setObjectName(QStringLiteral("btn_send_min")); + btn_send_min->setGeometry(QRect(380, 40, 41, 41)); + btn_send_min->setFont(font4); + btn_send_single_long = new QPushButton(groupBox); + btn_send_single_long->setObjectName(QStringLiteral("btn_send_single_long")); + btn_send_single_long->setGeometry(QRect(430, 40, 101, 41)); + QFont font8; + font8.setPointSize(18); + btn_send_single_long->setFont(font8); + groupBox_2 = new QGroupBox(tab_4); + groupBox_2->setObjectName(QStringLiteral("groupBox_2")); + groupBox_2->setEnabled(false); + groupBox_2->setGeometry(QRect(80, 390, 541, 161)); + groupBox_2->setFont(font6); + label_explosure_3 = new QLabel(groupBox_2); + label_explosure_3->setObjectName(QStringLiteral("label_explosure_3")); + label_explosure_3->setGeometry(QRect(20, 40, 221, 41)); + label_explosure_3->setFont(font1); + label_valve_index = new QLabel(groupBox_2); + label_valve_index->setObjectName(QStringLiteral("label_valve_index")); + label_valve_index->setGeometry(QRect(170, 100, 67, 41)); + label_valve_index->setFont(font1); + label_explosure_4 = new QLabel(groupBox_2); + label_explosure_4->setObjectName(QStringLiteral("label_explosure_4")); + label_explosure_4->setGeometry(QRect(20, 100, 161, 41)); + label_explosure_4->setFont(font1); + btn_autosend_valve = new QPushButton(groupBox_2); + btn_autosend_valve->setObjectName(QStringLiteral("btn_autosend_valve")); + btn_autosend_valve->setEnabled(false); + btn_autosend_valve->setGeometry(QRect(250, 40, 101, 41)); + btn_autosend_valve->setFont(font4); + label_title_4 = new QLabel(tab_4); + label_title_4->setObjectName(QStringLiteral("label_title_4")); + label_title_4->setGeometry(QRect(90, 10, 301, 71)); + label_title_4->setFont(font); + groupBox_9 = new QGroupBox(tab_4); + groupBox_9->setObjectName(QStringLiteral("groupBox_9")); + groupBox_9->setGeometry(QRect(80, 100, 171, 111)); + groupBox_9->setFont(font6); + radioButton_manul = new QRadioButton(groupBox_9); + radioButton_manul->setObjectName(QStringLiteral("radioButton_manul")); + radioButton_manul->setGeometry(QRect(20, 40, 112, 23)); + radioButton_manul->setChecked(true); + radioButton_manul_2 = new QRadioButton(groupBox_9); + radioButton_manul_2->setObjectName(QStringLiteral("radioButton_manul_2")); + radioButton_manul_2->setGeometry(QRect(20, 80, 112, 23)); + radioButton_manul_2->setChecked(false); + tabWidget->addTab(tab_4, QString()); + tab_5 = new QWidget(); + tab_5->setObjectName(QStringLiteral("tab_5")); + line_password = new QLineEdit(tab_5); + line_password->setObjectName(QStringLiteral("line_password")); + line_password->setGeometry(QRect(380, 80, 261, 51)); + btn_1 = new QPushButton(tab_5); + btn_1->setObjectName(QStringLiteral("btn_1")); + btn_1->setGeometry(QRect(380, 150, 80, 80)); + btn_1->setFont(font5); + btn_2 = new QPushButton(tab_5); + btn_2->setObjectName(QStringLiteral("btn_2")); + btn_2->setGeometry(QRect(470, 150, 80, 80)); + btn_2->setFont(font5); + btn_3 = new QPushButton(tab_5); + btn_3->setObjectName(QStringLiteral("btn_3")); + btn_3->setGeometry(QRect(560, 150, 80, 80)); + btn_3->setFont(font5); + btn_4 = new QPushButton(tab_5); + btn_4->setObjectName(QStringLiteral("btn_4")); + btn_4->setGeometry(QRect(380, 240, 80, 80)); + btn_4->setFont(font5); + btn_5 = new QPushButton(tab_5); + btn_5->setObjectName(QStringLiteral("btn_5")); + btn_5->setGeometry(QRect(470, 240, 80, 80)); + btn_5->setFont(font5); + btn_6 = new QPushButton(tab_5); + btn_6->setObjectName(QStringLiteral("btn_6")); + btn_6->setGeometry(QRect(560, 240, 80, 80)); + btn_6->setFont(font5); + btn_7 = new QPushButton(tab_5); + btn_7->setObjectName(QStringLiteral("btn_7")); + btn_7->setGeometry(QRect(380, 330, 80, 80)); + btn_7->setFont(font5); + btn_8 = new QPushButton(tab_5); + btn_8->setObjectName(QStringLiteral("btn_8")); + btn_8->setGeometry(QRect(470, 330, 80, 80)); + btn_8->setFont(font5); + btn_9 = new QPushButton(tab_5); + btn_9->setObjectName(QStringLiteral("btn_9")); + btn_9->setGeometry(QRect(560, 330, 80, 80)); + btn_9->setFont(font5); + btn_0 = new QPushButton(tab_5); + btn_0->setObjectName(QStringLiteral("btn_0")); + btn_0->setGeometry(QRect(470, 420, 80, 80)); + btn_0->setFont(font5); + btn_del = new QPushButton(tab_5); + btn_del->setObjectName(QStringLiteral("btn_del")); + btn_del->setGeometry(QRect(560, 420, 80, 80)); + btn_del->setFont(font5); + btn_del->setStyleSheet(QStringLiteral("background-color: rgb(239, 41, 41);")); + btn_ensure = new QPushButton(tab_5); + btn_ensure->setObjectName(QStringLiteral("btn_ensure")); + btn_ensure->setGeometry(QRect(650, 330, 80, 80)); + btn_ensure->setFont(font5); + btn_ensure->setStyleSheet(QStringLiteral("background-color: rgb(115, 210, 22);")); + btn_clear = new QPushButton(tab_5); + btn_clear->setObjectName(QStringLiteral("btn_clear")); + btn_clear->setGeometry(QRect(380, 420, 80, 80)); + btn_clear->setFont(font5); + btn_back = new QPushButton(tab_5); + btn_back->setObjectName(QStringLiteral("btn_back")); + btn_back->setGeometry(QRect(650, 420, 80, 80)); + btn_back->setFont(font5); + btn_back->setStyleSheet(QStringLiteral("")); + tabWidget->addTab(tab_5, QString()); + + retranslateUi(Widget); + + tabWidget->setCurrentIndex(0); + + + QMetaObject::connectSlotsByName(Widget); + } // setupUi + + void retranslateUi(QWidget *Widget) + { + Widget->setWindowTitle(QApplication::translate("Widget", "Widget", Q_NULLPTR)); + lab_show_welcome->setText(QApplication::translate("Widget", "\346\254\242\350\277\216\344\275\277\347\224\250\347\203\237\346\242\227\345\274\202\347\211\251\346\231\272\350\203\275\345\210\206\351\200\211\347\263\273\347\273\237", Q_NULLPTR)); + btn_goto_sort->setText(QApplication::translate("Widget", "\350\277\233\345\205\245\345\210\206\351\200\211", Q_NULLPTR)); + btn_0to3->setText(QApplication::translate("Widget", "\345\226\267\351\230\200\346\265\213\350\257\225", Q_NULLPTR)); + groupBox_8->setTitle(QApplication::translate("Widget", "\350\277\236\346\216\245\347\212\266\346\200\201\357\274\232", Q_NULLPTR)); + label_2->setText(QApplication::translate("Widget", " \344\270\212\344\275\215\346\234\272:", Q_NULLPTR)); + lab_upmachine_isconnect_2->setText(QString()); + label->setText(QApplication::translate("Widget", " \344\270\213\344\275\215\346\234\272:", Q_NULLPTR)); + lab_lowermachine_isconnect->setText(QString()); + label_4->setText(QApplication::translate("Widget", "PLC:", Q_NULLPTR)); + lab_plc_isconnect->setText(QString()); + label_6->setText(QApplication::translate("Widget", "\345\205\211\350\260\261\347\233\270\346\234\272:", Q_NULLPTR)); + lab_spec_isconnect->setText(QString()); + label_7->setText(QApplication::translate("Widget", "\345\275\251\350\211\262\347\233\270\346\234\272:", Q_NULLPTR)); + lab_rgb_isconnect->setText(QString()); + label_3->setText(QString()); + btn_0to3_2->setText(QApplication::translate("Widget", "\351\207\215\346\226\260\350\277\236\346\216\245", Q_NULLPTR)); + label_runtime->setText(QString()); + label_runtime_2->setText(QApplication::translate("Widget", "\345\260\217\346\227\266", Q_NULLPTR)); + label_lamptime->setText(QString()); + label_runtime_4->setText(QApplication::translate("Widget", "\345\260\217\346\227\266", Q_NULLPTR)); + label_runtime_5->setText(QApplication::translate("Widget", "\345\205\211\346\272\220\357\274\232", Q_NULLPTR)); + tabWidget->setTabText(tabWidget->indexOf(tab), QApplication::translate("Widget", "Tab 1", Q_NULLPTR)); + lab_raw_img->setText(QApplication::translate("Widget", "\345\205\211\350\260\261\345\233\276\345\203\217", Q_NULLPTR)); + lab_mask_img->setText(QApplication::translate("Widget", "\345\275\251\350\211\262\345\233\276\345\203\217", Q_NULLPTR)); + lab_show_rgb->setText(QString()); + lab_info->setText(QString()); + lab_show_img->setText(QString()); + groupBox_7->setTitle(QApplication::translate("Widget", " \345\221\275\344\273\244\347\252\227\345\217\243", Q_NULLPTR)); + btn_start->setText(QApplication::translate("Widget", "\345\274\200\345\247\213\345\210\206\351\200\211", Q_NULLPTR)); + btn_stop->setText(QApplication::translate("Widget", "\345\201\234\346\255\242\345\210\206\351\200\211", Q_NULLPTR)); + btn_rgb_white->setText(QApplication::translate("Widget", "\345\275\251\350\211\262\347\231\275\345\234\272", Q_NULLPTR)); + btn_rgb_black->setText(QApplication::translate("Widget", "\345\275\251\350\211\262\351\273\221\345\234\272", Q_NULLPTR)); + btn_white->setText(QApplication::translate("Widget", "\345\205\211\350\260\261\347\231\275\345\234\272", Q_NULLPTR)); + btn_black->setText(QApplication::translate("Widget", "\345\205\211\350\260\261\351\273\221\345\234\272", Q_NULLPTR)); + btn_1to2->setText(QApplication::translate("Widget", "\345\217\202\346\225\260\350\256\276\347\275\256", Q_NULLPTR)); + btn_1to0->setText(QApplication::translate("Widget", "\350\277\224\345\233\236", Q_NULLPTR)); + btn_open_conveyor->setText(QApplication::translate("Widget", "\345\274\200\344\274\240\351\200\201\345\270\246", Q_NULLPTR)); + btn_close_conveyor->setText(QApplication::translate("Widget", "\345\205\263\344\274\240\351\200\201\345\270\246", Q_NULLPTR)); + btn_open_lamp->setText(QApplication::translate("Widget", "\345\274\200\345\220\257\345\205\211\346\272\220", Q_NULLPTR)); + btn_close_lamp->setText(QApplication::translate("Widget", "\345\205\263\351\227\255\345\205\211\346\272\220", Q_NULLPTR)); + label_5->setText(QString()); + lab_mask_img_2->setText(QApplication::translate("Widget", "\345\215\227\344\272\254\346\236\227\344\270\232\345\244\247\345\255\246\346\234\272\346\242\260\347\224\265\345\255\220\345\267\245\347\250\213\345\255\246\351\231\242\346\231\272\350\203\275\345\210\206\351\200\211\345\233\242\351\230\237\347\240\224\345\217\221", Q_NULLPTR)); + tabWidget->setTabText(tabWidget->indexOf(tab_2), QApplication::translate("Widget", "Tab 2", Q_NULLPTR)); + label_title_3->setText(QApplication::translate("Widget", "\345\217\202\346\225\260\350\256\276\347\275\256\347\225\214\351\235\242", Q_NULLPTR)); + btn_2to1->setText(QApplication::translate("Widget", "\350\277\224\345\233\236", Q_NULLPTR)); + btn_set->setText(QApplication::translate("Widget", "\344\277\235\345\255\230\351\205\215\347\275\256\346\226\207\344\273\266", Q_NULLPTR)); + groupBox_3->setTitle(QApplication::translate("Widget", "\347\233\270\346\234\272\345\217\202\346\225\260", Q_NULLPTR)); + label_explosure->setText(QApplication::translate("Widget", "\346\233\235\345\205\211\346\227\266\351\227\264", Q_NULLPTR)); + label_MROI->setText(QApplication::translate("Widget", "MROI", Q_NULLPTR)); + label_valid->setText(QApplication::translate("Widget", "\350\260\261\346\256\265\347\264\242\345\274\225", Q_NULLPTR)); + btn_set_camera->setText(QApplication::translate("Widget", "\344\277\235\345\255\230\345\220\216\350\257\267\351\207\215\345\220\257", Q_NULLPTR)); + groupBox_4->setTitle(QApplication::translate("Widget", "\344\270\213\344\275\215\346\234\272\345\217\202\346\225\260", Q_NULLPTR)); + label_encoder_2->setText(QApplication::translate("Widget", "\345\226\267\351\230\200\345\210\206\351\242\221\347\263\273\346\225\260", Q_NULLPTR)); + label_encoder->setText(QApplication::translate("Widget", "\347\274\226\347\240\201\345\231\250\345\210\206\351\242\221\347\263\273\346\225\260", Q_NULLPTR)); + label_delaytime->setText(QApplication::translate("Widget", "\345\205\211\350\260\261\345\273\266\346\227\266\346\227\266\351\227\264", Q_NULLPTR)); + btn_set_lower->setText(QApplication::translate("Widget", "\347\241\256\350\256\244", Q_NULLPTR)); + label_padding->setText(QApplication::translate("Widget", "padding", Q_NULLPTR)); + label_delaytime_rgb->setText(QApplication::translate("Widget", "RGB\345\273\266\346\227\266\346\227\266\351\227\264", Q_NULLPTR)); + groupBox_5->setTitle(QApplication::translate("Widget", "\345\275\251\350\211\262\345\233\276\345\203\217\346\230\276\347\244\272\350\260\261\346\256\265\350\256\276\347\275\256", Q_NULLPTR)); + label_R->setText(QApplication::translate("Widget", "R", Q_NULLPTR)); + label_G->setText(QApplication::translate("Widget", "G", Q_NULLPTR)); + label_B->setText(QApplication::translate("Widget", "B", Q_NULLPTR)); + groupBox_6->setTitle(QApplication::translate("Widget", "\346\250\241\345\236\213\345\217\202\346\225\260\350\256\276\347\275\256", Q_NULLPTR)); + label_threshold->setText(QApplication::translate("Widget", "\345\205\211\350\260\261\351\230\210\345\200\274", Q_NULLPTR)); + btn_threshold_ok->setText(QApplication::translate("Widget", "\347\241\256\350\256\244", Q_NULLPTR)); + label_threshold_rgb->setText(QApplication::translate("Widget", "\345\275\251\350\211\262\351\230\210\345\200\274", Q_NULLPTR)); + btn_save_enable->setText(QApplication::translate("Widget", "\344\277\235\345\255\230\345\233\276\347\211\207", Q_NULLPTR)); + btn_save_disenable->setText(QApplication::translate("Widget", "\344\270\215\344\277\235\345\255\230\345\233\276\347\211\207", Q_NULLPTR)); + btn_load_calibration->setText(QApplication::translate("Widget", "\345\212\240\350\275\275", Q_NULLPTR)); + btn_capture->setText(QApplication::translate("Widget", "\346\212\223\345\217\226\345\233\276\347\211\207", Q_NULLPTR)); + btn_exit->setText(QApplication::translate("Widget", "\345\205\263\346\234\272", Q_NULLPTR)); + btn_exit_2->setText(QApplication::translate("Widget", "\351\207\215\345\220\257", Q_NULLPTR)); + btn_lamp_reset->setText(QApplication::translate("Widget", "\345\205\211\346\272\220\346\270\205\351\233\266", Q_NULLPTR)); + tabWidget->setTabText(tabWidget->indexOf(tab_3), QApplication::translate("Widget", "Tab3", Q_NULLPTR)); + btn_3to0->setText(QApplication::translate("Widget", "\350\277\224\345\233\236", Q_NULLPTR)); + groupBox->setTitle(QApplication::translate("Widget", "\346\211\213\345\212\250\345\226\267\351\230\200\346\265\213\350\257\225", Q_NULLPTR)); + label_explosure_2->setText(QApplication::translate("Widget", "\351\200\232\351\201\223", Q_NULLPTR)); + btn_send_single->setText(QApplication::translate("Widget", "\346\265\213\350\257\225", Q_NULLPTR)); + btn_send_plus->setText(QApplication::translate("Widget", "+", Q_NULLPTR)); + btn_send_min->setText(QApplication::translate("Widget", "-", Q_NULLPTR)); + btn_send_single_long->setText(QApplication::translate("Widget", "\350\277\236\347\273\255\346\265\213\350\257\225", Q_NULLPTR)); + groupBox_2->setTitle(QApplication::translate("Widget", "\350\207\252\345\212\250\345\226\267\351\230\200\346\265\213\350\257\225", Q_NULLPTR)); + label_explosure_3->setText(QApplication::translate("Widget", "\346\211\200\346\234\211\351\200\232\351\201\2231-256", Q_NULLPTR)); + label_valve_index->setText(QApplication::translate("Widget", "1", Q_NULLPTR)); + label_explosure_4->setText(QApplication::translate("Widget", "\345\275\223\345\211\215\351\200\232\351\201\223\357\274\232", Q_NULLPTR)); + btn_autosend_valve->setText(QApplication::translate("Widget", "\346\265\213\350\257\225", Q_NULLPTR)); + label_title_4->setText(QApplication::translate("Widget", "\345\226\267\351\230\200\346\265\213\350\257\225\347\225\214\351\235\242", Q_NULLPTR)); + groupBox_9->setTitle(QApplication::translate("Widget", "\351\200\211\346\213\251\346\250\241\345\274\217", Q_NULLPTR)); + radioButton_manul->setText(QApplication::translate("Widget", "\346\211\213\345\212\250\346\250\241\345\274\217", Q_NULLPTR)); + radioButton_manul_2->setText(QApplication::translate("Widget", "\350\207\252\345\212\250\346\250\241\345\274\217", Q_NULLPTR)); + tabWidget->setTabText(tabWidget->indexOf(tab_4), QApplication::translate("Widget", "Tab4", Q_NULLPTR)); + btn_1->setText(QApplication::translate("Widget", "1", Q_NULLPTR)); + btn_2->setText(QApplication::translate("Widget", "2", Q_NULLPTR)); + btn_3->setText(QApplication::translate("Widget", "3", Q_NULLPTR)); + btn_4->setText(QApplication::translate("Widget", "4", Q_NULLPTR)); + btn_5->setText(QApplication::translate("Widget", "5", Q_NULLPTR)); + btn_6->setText(QApplication::translate("Widget", "6", Q_NULLPTR)); + btn_7->setText(QApplication::translate("Widget", "7", Q_NULLPTR)); + btn_8->setText(QApplication::translate("Widget", "8", Q_NULLPTR)); + btn_9->setText(QApplication::translate("Widget", "9", Q_NULLPTR)); + btn_0->setText(QApplication::translate("Widget", "0", Q_NULLPTR)); + btn_del->setText(QApplication::translate("Widget", "<\342\200\224", Q_NULLPTR)); + btn_ensure->setText(QApplication::translate("Widget", "\347\241\256\350\256\244", Q_NULLPTR)); + btn_clear->setText(QApplication::translate("Widget", "CLR", Q_NULLPTR)); + btn_back->setText(QApplication::translate("Widget", "\350\277\224\345\233\236", Q_NULLPTR)); + tabWidget->setTabText(tabWidget->indexOf(tab_5), QApplication::translate("Widget", "Tab5", Q_NULLPTR)); + } // retranslateUi + +}; + +namespace Ui { + class Widget: public Ui_Widget {}; +} // namespace Ui + +QT_END_NAMESPACE + +#endif // UI_WIDGET_H diff --git a/white b/white index e8111f9..781d661 100644 Binary files a/white and b/white differ diff --git a/widget.cpp b/widget.cpp index 4182a97..a6abfaf 100644 --- a/widget.cpp +++ b/widget.cpp @@ -302,8 +302,15 @@ void Widget::load_system_parameter() } fin.close(); parameter->lamp_used_time = std::stol(parameter->file_info[0]); + parameter->runtime = std::stol(parameter->file_info[2]); parameter->current_time = QDateTime::currentDateTime(); + int n = parameter->runtime / 3600; + ui->label_runtime->setNum(n); + n = parameter->lamp_used_time / 3600; + ui->label_lamptime->setNum(n); + + cout << ">>> load system parameter successfully! >>> " << endl; } @@ -529,6 +536,10 @@ void Widget::On_btn_start_clicked() /*记录时长开始*/ parameter->lamp_timer.start(); + parameter->work_timer.start(); + + +// parameter->starttime = QTime::currentTime(); camera->register_callback_acquisition(); @@ -590,19 +601,29 @@ void Widget::On_btn_stop_clicked() /*停止计时器记录时长*/ uint32_t time_elapsed = parameter->lamp_timer.elapsed() / 1000; + parameter->runtime += parameter->work_timer.elapsed() / 1000; parameter->lamp_used_time += time_elapsed; +// parameter->stoptime = QTime::currentTime(); + +// parameter->runtime += parameter->starttime.secsTo(parameter->stoptime); + camera->unregister_data_callback(); ui->lab_info->setText("停止"); cout << ">>> stop acquisition >>>" << endl; ui->btn_1to2->setEnabled(true); parameter->file_info[0] = to_string(parameter->lamp_used_time); + parameter->file_info[2] = to_string(parameter->runtime); ofstream fout; fout.open(sys_file, ios::out | ios::trunc); for(auto s : parameter->file_info) fout << s << endl; fout.close(); + + ui->label_runtime->setNum((int)(parameter->runtime / 3600)); + ui->label_lamptime->setNum((int)(parameter->lamp_used_time / 3600)); + // cout << "used time: " << parameter->file_info[0] << endl; ui->btn_start->setEnabled(true); ui->btn_stop->setEnabled(false); @@ -1535,3 +1556,16 @@ void Widget::on_radioButton_manul_clicked(bool checked) ui->groupBox->setEnabled(checked); ui->groupBox_2->setEnabled(!checked); } + +void Widget::on_btn_lamp_reset_clicked() +{ + parameter->lamp_used_time = 0; + parameter->file_info[0] = to_string(parameter->lamp_used_time); + parameter->file_info[2] = to_string(parameter->runtime); + ofstream fout; + fout.open(sys_file, ios::out | ios::trunc); + for(auto s : parameter->file_info) + fout << s << endl; + fout.close(); + ui->label_lamptime->setNum((int)parameter->lamp_used_time); +} diff --git a/widget.h b/widget.h index 7cb9b28..496cb97 100644 --- a/widget.h +++ b/widget.h @@ -181,6 +181,8 @@ private slots: void on_radioButton_manul_clicked(bool checked); + void on_btn_lamp_reset_clicked(); + private: Ui::Widget *ui; }; diff --git a/widget.ui b/widget.ui index 53d0aa3..9d4283e 100644 --- a/widget.ui +++ b/widget.ui @@ -23,7 +23,7 @@ - 3 + 0 @@ -445,6 +445,186 @@ 重新连接 + + + + 800 + 650 + 111 + 50 + + + + + 100 + 50 + + + + + 0 + 0 + + + + + 0 + 0 + + + + + 14 + + + + + + + + + + 920 + 650 + 100 + 50 + + + + + 100 + 50 + + + + + 0 + 0 + + + + + 0 + 0 + + + + + 14 + + + + 小时 + + + + + + 520 + 650 + 111 + 50 + + + + + 100 + 50 + + + + + 0 + 0 + + + + + 0 + 0 + + + + + 14 + + + + + + + + + + 640 + 650 + 100 + 50 + + + + + 100 + 50 + + + + + 0 + 0 + + + + + 0 + 0 + + + + + 14 + + + + 小时 + + + + + + 440 + 650 + 100 + 50 + + + + + 100 + 50 + + + + + 0 + 0 + + + + + 0 + 0 + + + + + 14 + + + + 光源: + + @@ -1506,6 +1686,24 @@ 重启 + + + + 800 + 410 + 130 + 50 + + + + + 20 + + + + 光源清零 + +