До трансляции message на ГУИ от Клиента

This commit is contained in:
krivoshein
2024-12-16 17:47:33 +03:00
parent b4e30429f7
commit e393244bf7
60 changed files with 877 additions and 551 deletions

Binary file not shown.

View File

@@ -26,3 +26,85 @@
15 46 0 D:/LMS/ServerLMS/Debug64/ServerLMS_autogen/mocs_compilation.cpp a1ba014d73005738
63 116 7556089587835465 ServerLMS_autogen/EWIEGA46WW/qrc_resources.cpp 9bce64f5ef0262e2
62 2260 7557935707531126 CMakeFiles/ServerLMS.dir/Systems/processingsystem.cpp.obj 64946e3309bfc754
21 654 0 CMakeFiles/ServerLMS_autogen a1ba014d73005738
21 654 0 ServerLMS_autogen/mocs_compilation.cpp a1ba014d73005738
21 654 0 ServerLMS_autogen/include/ui_serverlmswidget.h a1ba014d73005738
21 654 0 D:/LMS/ServerLMS/Debug64/CMakeFiles/ServerLMS_autogen a1ba014d73005738
21 654 0 D:/LMS/ServerLMS/Debug64/ServerLMS_autogen/mocs_compilation.cpp a1ba014d73005738
21 654 0 D:/LMS/ServerLMS/Debug64/ServerLMS_autogen/include/ui_serverlmswidget.h a1ba014d73005738
665 3465 7560481992544048 CMakeFiles/ServerLMS.dir/Systems/recognizesystem.cpp.obj f698d155fbad3bd2
674 3466 7560481992554019 CMakeFiles/ServerLMS.dir/Systems/processingsystem.cpp.obj 64946e3309bfc754
667 3622 7560481994109874 CMakeFiles/ServerLMS.dir/Systems/updatecontroller.cpp.obj c4c12bda48d8fa92
654 3632 7560481994211215 CMakeFiles/ServerLMS.dir/ServerLMS_autogen/mocs_compilation.cpp.obj 40e4c8c7d98890e8
677 3662 7560481994495096 CMakeFiles/ServerLMS.dir/Systems/sendsystem.cpp.obj d73c57350f364b58
659 3798 7560481995865263 CMakeFiles/ServerLMS.dir/clienthandler.cpp.obj 6c16bf194fe85608
671 3818 7560481996067921 CMakeFiles/ServerLMS.dir/Systems/dataparser.cpp.obj b273ef6b79a34bf
657 3895 7560481996852847 CMakeFiles/ServerLMS.dir/serverlmswidget.cpp.obj 12010b53b3caa3fc
662 3977 7560481997674492 CMakeFiles/ServerLMS.dir/multithreadserver.cpp.obj 8ac2c4a8e2ef203c
3977 4574 7560482003193366 libServerLMS.dll 2f530586cec8163
3977 4574 7560482003193366 libServerLMS.dll.a 2f530586cec8163
18 56 0 CMakeFiles/ServerLMS_autogen a1ba014d73005738
18 56 0 ServerLMS_autogen/mocs_compilation.cpp a1ba014d73005738
18 56 0 ServerLMS_autogen/include/ui_serverlmswidget.h a1ba014d73005738
18 56 0 D:/LMS/ServerLMS/Debug64/CMakeFiles/ServerLMS_autogen a1ba014d73005738
18 56 0 D:/LMS/ServerLMS/Debug64/ServerLMS_autogen/mocs_compilation.cpp a1ba014d73005738
18 56 0 D:/LMS/ServerLMS/Debug64/ServerLMS_autogen/include/ui_serverlmswidget.h a1ba014d73005738
15 48 0 CMakeFiles/ServerLMS_autogen a1ba014d73005738
15 48 0 ServerLMS_autogen/mocs_compilation.cpp a1ba014d73005738
15 48 0 ServerLMS_autogen/include/ui_serverlmswidget.h a1ba014d73005738
15 48 0 D:/LMS/ServerLMS/Debug64/CMakeFiles/ServerLMS_autogen a1ba014d73005738
15 48 0 D:/LMS/ServerLMS/Debug64/ServerLMS_autogen/mocs_compilation.cpp a1ba014d73005738
15 48 0 D:/LMS/ServerLMS/Debug64/ServerLMS_autogen/include/ui_serverlmswidget.h a1ba014d73005738
49 2134 7560539041796990 CMakeFiles/ServerLMS.dir/Systems/processingsystem.cpp.obj 64946e3309bfc754
2134 2694 7560539046914827 libServerLMS.dll 2f530586cec8163
2134 2694 7560539046914827 libServerLMS.dll.a 2f530586cec8163
18 61 0 CMakeFiles/ServerLMS_autogen a1ba014d73005738
18 61 0 ServerLMS_autogen/mocs_compilation.cpp a1ba014d73005738
18 61 0 ServerLMS_autogen/include/ui_serverlmswidget.h a1ba014d73005738
18 61 0 D:/LMS/ServerLMS/Debug64/CMakeFiles/ServerLMS_autogen a1ba014d73005738
18 61 0 D:/LMS/ServerLMS/Debug64/ServerLMS_autogen/mocs_compilation.cpp a1ba014d73005738
18 61 0 D:/LMS/ServerLMS/Debug64/ServerLMS_autogen/include/ui_serverlmswidget.h a1ba014d73005738
13 488 0 CMakeFiles/ServerLMS_autogen a1ba014d73005738
13 488 0 ServerLMS_autogen/mocs_compilation.cpp a1ba014d73005738
13 488 0 ServerLMS_autogen/include/ui_serverlmswidget.h a1ba014d73005738
13 488 0 D:/LMS/ServerLMS/Debug64/CMakeFiles/ServerLMS_autogen a1ba014d73005738
13 488 0 D:/LMS/ServerLMS/Debug64/ServerLMS_autogen/mocs_compilation.cpp a1ba014d73005738
13 488 0 D:/LMS/ServerLMS/Debug64/ServerLMS_autogen/include/ui_serverlmswidget.h a1ba014d73005738
495 3264 7560568013544626 CMakeFiles/ServerLMS.dir/multithreadserver.cpp.obj 8ac2c4a8e2ef203c
508 3344 7560568014395597 CMakeFiles/ServerLMS.dir/Systems/processingsystem.cpp.obj 64946e3309bfc754
502 3508 7560568016005634 CMakeFiles/ServerLMS.dir/Systems/updatecontroller.cpp.obj c4c12bda48d8fa92
512 3545 7560568016325066 CMakeFiles/ServerLMS.dir/Systems/sendsystem.cpp.obj d73c57350f364b58
488 3562 7560568016572622 CMakeFiles/ServerLMS.dir/ServerLMS_autogen/mocs_compilation.cpp.obj 40e4c8c7d98890e8
498 3587 7560568016825885 CMakeFiles/ServerLMS.dir/Systems/recognizesystem.cpp.obj f698d155fbad3bd2
491 3732 7560568018275537 CMakeFiles/ServerLMS.dir/serverlmswidget.cpp.obj 12010b53b3caa3fc
493 3887 7560568019826793 CMakeFiles/ServerLMS.dir/clienthandler.cpp.obj 6c16bf194fe85608
505 3909 7560568020035964 CMakeFiles/ServerLMS.dir/Systems/dataparser.cpp.obj b273ef6b79a34bf
3909 4468 7560568025168840 libServerLMS.dll 2f530586cec8163
3909 4468 7560568025168840 libServerLMS.dll.a 2f530586cec8163
18 568 0 CMakeFiles/ServerLMS_autogen a1ba014d73005738
18 568 0 ServerLMS_autogen/mocs_compilation.cpp a1ba014d73005738
18 568 0 ServerLMS_autogen/include/ui_serverlmswidget.h a1ba014d73005738
18 568 0 D:/LMS/ServerLMS/Debug64/CMakeFiles/ServerLMS_autogen a1ba014d73005738
18 568 0 D:/LMS/ServerLMS/Debug64/ServerLMS_autogen/mocs_compilation.cpp a1ba014d73005738
18 568 0 D:/LMS/ServerLMS/Debug64/ServerLMS_autogen/include/ui_serverlmswidget.h a1ba014d73005738
574 3228 7560612478085555 CMakeFiles/ServerLMS.dir/clienthandler.cpp.obj 6c16bf194fe85608
578 3474 7560612480554593 CMakeFiles/ServerLMS.dir/Systems/recognizesystem.cpp.obj f698d155fbad3bd2
582 3493 7560612480724118 CMakeFiles/ServerLMS.dir/Systems/updatecontroller.cpp.obj c4c12bda48d8fa92
569 3525 7560612481064279 CMakeFiles/ServerLMS.dir/ServerLMS_autogen/mocs_compilation.cpp.obj 40e4c8c7d98890e8
588 3590 7560612481654427 CMakeFiles/ServerLMS.dir/Systems/processingsystem.cpp.obj 64946e3309bfc754
576 3706 7560612482874853 CMakeFiles/ServerLMS.dir/multithreadserver.cpp.obj 8ac2c4a8e2ef203c
591 3764 7560612483399129 CMakeFiles/ServerLMS.dir/Systems/sendsystem.cpp.obj d73c57350f364b58
571 3829 7560612484097423 CMakeFiles/ServerLMS.dir/serverlmswidget.cpp.obj 12010b53b3caa3fc
585 3893 7560612484744294 CMakeFiles/ServerLMS.dir/Systems/dataparser.cpp.obj b273ef6b79a34bf
3893 4453 7560612489895728 libServerLMS.dll 2f530586cec8163
3893 4453 7560612489895728 libServerLMS.dll.a 2f530586cec8163
19 57 0 CMakeFiles/ServerLMS_autogen a1ba014d73005738
19 57 0 ServerLMS_autogen/mocs_compilation.cpp a1ba014d73005738
19 57 0 ServerLMS_autogen/include/ui_serverlmswidget.h a1ba014d73005738
19 57 0 D:/LMS/ServerLMS/Debug64/CMakeFiles/ServerLMS_autogen a1ba014d73005738
19 57 0 D:/LMS/ServerLMS/Debug64/ServerLMS_autogen/mocs_compilation.cpp a1ba014d73005738
19 57 0 D:/LMS/ServerLMS/Debug64/ServerLMS_autogen/include/ui_serverlmswidget.h a1ba014d73005738
60 2225 7560635986964049 CMakeFiles/ServerLMS.dir/Systems/processingsystem.cpp.obj 64946e3309bfc754
57 2392 7560635988624358 CMakeFiles/ServerLMS.dir/serverlmswidget.cpp.obj 12010b53b3caa3fc
2392 2950 7560635993714374 libServerLMS.dll 2f530586cec8163
2392 2950 7560635993714374 libServerLMS.dll.a 2f530586cec8163

View File

@@ -1,5 +1,22 @@
# Generated by CMake. Changes will be overwritten.
D:/LMS/ServerLMS/ServerLMS/Systems/processingsystem.cpp
D:/LMS/ServerLMS/ServerLMS/clienthandler.cpp
D:/LMS/ServerLMS/ServerLMS/providerdblms.h
mmc:Q_OBJECT
D:/LMS/ServerLMS/ServerLMS/Systems/updatecontroller.cpp
D:/LMS/ServerLMS/ServerLMS/multithreadserver.cpp
D:/LMS/ServerLMS/ServerLMS/Systems/sendsystem.cpp
D:/LMS/ServerLMS/ServerLMS/Systems/logger.cpp
D:/LMS/ServerLMS/ServerLMS/Systems/recognizesystem.cpp
D:/LMS/ServerLMS/ServerLMS/providerdblms.cpp
D:/LMS/ServerLMS/ServerLMS/Client.h
D:/LMS/ServerLMS/ServerLMS/multithreadserver.h
mmc:Q_OBJECT
D:/LMS/ServerLMS/ServerLMS/Systems/sendsystem.h
mmc:Q_OBJECT
D:/LMS/ServerLMS/ServerLMS/ServerLMS_global.h
D:/LMS/ServerLMS/ServerLMS/Systems/dataparser.cpp
D:/LMS/ServerLMS/ServerLMS/serverlmswidget.h
mmc:Q_OBJECT
D:/LMS/ServerLMS/ServerLMS/Systems/dataparser.h
mmc:Q_OBJECT
D:/LMS/ServerLMS/ServerLMS/serverlmswidget.cpp
@@ -17,21 +34,4 @@ D:/LMS/ServerLMS/ServerLMS/typesDataServerClient.h
D:/LMS/ServerLMS/ServerLMS/Systems/tools.h
D:/LMS/ServerLMS/ServerLMS/clienthandler.h
mmc:Q_OBJECT
D:/LMS/ServerLMS/ServerLMS/clienthandler.cpp
D:/LMS/ServerLMS/ServerLMS/providerdblms.h
mmc:Q_OBJECT
D:/LMS/ServerLMS/ServerLMS/multithreadserver.h
mmc:Q_OBJECT
D:/LMS/ServerLMS/ServerLMS/Client.h
D:/LMS/ServerLMS/ServerLMS/Systems/sendsystem.h
mmc:Q_OBJECT
D:/LMS/ServerLMS/ServerLMS/ServerLMS_global.h
D:/LMS/ServerLMS/ServerLMS/providerdblms.cpp
D:/LMS/ServerLMS/ServerLMS/Systems/recognizesystem.cpp
D:/LMS/ServerLMS/ServerLMS/Systems/logger.cpp
D:/LMS/ServerLMS/ServerLMS/Systems/sendsystem.cpp
D:/LMS/ServerLMS/ServerLMS/multithreadserver.cpp
D:/LMS/ServerLMS/ServerLMS/Systems/updatecontroller.cpp
D:/LMS/ServerLMS/ServerLMS/serverlmswidget.h
mmc:Q_OBJECT
D:/LMS/ServerLMS/ServerLMS/Systems/dataparser.cpp
D:/LMS/ServerLMS/ServerLMS/Systems/processingsystem.cpp

View File

@@ -22,8 +22,8 @@ QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_ServerLMSWidget_t {
QByteArrayData data[26];
char stringdata0[338];
QByteArrayData data[27];
char stringdata0[364];
};
#define QT_MOC_LITERAL(idx, ofs, len) \
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
@@ -50,14 +50,15 @@ QT_MOC_LITERAL(14, 147, 21), // "slotUpdateListClients"
QT_MOC_LITERAL(15, 169, 22), // "slot_BlockAutorization"
QT_MOC_LITERAL(16, 192, 5), // "block"
QT_MOC_LITERAL(17, 198, 16), // "slot_AuthChanged"
QT_MOC_LITERAL(18, 215, 21), // "slot_msgToClientReady"
QT_MOC_LITERAL(19, 237, 5), // "login"
QT_MOC_LITERAL(20, 243, 4), // "text"
QT_MOC_LITERAL(21, 248, 12), // "slotAddToLog"
QT_MOC_LITERAL(22, 261, 3), // "msg"
QT_MOC_LITERAL(23, 265, 25), // "on_btnStartServer_clicked"
QT_MOC_LITERAL(24, 291, 24), // "on_btnStopServer_clicked"
QT_MOC_LITERAL(25, 316, 21) // "on_btnTaskSet_clicked"
QT_MOC_LITERAL(18, 215, 23), // "slot_msgToClientFromGUI"
QT_MOC_LITERAL(19, 239, 5), // "login"
QT_MOC_LITERAL(20, 245, 4), // "text"
QT_MOC_LITERAL(21, 250, 23), // "slot_msgToGUIfromClient"
QT_MOC_LITERAL(22, 274, 12), // "slotAddToLog"
QT_MOC_LITERAL(23, 287, 3), // "msg"
QT_MOC_LITERAL(24, 291, 25), // "on_btnStartServer_clicked"
QT_MOC_LITERAL(25, 317, 24), // "on_btnStopServer_clicked"
QT_MOC_LITERAL(26, 342, 21) // "on_btnTaskSet_clicked"
},
"ServerLMSWidget\0sigRecognize\0\0"
@@ -66,9 +67,9 @@ QT_MOC_LITERAL(25, 316, 21) // "on_btnTaskSet_clicked"
"qintptr\0descriptor\0ClientHandler*\0"
"client\0slotUpdateListClients\0"
"slot_BlockAutorization\0block\0"
"slot_AuthChanged\0slot_msgToClientReady\0"
"login\0text\0slotAddToLog\0msg\0"
"on_btnStartServer_clicked\0"
"slot_AuthChanged\0slot_msgToClientFromGUI\0"
"login\0text\0slot_msgToGUIfromClient\0"
"slotAddToLog\0msg\0on_btnStartServer_clicked\0"
"on_btnStopServer_clicked\0on_btnTaskSet_clicked"
};
#undef QT_MOC_LITERAL
@@ -79,7 +80,7 @@ static const uint qt_meta_data_ServerLMSWidget[] = {
8, // revision
0, // classname
0, 0, // classinfo
13, 14, // methods
14, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
@@ -87,21 +88,22 @@ static const uint qt_meta_data_ServerLMSWidget[] = {
3, // signalCount
// signals: name, argc, parameters, tag, flags
1, 0, 79, 2, 0x06 /* Public */,
3, 0, 80, 2, 0x06 /* Public */,
5, 1, 81, 2, 0x06 /* Public */,
1, 0, 84, 2, 0x06 /* Public */,
3, 0, 85, 2, 0x06 /* Public */,
5, 1, 86, 2, 0x06 /* Public */,
// slots: name, argc, parameters, tag, flags
7, 1, 84, 2, 0x0a /* Public */,
9, 2, 87, 2, 0x0a /* Public */,
14, 0, 92, 2, 0x0a /* Public */,
15, 1, 93, 2, 0x0a /* Public */,
17, 0, 96, 2, 0x0a /* Public */,
18, 2, 97, 2, 0x08 /* Private */,
21, 1, 102, 2, 0x08 /* Private */,
23, 0, 105, 2, 0x08 /* Private */,
24, 0, 106, 2, 0x08 /* Private */,
25, 0, 107, 2, 0x08 /* Private */,
7, 1, 89, 2, 0x0a /* Public */,
9, 2, 92, 2, 0x0a /* Public */,
14, 0, 97, 2, 0x0a /* Public */,
15, 1, 98, 2, 0x0a /* Public */,
17, 0, 101, 2, 0x0a /* Public */,
18, 2, 102, 2, 0x08 /* Private */,
21, 2, 107, 2, 0x08 /* Private */,
22, 1, 112, 2, 0x08 /* Private */,
24, 0, 115, 2, 0x08 /* Private */,
25, 0, 116, 2, 0x08 /* Private */,
26, 0, 117, 2, 0x08 /* Private */,
// signals: parameters
QMetaType::Void,
@@ -115,7 +117,8 @@ static const uint qt_meta_data_ServerLMSWidget[] = {
QMetaType::Void, QMetaType::Bool, 16,
QMetaType::Void,
QMetaType::Void, QMetaType::QString, QMetaType::QString, 19, 20,
QMetaType::Void, QMetaType::QString, 22,
QMetaType::Void, QMetaType::QString, QMetaType::QString, 19, 20,
QMetaType::Void, QMetaType::QString, 23,
QMetaType::Void,
QMetaType::Void,
QMetaType::Void,
@@ -138,11 +141,12 @@ void ServerLMSWidget::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int
case 5: _t->slotUpdateListClients(); break;
case 6: _t->slot_BlockAutorization((*reinterpret_cast< bool(*)>(_a[1]))); break;
case 7: _t->slot_AuthChanged(); break;
case 8: _t->slot_msgToClientReady((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break;
case 9: _t->slotAddToLog((*reinterpret_cast< QString(*)>(_a[1]))); break;
case 10: _t->on_btnStartServer_clicked(); break;
case 11: _t->on_btnStopServer_clicked(); break;
case 12: _t->on_btnTaskSet_clicked(); break;
case 8: _t->slot_msgToClientFromGUI((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break;
case 9: _t->slot_msgToGUIfromClient((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break;
case 10: _t->slotAddToLog((*reinterpret_cast< QString(*)>(_a[1]))); break;
case 11: _t->on_btnStartServer_clicked(); break;
case 12: _t->on_btnStopServer_clicked(); break;
case 13: _t->on_btnTaskSet_clicked(); break;
default: ;
}
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
@@ -211,13 +215,13 @@ int ServerLMSWidget::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 13)
if (_id < 14)
qt_static_metacall(this, _c, _id, _a);
_id -= 13;
_id -= 14;
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
if (_id < 13)
if (_id < 14)
qt_static_metacall(this, _c, _id, _a);
_id -= 13;
_id -= 14;
}
return _id;
}

View File

@@ -22,8 +22,8 @@ QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_ProcessingSystem_t {
QByteArrayData data[9];
char stringdata0[101];
QByteArrayData data[10];
char stringdata0[125];
};
#define QT_MOC_LITERAL(idx, ofs, len) \
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
@@ -40,12 +40,14 @@ QT_MOC_LITERAL(4, 54, 13), // "sigLogMessage"
QT_MOC_LITERAL(5, 68, 3), // "log"
QT_MOC_LITERAL(6, 72, 17), // "sigAddToMessanger"
QT_MOC_LITERAL(7, 90, 5), // "login"
QT_MOC_LITERAL(8, 96, 4) // "text"
QT_MOC_LITERAL(8, 96, 4), // "text"
QT_MOC_LITERAL(9, 101, 23) // "signal_msgToClientReady"
},
"ProcessingSystem\0sigUpdateListClients\0"
"\0sigAuthChanged\0sigLogMessage\0log\0"
"sigAddToMessanger\0login\0text"
"sigAddToMessanger\0login\0text\0"
"signal_msgToClientReady"
};
#undef QT_MOC_LITERAL
@@ -55,23 +57,25 @@ static const uint qt_meta_data_ProcessingSystem[] = {
8, // revision
0, // classname
0, 0, // classinfo
4, 14, // methods
5, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
4, // signalCount
5, // signalCount
// signals: name, argc, parameters, tag, flags
1, 0, 34, 2, 0x06 /* Public */,
3, 0, 35, 2, 0x06 /* Public */,
4, 1, 36, 2, 0x06 /* Public */,
6, 2, 39, 2, 0x06 /* Public */,
1, 0, 39, 2, 0x06 /* Public */,
3, 0, 40, 2, 0x06 /* Public */,
4, 1, 41, 2, 0x06 /* Public */,
6, 2, 44, 2, 0x06 /* Public */,
9, 2, 49, 2, 0x06 /* Public */,
// signals: parameters
QMetaType::Void,
QMetaType::Void,
QMetaType::Void, QMetaType::QString, 5,
QMetaType::Void, QMetaType::QString, QMetaType::QString, 7, 8,
QMetaType::Void, QMetaType::QString, QMetaType::QString, 7, 8,
0 // eod
@@ -87,6 +91,7 @@ void ProcessingSystem::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int
case 1: _t->sigAuthChanged(); break;
case 2: _t->sigLogMessage((*reinterpret_cast< QString(*)>(_a[1]))); break;
case 3: _t->sigAddToMessanger((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break;
case 4: _t->signal_msgToClientReady((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break;
default: ;
}
} else if (_c == QMetaObject::IndexOfMethod) {
@@ -119,6 +124,13 @@ void ProcessingSystem::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int
return;
}
}
{
using _t = void (ProcessingSystem::*)(QString , QString );
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&ProcessingSystem::signal_msgToClientReady)) {
*result = 4;
return;
}
}
}
}
@@ -151,13 +163,13 @@ int ProcessingSystem::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 4)
if (_id < 5)
qt_static_metacall(this, _c, _id, _a);
_id -= 4;
_id -= 5;
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
if (_id < 4)
if (_id < 5)
*reinterpret_cast<int*>(_a[0]) = -1;
_id -= 4;
_id -= 5;
}
return _id;
}
@@ -187,5 +199,12 @@ void ProcessingSystem::sigAddToMessanger(QString _t1, QString _t2)
void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t1))), const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t2))) };
QMetaObject::activate(this, &staticMetaObject, 3, _a);
}
// SIGNAL 4
void ProcessingSystem::signal_msgToClientReady(QString _t1, QString _t2)
{
void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t1))), const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t2))) };
QMetaObject::activate(this, &staticMetaObject, 4, _a);
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE

Binary file not shown.

Binary file not shown.

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.11.1, 2024-12-13T16:41:17. -->
<!-- Written by QtCreator 4.11.1, 2024-12-16T17:46:50. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>

View File

@@ -70,6 +70,28 @@ void DataParser::xmlParser(ClientHandler *client, QByteArray array)
processingSystem->processingClientDeAutorization(client, clientDeAutorization);
}
else if(xmlReader.name() == "ToClientMessage")
{//Отправка сообщения Клиенту
ToClientMessage toClientMessage;
/*Перебираем все атрибуты тега*/
foreach(const QXmlStreamAttribute &attr, xmlReader.attributes())
{
QString name = attr.name().toString();
QString value = attr.value().toString();
//addTextToLogger(name + ": " + value);
if(name == "id")
toClientMessage.id = value.toInt();
else if(name == "Text")
toClientMessage.Text = value;
else if(name == "Login")
toClientMessage.Login = value;
}
processingSystem->processingToClientMessage(client, toClientMessage);
}
else if(xmlReader.name() == "QueryToDB")
{//Запрос к базе данных от клиента
@@ -182,7 +204,7 @@ void DataParser::xmlParser(ClientHandler *client, QByteArray array)
clientMessage.Text = value;
}
processingSystem->processingClientMessage(client, clientMessage);
processingSystem->processingFromClientMessage(client, clientMessage);
}
else if(xmlReader.name() == "ClientNotify")
{//Уведомление от клиента
@@ -369,80 +391,6 @@ QByteArray DataParser::xmlAnswer_deAuthorization(bool result, QString login)
return xmlAnswer(listTag);
}
QByteArray DataParser::xmlAnswer_ClientQueryToDB(bool result, QList<Instructor>* listInstructors,
QList<Trainee>* listTrainees, QList<Group>* listGroups)
{
QDomDocument groupsTraineesDOM;
QFile blankFile(":/blankXML/groupsTrainees.xml");
if (! blankFile.open(QFile::ReadOnly | QFile::Text)) {
qDebug() << "SaveTraineesGroupsXML: Не удалось считать файл :/blankXML/groupsTrainees.xml";
return QByteArray();
}
groupsTraineesDOM.setContent(blankFile.readAll());
blankFile.close();
QDomNode allListsNode = groupsTraineesDOM.namedItem("AllLists");
QDomNode groupsTraineesNode = allListsNode.firstChildElement("GroupsTrainees");
QDomNode allInstructorsNode = allListsNode.firstChildElement("Instructors");
for(Group group : *listGroups)
{
//Группа
QDomNode groupNode = groupsTraineesDOM.createElement("group");
groupsTraineesNode.appendChild(groupNode);
groupNode.toElement().setAttribute("group_id", group.getID());
groupNode.toElement().setAttribute("name", group.getName());
//Обучаемые
for(Trainee trainee : *listTrainees)
{
if(group.getID() != trainee.getGroup().getID())
continue;
QDomNode traineeNode = groupsTraineesDOM.createElement("trainee");
groupNode.appendChild(traineeNode);
traineeNode.toElement().setAttribute("trainee_id", QString::number(trainee.getID()));
traineeNode.toElement().setAttribute("name", trainee.getName());
traineeNode.toElement().setAttribute("login", trainee.getLogin());
traineeNode.toElement().setAttribute("password", trainee.getPassword());
traineeNode.toElement().setAttribute("archived", trainee.getArchived() ? QStringLiteral("true") : QStringLiteral("false"));
traineeNode.toElement().setAttribute("logged_in", trainee.getLoggedIn() ? QStringLiteral("true") : QStringLiteral("false"));
traineeNode.toElement().setAttribute("group_trainee", QString::number(trainee.getGroup().getID()));
traineeNode.toElement().setAttribute("computer_trainee", QString::number(trainee.getComputer().getID()));
}
}
for(Instructor instructor : *listInstructors)
{
//Инструктор
QDomNode instructorNode = groupsTraineesDOM.createElement("instructor");
allInstructorsNode.appendChild(instructorNode);
instructorNode.toElement().setAttribute("instructor_id", QString::number(instructor.getID()));
instructorNode.toElement().setAttribute("name", instructor.getName());
instructorNode.toElement().setAttribute("login", instructor.getLogin());
instructorNode.toElement().setAttribute("password", instructor.getPassword());
instructorNode.toElement().setAttribute("is_admin", instructor.getIsAdmin() ? QStringLiteral("true") : QStringLiteral("false"));
instructorNode.toElement().setAttribute("archived", instructor.getArchived() ? QStringLiteral("true") : QStringLiteral("false"));
instructorNode.toElement().setAttribute("logged_in", instructor.getLoggedIn() ? QStringLiteral("true") : QStringLiteral("false"));
}
QString xmlFileName = /*appDirPath +*/ "GroupsTrainees.xml";
QFile xmlOutFile(xmlFileName);
if (!xmlOutFile.open(QFile::WriteOnly | QFile::Text))
{
qDebug() << "SaveTraineesGroupsXML: Не удалось записать файл " + xmlFileName;
return QByteArray();
}
QTextStream outFile(&xmlOutFile);
groupsTraineesDOM.save(outFile, 4);
xmlOutFile.close();
return groupsTraineesDOM.toByteArray();
}
bool DataParser::loadBlankXML(QString nameFile, QDomDocument *commonDOM)
{
QFile blankFile(":/blankXML/" + nameFile);

View File

@@ -29,9 +29,6 @@ public:
QByteArray xmlAnswer_authorization(bool result, QString instructorName, QString clientName, QString accessType, QString login);
QByteArray xmlAnswer_deAuthorization(bool result, QString login);
QByteArray xmlAnswer_ClientQueryToDB(bool result, QList<Instructor>* listInstructors = nullptr,
QList<Trainee>* listTrainees = nullptr, QList<Group>* listGroups = nullptr);
bool loadBlankXML(QString nameFile, QDomDocument* commonDOM);
bool saveDOMtoXML(QString nameFile, QDomDocument* commonDOM);
QByteArray xmlAnswer_ClientQueryToDB_ListInstructors(bool result, QList<Instructor>* listInstructors);

View File

@@ -119,12 +119,6 @@ void ProcessingSystem::processingClientQueryToDB(ClientHandler *client, ClientQu
switch (clientQueryToDB.typeQuery)
{
case TypeQueryToDB::TYPE_QUERY_GET_LIST_INSTRUCTORS:
{
QList<Instructor> listInstructors = providerDBLMS->GetListAllInstructors();
arrayAnswer = dataParser->xmlAnswer_ClientQueryToDB(true, &listInstructors);
break;
}
case TypeQueryToDB::TYPE_QUERY_GET_ALL_LISTS:
{
QList<Instructor> listInstructors = providerDBLMS->GetListAllInstructors();
@@ -223,7 +217,12 @@ void ProcessingSystem::processingClientQueryToDB(ClientHandler *client, ClientQu
//logger->addTextToLogger("To Client: " + str);
}
void ProcessingSystem::processingClientMessage(ClientHandler *client, ClientMessage clientMessage)
void ProcessingSystem::processingToClientMessage(ClientHandler *client, ToClientMessage toClientMessage)
{
signal_msgToClientReady(toClientMessage.Login, toClientMessage.Text);
}
void ProcessingSystem::processingFromClientMessage(ClientHandler *client, ClientMessage clientMessage)
{
QString peerAddress = client->getSocket()->peerAddress().toString();
QString peerPort = QString::number(client->getSocket()->peerPort());
@@ -231,7 +230,9 @@ void ProcessingSystem::processingClientMessage(ClientHandler *client, ClientMess
QString str = "Msg From Client [" + peerAddress + ":" + peerPort + "] : " + clientMessage.Text;
emit sigLogMessage(str);
emit sigAddToMessanger(client->getClient()->getLogin(), clientMessage.Text);
//Здесь нужно оттранслировать на ГУИ!
//emit sigAddToMessanger(client->getClient()->getLogin(), clientMessage.Text);
}
void ProcessingSystem::processingClientNotify(ClientHandler *client, ClientNotify clientNotify)

View File

@@ -26,7 +26,9 @@ public:
void processingClientAutorization(ClientHandler *client, ClientAutorization clientAutorization);
void processingClientDeAutorization(ClientHandler *client, ClientDeAutorization clientDeAutorization);
void processingClientQueryToDB(ClientHandler *client, ClientQueryToDB clientQueryToDB, int id = 0, void* data = nullptr);
void processingClientMessage(ClientHandler *client, ClientMessage clientMessage);
void processingToClientMessage(ClientHandler *client, ToClientMessage toClientMessage);
void processingFromClientMessage(ClientHandler *client, ClientMessage clientMessage);
void processingClientNotify(ClientHandler *client, ClientNotify clientNotify);
signals:
@@ -34,6 +36,7 @@ signals:
void sigAuthChanged();
void sigLogMessage(QString log);
void sigAddToMessanger(QString login,QString text);
void signal_msgToClientReady(QString login, QString text);
private:
ServerLMSWidget *server;

View File

@@ -72,6 +72,7 @@ ServerLMSWidget::ServerLMSWidget(QWidget *parent) :
connect(this,&ServerLMSWidget::sigLog,logger,&Logger::addTextToLogger);
connect(processingSystem,&ProcessingSystem::sigAuthChanged,this, &ServerLMSWidget::slot_AuthChanged);
connect(processingSystem,&ProcessingSystem::signal_msgToClientReady,this, &ServerLMSWidget::slot_msgToClientFromGUI);
on_btnStartServer_clicked();
@@ -227,7 +228,7 @@ void ServerLMSWidget::slot_LanguageChanged(QString language)
}
void ServerLMSWidget::slot_msgToClientReady(QString login, QString text)
void ServerLMSWidget::slot_msgToClientFromGUI(QString login, QString text)
{
QString textMsg = text;
@@ -253,6 +254,32 @@ void ServerLMSWidget::slot_msgToClientReady(QString login, QString text)
}
}
void ServerLMSWidget::slot_msgToGUIfromClient(QString login, QString text)
{
QString textMsg = text;
QByteArray byteArrayMsg = dataParser->xmlAnswer_message(textMsg);
//Проходим все открытые сокеты, ищем нужный
foreach(int idSocket, clientsMap.keys())
{
ClientHandler *handler = clientsMap[idSocket];
if(handler->getClient()->getTypeClient() == TypeClientAutorization::TYPE_GUI)
{//Отправляем GUI-клиенту для отображения в Мессенджере
handler->sendXmlAnswer(byteArrayMsg);
QString peerAddress = clientsMap[idSocket]->getSocket()->peerAddress().toString();
QString peerPort = QString::number(clientsMap[idSocket]->getSocket()->peerPort());
QString str = "Msg From Client [" + peerAddress + ":" + peerPort + "] : " + textMsg;
logger->addTextToLogger(str);
break;
}
}
}
void ServerLMSWidget::slotAddToLog(QString msg)
{
ui->listWidgetLogger->addItem(msg);

View File

@@ -63,7 +63,8 @@ public slots:
private slots:
//слот обработки сигнала о готовности нового сообщения на отправку клиенту от мессенджера
void slot_msgToClientReady(QString login, QString text);
void slot_msgToClientFromGUI(QString login, QString text);
void slot_msgToGUIfromClient(QString login, QString text);
void slotAddToLog(QString msg);
public:

View File

@@ -57,7 +57,6 @@ public:
};
enum TypeQueryToDB{
TYPE_QUERY_GET_LIST_INSTRUCTORS,
TYPE_QUERY_GET_ALL_LISTS,
TYPE_QUERY_NEW_INSTRUCTOR,
TYPE_QUERY_DEL_INSTRUCTOR,
@@ -87,6 +86,14 @@ public:
QString Text;
};
class ToClientMessage
{
public:
int id;
QString Login;
QString Text;
};
class ServerTask
{
public: