diff --git a/Core/hashcomparer.cpp b/Core/hashcomparer.cpp index 2a02d65..5dcef67 100644 --- a/Core/hashcomparer.cpp +++ b/Core/hashcomparer.cpp @@ -55,7 +55,6 @@ void HashComparer::showDeltas() updateWidget->addToList(item); } - updateWidget->setUpdateList(filesForUpdate); emit sigHaveDelta(); } @@ -64,6 +63,11 @@ void HashComparer::setWidget(UpdateNotifyWidget* updateWidget) this->updateWidget = updateWidget; } +QList *HashComparer::getFilesForUpdate() const +{ + return filesForUpdate; +} + HashComparer::~HashComparer() { diff --git a/Core/hashcomparer.h b/Core/hashcomparer.h index 932b96e..2a8f179 100644 --- a/Core/hashcomparer.h +++ b/Core/hashcomparer.h @@ -20,6 +20,8 @@ public: void showDeltas(); void setWidget(UpdateNotifyWidget *updateWidget); + QList *getFilesForUpdate() const; + signals: void sigCallCheck(); void sigHaveDelta(); diff --git a/Makefile.Debug b/Makefile.Debug index e02c215..46f9e26 100644 --- a/Makefile.Debug +++ b/Makefile.Debug @@ -3246,6 +3246,8 @@ debug/mainwindow.o: mainwindow.cpp mainwindow.h \ ui_mainwindow.h \ D:/QT/5.14.2/mingw73_64/include/QtGui/QFontDatabase \ D:/QT/5.14.2/mingw73_64/include/QtGui/qfontdatabase.h \ + D:/QT/5.14.2/mingw73_64/include/QtWidgets/QMessageBox \ + D:/QT/5.14.2/mingw73_64/include/QtWidgets/qmessagebox.h \ D:/QT/5.14.2/mingw73_64/include/QtGui/QPaintEvent \ D:/QT/5.14.2/mingw73_64/include/QtGui/QPainter \ D:/QT/5.14.2/mingw73_64/include/QtGui/qpainter.h \ diff --git a/Makefile.Release b/Makefile.Release index 724325e..c379089 100644 --- a/Makefile.Release +++ b/Makefile.Release @@ -3246,6 +3246,8 @@ release/mainwindow.o: mainwindow.cpp mainwindow.h \ ui_mainwindow.h \ D:/QT/5.14.2/mingw73_64/include/QtGui/QFontDatabase \ D:/QT/5.14.2/mingw73_64/include/QtGui/qfontdatabase.h \ + D:/QT/5.14.2/mingw73_64/include/QtWidgets/QMessageBox \ + D:/QT/5.14.2/mingw73_64/include/QtWidgets/qmessagebox.h \ D:/QT/5.14.2/mingw73_64/include/QtGui/QPaintEvent \ D:/QT/5.14.2/mingw73_64/include/QtGui/QPainter \ D:/QT/5.14.2/mingw73_64/include/QtGui/qpainter.h \ diff --git a/RRJClient.pro.user b/RRJClient.pro.user index 3c207ec..9245f44 100644 --- a/RRJClient.pro.user +++ b/RRJClient.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId diff --git a/StaticData/clientHash.xml b/StaticData/clientHash.xml index ae86906..d5246df 100644 --- a/StaticData/clientHash.xml +++ b/StaticData/clientHash.xml @@ -26,12 +26,6 @@ - - - - - - @@ -272,540 +266,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/StaticData/streamingHash.xml b/StaticData/streamingHash.xml index 0bae3d3..f11ba10 100644 --- a/StaticData/streamingHash.xml +++ b/StaticData/streamingHash.xml @@ -3,12 +3,6 @@ - - - - - - @@ -92,540 +86,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/debug/RRJClient.exe b/debug/RRJClient.exe index 247fc2c..c41d65b 100644 Binary files a/debug/RRJClient.exe and b/debug/RRJClient.exe differ diff --git a/debug/hashcomparer.o b/debug/hashcomparer.o index b847556..0b07442 100644 Binary files a/debug/hashcomparer.o and b/debug/hashcomparer.o differ diff --git a/debug/main.o b/debug/main.o index 4281638..b50fdbd 100644 Binary files a/debug/main.o and b/debug/main.o differ diff --git a/debug/mainwindow.o b/debug/mainwindow.o index ae86d5d..ba20626 100644 Binary files a/debug/mainwindow.o and b/debug/mainwindow.o differ diff --git a/debug/moc_hashcomparer.o b/debug/moc_hashcomparer.o index 7d2d8b8..da9ebbb 100644 Binary files a/debug/moc_hashcomparer.o and b/debug/moc_hashcomparer.o differ diff --git a/debug/moc_mainwindow.cpp b/debug/moc_mainwindow.cpp index 58e616e..ba4d53b 100644 --- a/debug/moc_mainwindow.cpp +++ b/debug/moc_mainwindow.cpp @@ -10,6 +10,7 @@ #include "../mainwindow.h" #include #include +#include #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'mainwindow.h' doesn't include ." #elif Q_MOC_OUTPUT_REVISION != 67 @@ -22,8 +23,8 @@ QT_BEGIN_MOC_NAMESPACE QT_WARNING_PUSH QT_WARNING_DISABLE_DEPRECATED struct qt_meta_stringdata_MainWindow_t { - QByteArrayData data[33]; - char stringdata0[551]; + QByteArrayData data[39]; + char stringdata0[704]; }; #define QT_MOC_LITERAL(idx, ofs, len) \ Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ @@ -43,35 +44,42 @@ QT_MOC_LITERAL(7, 100, 11), // "SendSystem*" QT_MOC_LITERAL(8, 112, 10), // "sendSystem" QT_MOC_LITERAL(9, 123, 8), // "QThread*" QT_MOC_LITERAL(10, 132, 6), // "thread" -QT_MOC_LITERAL(11, 139, 13), // "sigSetConnect" -QT_MOC_LITERAL(12, 153, 15), // "ServerSettings*" -QT_MOC_LITERAL(13, 169, 14), // "serverSettings" -QT_MOC_LITERAL(14, 184, 16), // "sigCalculateHash" -QT_MOC_LITERAL(15, 201, 14), // "sigSendCommand" -QT_MOC_LITERAL(16, 216, 7), // "message" -QT_MOC_LITERAL(17, 224, 19), // "sigSendAutorization" -QT_MOC_LITERAL(18, 244, 15), // "sigGetConnected" -QT_MOC_LITERAL(19, 260, 22), // "on_loginButton_clicked" -QT_MOC_LITERAL(20, 283, 23), // "on_updateButton_clicked" -QT_MOC_LITERAL(21, 307, 22), // "on_startButton_clicked" -QT_MOC_LITERAL(22, 330, 27), // "on_saveServerButton_clicked" -QT_MOC_LITERAL(23, 358, 25), // "on_settingsButton_clicked" -QT_MOC_LITERAL(24, 384, 24), // "on_connectButton_clicked" -QT_MOC_LITERAL(25, 409, 29), // "on_languageComboBox_activated" -QT_MOC_LITERAL(26, 439, 4), // "arg1" -QT_MOC_LITERAL(27, 444, 17), // "slotDisableNotify" -QT_MOC_LITERAL(28, 462, 19), // "slotConnectionState" -QT_MOC_LITERAL(29, 482, 4), // "flag" -QT_MOC_LITERAL(30, 487, 20), // "slotServerDisconnect" -QT_MOC_LITERAL(31, 508, 37), // "on_updateListGuideLabel_linkA..." -QT_MOC_LITERAL(32, 546, 4) // "link" +QT_MOC_LITERAL(11, 139, 22), // "sigUpdateFilesOnServer" +QT_MOC_LITERAL(12, 162, 16), // "QList*" +QT_MOC_LITERAL(13, 179, 12), // "fileSendList" +QT_MOC_LITERAL(14, 192, 13), // "sigSetConnect" +QT_MOC_LITERAL(15, 206, 15), // "ServerSettings*" +QT_MOC_LITERAL(16, 222, 14), // "serverSettings" +QT_MOC_LITERAL(17, 237, 16), // "sigCalculateHash" +QT_MOC_LITERAL(18, 254, 14), // "sigSendCommand" +QT_MOC_LITERAL(19, 269, 7), // "message" +QT_MOC_LITERAL(20, 277, 19), // "sigSendAutorization" +QT_MOC_LITERAL(21, 297, 15), // "sigGetConnected" +QT_MOC_LITERAL(22, 313, 22), // "on_loginButton_clicked" +QT_MOC_LITERAL(23, 336, 23), // "on_updateButton_clicked" +QT_MOC_LITERAL(24, 360, 22), // "on_startButton_clicked" +QT_MOC_LITERAL(25, 383, 27), // "on_saveServerButton_clicked" +QT_MOC_LITERAL(26, 411, 25), // "on_settingsButton_clicked" +QT_MOC_LITERAL(27, 437, 24), // "on_connectButton_clicked" +QT_MOC_LITERAL(28, 462, 29), // "on_languageComboBox_activated" +QT_MOC_LITERAL(29, 492, 4), // "arg1" +QT_MOC_LITERAL(30, 497, 17), // "slotDisableNotify" +QT_MOC_LITERAL(31, 515, 19), // "slotConnectionState" +QT_MOC_LITERAL(32, 535, 4), // "flag" +QT_MOC_LITERAL(33, 540, 20), // "slotServerDisconnect" +QT_MOC_LITERAL(34, 561, 37), // "on_updateListGuideLabel_linkA..." +QT_MOC_LITERAL(35, 599, 4), // "link" +QT_MOC_LITERAL(36, 604, 29), // "on_loadToServerButton_clicked" +QT_MOC_LITERAL(37, 634, 28), // "on_undoChangesButton_clicked" +QT_MOC_LITERAL(38, 663, 40) // "on_startWithCurrentChangesBut..." }, "MainWindow\0sigInitializeClient\0\0" "RecognizeSystem*\0recognizeSystem\0" "ExternalExecuter*\0externalExecuter\0" "SendSystem*\0sendSystem\0QThread*\0thread\0" - "sigSetConnect\0ServerSettings*\0" + "sigUpdateFilesOnServer\0QList*\0" + "fileSendList\0sigSetConnect\0ServerSettings*\0" "serverSettings\0sigCalculateHash\0" "sigSendCommand\0message\0sigSendAutorization\0" "sigGetConnected\0on_loginButton_clicked\0" @@ -83,7 +91,9 @@ QT_MOC_LITERAL(32, 546, 4) // "link" "slotDisableNotify\0slotConnectionState\0" "flag\0slotServerDisconnect\0" "on_updateListGuideLabel_linkActivated\0" - "link" + "link\0on_loadToServerButton_clicked\0" + "on_undoChangesButton_clicked\0" + "on_startWithCurrentChangesButton_clicked" }; #undef QT_MOC_LITERAL @@ -93,39 +103,44 @@ static const uint qt_meta_data_MainWindow[] = { 8, // revision 0, // classname 0, 0, // classinfo - 17, 14, // methods + 21, 14, // methods 0, 0, // properties 0, 0, // enums/sets 0, 0, // constructors 0, // flags - 6, // signalCount + 7, // signalCount // signals: name, argc, parameters, tag, flags - 1, 4, 99, 2, 0x06 /* Public */, - 11, 2, 108, 2, 0x06 /* Public */, - 14, 0, 113, 2, 0x06 /* Public */, - 15, 1, 114, 2, 0x06 /* Public */, - 17, 0, 117, 2, 0x06 /* Public */, - 18, 0, 118, 2, 0x06 /* Public */, + 1, 4, 119, 2, 0x06 /* Public */, + 11, 1, 128, 2, 0x06 /* Public */, + 14, 2, 131, 2, 0x06 /* Public */, + 17, 0, 136, 2, 0x06 /* Public */, + 18, 1, 137, 2, 0x06 /* Public */, + 20, 0, 140, 2, 0x06 /* Public */, + 21, 0, 141, 2, 0x06 /* Public */, // slots: name, argc, parameters, tag, flags - 19, 0, 119, 2, 0x08 /* Private */, - 20, 0, 120, 2, 0x08 /* Private */, - 21, 0, 121, 2, 0x08 /* Private */, - 22, 0, 122, 2, 0x08 /* Private */, - 23, 0, 123, 2, 0x08 /* Private */, - 24, 0, 124, 2, 0x08 /* Private */, - 25, 1, 125, 2, 0x08 /* Private */, - 27, 0, 128, 2, 0x08 /* Private */, - 28, 1, 129, 2, 0x08 /* Private */, - 30, 0, 132, 2, 0x08 /* Private */, - 31, 1, 133, 2, 0x08 /* Private */, + 22, 0, 142, 2, 0x08 /* Private */, + 23, 0, 143, 2, 0x08 /* Private */, + 24, 0, 144, 2, 0x08 /* Private */, + 25, 0, 145, 2, 0x08 /* Private */, + 26, 0, 146, 2, 0x08 /* Private */, + 27, 0, 147, 2, 0x08 /* Private */, + 28, 1, 148, 2, 0x08 /* Private */, + 30, 0, 151, 2, 0x08 /* Private */, + 31, 1, 152, 2, 0x08 /* Private */, + 33, 0, 155, 2, 0x08 /* Private */, + 34, 1, 156, 2, 0x08 /* Private */, + 36, 0, 159, 2, 0x08 /* Private */, + 37, 0, 160, 2, 0x08 /* Private */, + 38, 0, 161, 2, 0x08 /* Private */, // signals: parameters QMetaType::Void, 0x80000000 | 3, 0x80000000 | 5, 0x80000000 | 7, 0x80000000 | 9, 4, 6, 8, 10, - QMetaType::Void, 0x80000000 | 12, 0x80000000 | 9, 13, 10, + QMetaType::Void, 0x80000000 | 12, 13, + QMetaType::Void, 0x80000000 | 15, 0x80000000 | 9, 16, 10, QMetaType::Void, - QMetaType::Void, QMetaType::QString, 16, + QMetaType::Void, QMetaType::QString, 19, QMetaType::Void, QMetaType::Bool, @@ -136,11 +151,14 @@ static const uint qt_meta_data_MainWindow[] = { QMetaType::Void, QMetaType::Void, QMetaType::Void, - QMetaType::Void, QMetaType::QString, 26, + QMetaType::Void, QMetaType::QString, 29, + QMetaType::Void, + QMetaType::Void, QMetaType::Bool, 32, + QMetaType::Void, + QMetaType::Void, QMetaType::QString, 35, + QMetaType::Void, QMetaType::Void, - QMetaType::Void, QMetaType::Bool, 29, QMetaType::Void, - QMetaType::Void, QMetaType::QString, 32, 0 // eod }; @@ -152,23 +170,27 @@ void MainWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, Q_UNUSED(_t) switch (_id) { case 0: _t->sigInitializeClient((*reinterpret_cast< RecognizeSystem*(*)>(_a[1])),(*reinterpret_cast< ExternalExecuter*(*)>(_a[2])),(*reinterpret_cast< SendSystem*(*)>(_a[3])),(*reinterpret_cast< QThread*(*)>(_a[4]))); break; - case 1: _t->sigSetConnect((*reinterpret_cast< ServerSettings*(*)>(_a[1])),(*reinterpret_cast< QThread*(*)>(_a[2]))); break; - case 2: _t->sigCalculateHash(); break; - case 3: _t->sigSendCommand((*reinterpret_cast< QString(*)>(_a[1]))); break; - case 4: _t->sigSendAutorization(); break; - case 5: { bool _r = _t->sigGetConnected(); + case 1: _t->sigUpdateFilesOnServer((*reinterpret_cast< QList*(*)>(_a[1]))); break; + case 2: _t->sigSetConnect((*reinterpret_cast< ServerSettings*(*)>(_a[1])),(*reinterpret_cast< QThread*(*)>(_a[2]))); break; + case 3: _t->sigCalculateHash(); break; + case 4: _t->sigSendCommand((*reinterpret_cast< QString(*)>(_a[1]))); break; + case 5: _t->sigSendAutorization(); break; + case 6: { bool _r = _t->sigGetConnected(); if (_a[0]) *reinterpret_cast< bool*>(_a[0]) = std::move(_r); } break; - case 6: _t->on_loginButton_clicked(); break; - case 7: _t->on_updateButton_clicked(); break; - case 8: _t->on_startButton_clicked(); break; - case 9: _t->on_saveServerButton_clicked(); break; - case 10: _t->on_settingsButton_clicked(); break; - case 11: _t->on_connectButton_clicked(); break; - case 12: _t->on_languageComboBox_activated((*reinterpret_cast< const QString(*)>(_a[1]))); break; - case 13: _t->slotDisableNotify(); break; - case 14: _t->slotConnectionState((*reinterpret_cast< bool(*)>(_a[1]))); break; - case 15: _t->slotServerDisconnect(); break; - case 16: _t->on_updateListGuideLabel_linkActivated((*reinterpret_cast< const QString(*)>(_a[1]))); break; + case 7: _t->on_loginButton_clicked(); break; + case 8: _t->on_updateButton_clicked(); break; + case 9: _t->on_startButton_clicked(); break; + case 10: _t->on_saveServerButton_clicked(); break; + case 11: _t->on_settingsButton_clicked(); break; + case 12: _t->on_connectButton_clicked(); break; + case 13: _t->on_languageComboBox_activated((*reinterpret_cast< const QString(*)>(_a[1]))); break; + case 14: _t->slotDisableNotify(); break; + case 15: _t->slotConnectionState((*reinterpret_cast< bool(*)>(_a[1]))); break; + case 16: _t->slotServerDisconnect(); break; + case 17: _t->on_updateListGuideLabel_linkActivated((*reinterpret_cast< const QString(*)>(_a[1]))); break; + case 18: _t->on_loadToServerButton_clicked(); break; + case 19: _t->on_undoChangesButton_clicked(); break; + case 20: _t->on_startWithCurrentChangesButton_clicked(); break; default: ; } } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { @@ -187,7 +209,7 @@ void MainWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, *reinterpret_cast(_a[0]) = qRegisterMetaType< SendSystem* >(); break; } break; - case 1: + case 2: switch (*reinterpret_cast(_a[1])) { default: *reinterpret_cast(_a[0]) = -1; break; case 1: @@ -204,38 +226,45 @@ void MainWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, return; } } + { + using _t = void (MainWindow::*)(QList * ); + if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&MainWindow::sigUpdateFilesOnServer)) { + *result = 1; + return; + } + } { using _t = void (MainWindow::*)(ServerSettings * , QThread * ); if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&MainWindow::sigSetConnect)) { - *result = 1; + *result = 2; return; } } { using _t = void (MainWindow::*)(); if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&MainWindow::sigCalculateHash)) { - *result = 2; + *result = 3; return; } } { using _t = void (MainWindow::*)(QString ); if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&MainWindow::sigSendCommand)) { - *result = 3; + *result = 4; return; } } { using _t = void (MainWindow::*)(); if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&MainWindow::sigSendAutorization)) { - *result = 4; + *result = 5; return; } } { using _t = bool (MainWindow::*)(); if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&MainWindow::sigGetConnected)) { - *result = 5; + *result = 6; return; } } @@ -271,13 +300,13 @@ int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a) if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { - if (_id < 17) + if (_id < 21) qt_static_metacall(this, _c, _id, _a); - _id -= 17; + _id -= 21; } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { - if (_id < 17) + if (_id < 21) qt_static_metacall(this, _c, _id, _a); - _id -= 17; + _id -= 21; } return _id; } @@ -290,37 +319,44 @@ void MainWindow::sigInitializeClient(RecognizeSystem * _t1, ExternalExecuter * _ } // SIGNAL 1 -void MainWindow::sigSetConnect(ServerSettings * _t1, QThread * _t2) +void MainWindow::sigUpdateFilesOnServer(QList * _t1) { - void *_a[] = { nullptr, const_cast(reinterpret_cast(std::addressof(_t1))), const_cast(reinterpret_cast(std::addressof(_t2))) }; + void *_a[] = { nullptr, const_cast(reinterpret_cast(std::addressof(_t1))) }; QMetaObject::activate(this, &staticMetaObject, 1, _a); } // SIGNAL 2 -void MainWindow::sigCalculateHash() +void MainWindow::sigSetConnect(ServerSettings * _t1, QThread * _t2) { - QMetaObject::activate(this, &staticMetaObject, 2, nullptr); + void *_a[] = { nullptr, const_cast(reinterpret_cast(std::addressof(_t1))), const_cast(reinterpret_cast(std::addressof(_t2))) }; + QMetaObject::activate(this, &staticMetaObject, 2, _a); } // SIGNAL 3 -void MainWindow::sigSendCommand(QString _t1) +void MainWindow::sigCalculateHash() { - void *_a[] = { nullptr, const_cast(reinterpret_cast(std::addressof(_t1))) }; - QMetaObject::activate(this, &staticMetaObject, 3, _a); + QMetaObject::activate(this, &staticMetaObject, 3, nullptr); } // SIGNAL 4 -void MainWindow::sigSendAutorization() +void MainWindow::sigSendCommand(QString _t1) { - QMetaObject::activate(this, &staticMetaObject, 4, nullptr); + void *_a[] = { nullptr, const_cast(reinterpret_cast(std::addressof(_t1))) }; + QMetaObject::activate(this, &staticMetaObject, 4, _a); } // SIGNAL 5 +void MainWindow::sigSendAutorization() +{ + QMetaObject::activate(this, &staticMetaObject, 5, nullptr); +} + +// SIGNAL 6 bool MainWindow::sigGetConnected() { bool _t0{}; void *_a[] = { const_cast(reinterpret_cast(std::addressof(_t0))) }; - QMetaObject::activate(this, &staticMetaObject, 5, _a); + QMetaObject::activate(this, &staticMetaObject, 6, _a); return _t0; } QT_WARNING_POP diff --git a/debug/moc_mainwindow.o b/debug/moc_mainwindow.o index ba54b00..decbe46 100644 Binary files a/debug/moc_mainwindow.o and b/debug/moc_mainwindow.o differ diff --git a/debug/moc_updatenotifywidget.cpp b/debug/moc_updatenotifywidget.cpp index 8f5b890..411f3d8 100644 --- a/debug/moc_updatenotifywidget.cpp +++ b/debug/moc_updatenotifywidget.cpp @@ -10,7 +10,6 @@ #include "../updatenotifywidget.h" #include #include -#include #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'updatenotifywidget.h' doesn't include ." #elif Q_MOC_OUTPUT_REVISION != 67 @@ -23,8 +22,8 @@ QT_BEGIN_MOC_NAMESPACE QT_WARNING_PUSH QT_WARNING_DISABLE_DEPRECATED struct qt_meta_stringdata_UpdateNotifyWidget_t { - QByteArrayData data[10]; - char stringdata0[174]; + QByteArrayData data[3]; + char stringdata0[43]; }; #define QT_MOC_LITERAL(idx, ofs, len) \ Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ @@ -34,22 +33,12 @@ struct qt_meta_stringdata_UpdateNotifyWidget_t { static const qt_meta_stringdata_UpdateNotifyWidget_t qt_meta_stringdata_UpdateNotifyWidget = { { QT_MOC_LITERAL(0, 0, 18), // "UpdateNotifyWidget" -QT_MOC_LITERAL(1, 19, 22), // "sigUpdateFilesOnServer" -QT_MOC_LITERAL(2, 42, 0), // "" -QT_MOC_LITERAL(3, 43, 16), // "QList*" -QT_MOC_LITERAL(4, 60, 12), // "fileSendList" -QT_MOC_LITERAL(5, 73, 21), // "showCompleteDialogBox" -QT_MOC_LITERAL(6, 95, 4), // "flag" -QT_MOC_LITERAL(7, 100, 26), // "on_StartLoadButton_clicked" -QT_MOC_LITERAL(8, 127, 23), // "on_CancelButton_clicked" -QT_MOC_LITERAL(9, 151, 22) // "on_closeButton_clicked" +QT_MOC_LITERAL(1, 19, 22), // "on_closeButton_clicked" +QT_MOC_LITERAL(2, 42, 0) // "" }, - "UpdateNotifyWidget\0sigUpdateFilesOnServer\0" - "\0QList*\0fileSendList\0" - "showCompleteDialogBox\0flag\0" - "on_StartLoadButton_clicked\0" - "on_CancelButton_clicked\0on_closeButton_clicked" + "UpdateNotifyWidget\0on_closeButton_clicked\0" + "" }; #undef QT_MOC_LITERAL @@ -59,29 +48,17 @@ static const uint qt_meta_data_UpdateNotifyWidget[] = { 8, // revision 0, // classname 0, 0, // classinfo - 5, 14, // methods + 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, 39, 2, 0x06 /* Public */, + 0, // signalCount // slots: name, argc, parameters, tag, flags - 5, 1, 42, 2, 0x08 /* Private */, - 7, 0, 45, 2, 0x08 /* Private */, - 8, 0, 46, 2, 0x08 /* Private */, - 9, 0, 47, 2, 0x08 /* Private */, - - // signals: parameters - QMetaType::Void, 0x80000000 | 3, 4, + 1, 0, 19, 2, 0x08 /* Private */, // slots: parameters - QMetaType::Void, QMetaType::Bool, 6, - QMetaType::Void, - QMetaType::Void, QMetaType::Void, 0 // eod @@ -93,23 +70,11 @@ void UpdateNotifyWidget::qt_static_metacall(QObject *_o, QMetaObject::Call _c, i auto *_t = static_cast(_o); Q_UNUSED(_t) switch (_id) { - case 0: _t->sigUpdateFilesOnServer((*reinterpret_cast< QList*(*)>(_a[1]))); break; - case 1: _t->showCompleteDialogBox((*reinterpret_cast< bool(*)>(_a[1]))); break; - case 2: _t->on_StartLoadButton_clicked(); break; - case 3: _t->on_CancelButton_clicked(); break; - case 4: _t->on_closeButton_clicked(); break; + case 0: _t->on_closeButton_clicked(); break; default: ; } - } else if (_c == QMetaObject::IndexOfMethod) { - int *result = reinterpret_cast(_a[0]); - { - using _t = void (UpdateNotifyWidget::*)(QList * ); - if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&UpdateNotifyWidget::sigUpdateFilesOnServer)) { - *result = 0; - return; - } - } } + Q_UNUSED(_a); } QT_INIT_METAOBJECT const QMetaObject UpdateNotifyWidget::staticMetaObject = { { @@ -141,22 +106,15 @@ int UpdateNotifyWidget::qt_metacall(QMetaObject::Call _c, int _id, void **_a) if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { - if (_id < 5) + if (_id < 1) qt_static_metacall(this, _c, _id, _a); - _id -= 5; + _id -= 1; } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { - if (_id < 5) + if (_id < 1) *reinterpret_cast(_a[0]) = -1; - _id -= 5; + _id -= 1; } return _id; } - -// SIGNAL 0 -void UpdateNotifyWidget::sigUpdateFilesOnServer(QList * _t1) -{ - void *_a[] = { nullptr, const_cast(reinterpret_cast(std::addressof(_t1))) }; - QMetaObject::activate(this, &staticMetaObject, 0, _a); -} QT_WARNING_POP QT_END_MOC_NAMESPACE diff --git a/debug/moc_updatenotifywidget.o b/debug/moc_updatenotifywidget.o index 0a9de9c..8308494 100644 Binary files a/debug/moc_updatenotifywidget.o and b/debug/moc_updatenotifywidget.o differ diff --git a/debug/qrc_resources.cpp b/debug/qrc_resources.cpp index 5932a85..b669173 100644 --- a/debug/qrc_resources.cpp +++ b/debug/qrc_resources.cpp @@ -8,7 +8,7 @@ static const unsigned char qt_resource_data[] = { // E:/Projects/QT/GUIProj/RRJClient/RRJClient/style.css - 0x0,0x0,0x5,0xb3, + 0x0,0x0,0x6,0x87, 0xd, 0xa,0x51,0x4d,0x61,0x69,0x6e,0x57,0x69,0x6e,0x64,0x6f,0x77,0xd,0xa,0x7b,0xd, 0xa,0x20,0x20,0x20,0x20,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x2d, @@ -33,75 +33,88 @@ static const unsigned char qt_resource_data[] = { 0x20,0x20,0x20,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x2d,0x63,0x6f, 0x6c,0x6f,0x72,0x3a,0x20,0x6c,0x69,0x67,0x68,0x74,0x47,0x72,0x61,0x79,0x3b,0xd, 0xa,0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x67,0x72,0x61,0x79, - 0xd,0xa,0x7d,0xd,0xa,0xd,0xa,0x51,0x4c,0x69,0x6e,0x65,0x45,0x64,0x69,0x74, - 0xd,0xa,0x7b,0xd,0xa,0x20,0x20,0x20,0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x2d, - 0x73,0x74,0x79,0x6c,0x65,0x3a,0x20,0x6f,0x75,0x74,0x73,0x65,0x74,0x3b,0xd,0xa, + 0xd,0xa,0x7d,0xd,0xa,0xd,0xa,0x51,0x4d,0x65,0x73,0x73,0x61,0x67,0x65,0x42, + 0x6f,0x78,0x20,0x51,0x4c,0x61,0x62,0x65,0x6c,0xd,0xa,0x7b,0xd,0xa,0x20,0x20, + 0x20,0x20,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x22, + 0x43,0x61,0x6c,0x69,0x62,0x72,0x69,0x22,0x3b,0xd,0xa,0x20,0x20,0x20,0x20,0x66, + 0x6f,0x6e,0x74,0x3a,0x20,0x32,0x30,0x70,0x78,0x3b,0xd,0xa,0x20,0x20,0x20,0x20, + 0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x62,0x6c,0x61,0x63,0x6b,0x3b,0xd,0xa,0x7d, + 0xd,0xa,0xd,0xa,0x51,0x4d,0x65,0x73,0x73,0x61,0x67,0x65,0x42,0x6f,0x78,0x20, + 0x51,0x50,0x75,0x73,0x68,0x42,0x75,0x74,0x74,0x6f,0x6e,0xd,0xa,0x7b,0xd,0xa, 0x20,0x20,0x20,0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x2d,0x72,0x61,0x64,0x69,0x75, - 0x73,0x3a,0x20,0x33,0x70,0x78,0x3b,0xd,0xa,0x7d,0xd,0xa,0xd,0xa,0x51,0x50, - 0x72,0x6f,0x67,0x72,0x65,0x73,0x73,0x42,0x61,0x72,0xd,0xa,0x7b,0xd,0xa,0x20, - 0x20,0x20,0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x3a,0x20,0x32,0x70,0x78,0x20,0x73, - 0x6f,0x6c,0x69,0x64,0x20,0x72,0x67,0x62,0x28,0x34,0x35,0x2c,0x38,0x34,0x2c,0x31, - 0x33,0x30,0x29,0x3b,0xd,0xa,0x20,0x20,0x20,0x20,0x62,0x6f,0x72,0x64,0x65,0x72, - 0x2d,0x72,0x61,0x64,0x69,0x75,0x73,0x3a,0x20,0x31,0x32,0x70,0x78,0x3b,0xd,0xa, - 0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x62,0x6c,0x61,0x63,0x6b, - 0x3b,0xd,0xa,0x20,0x20,0x20,0x20,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69, - 0x6c,0x79,0x3a,0x20,0x22,0x43,0x61,0x6c,0x69,0x62,0x72,0x69,0x22,0x3b,0xd,0xa, - 0x20,0x20,0x20,0x20,0x66,0x6f,0x6e,0x74,0x3a,0x20,0x31,0x35,0x70,0x78,0x20,0x62, - 0x6f,0x6c,0x64,0x3b,0xd,0xa,0x20,0x20,0x20,0x20,0x74,0x65,0x78,0x74,0x2d,0x61, - 0x6c,0x69,0x67,0x6e,0x3a,0x20,0x63,0x65,0x6e,0x74,0x65,0x72,0x3b,0xd,0xa,0x7d, - 0xd,0xa,0xd,0xa,0xd,0xa,0x51,0x50,0x72,0x6f,0x67,0x72,0x65,0x73,0x73,0x42, - 0x61,0x72,0x3a,0x3a,0x63,0x68,0x75,0x6e,0x6b,0xd,0xa,0x7b,0xd,0xa,0x20,0x20, - 0x20,0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x2d,0x72,0x61,0x64,0x69,0x75,0x73,0x3a, - 0x20,0x31,0x30,0x70,0x78,0x3b,0xd,0xa,0x20,0x20,0x20,0x20,0x62,0x61,0x63,0x6b, - 0x67,0x72,0x6f,0x75,0x6e,0x64,0x2d,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x72,0x67, - 0x62,0x28,0x31,0x35,0x31,0x2c,0x31,0x37,0x36,0x2c,0x32,0x30,0x31,0x29,0x3b,0xd, - 0xa,0x7d,0xd,0xa,0xd,0xa,0x51,0x43,0x68,0x65,0x63,0x6b,0x42,0x6f,0x78,0xd, - 0xa,0x7b,0xd,0xa,0x20,0x20,0x20,0x20,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d, - 0x69,0x6c,0x79,0x3a,0x22,0x43,0x61,0x6c,0x69,0x62,0x72,0x69,0x22,0x3b,0xd,0xa, - 0x20,0x20,0x20,0x20,0x66,0x6f,0x6e,0x74,0x3a,0x20,0x31,0x36,0x70,0x78,0x3b,0xd, - 0xa,0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x77,0x68,0x69,0x74, - 0x65,0x3b,0xd,0xa,0x7d,0xd,0xa,0xd,0xa,0x51,0x4c,0x61,0x62,0x65,0x6c,0xd, - 0xa,0x7b,0xd,0xa,0x20,0x20,0x20,0x20,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d, - 0x69,0x6c,0x79,0x3a,0x20,0x22,0x43,0x61,0x6c,0x69,0x62,0x72,0x69,0x22,0x3b,0xd, - 0xa,0x20,0x20,0x20,0x20,0x66,0x6f,0x6e,0x74,0x3a,0x20,0x31,0x37,0x70,0x78,0x3b, - 0xd,0xa,0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x77,0x68,0x69, - 0x74,0x65,0x3b,0xd,0xa,0x7d,0xd,0xa,0xd,0xa,0x51,0x4c,0x61,0x62,0x65,0x6c, - 0x23,0x6c,0x61,0x6e,0x67,0x75,0x61,0x67,0x65,0x54,0x69,0x74,0x6c,0x65,0xd,0xa, - 0x7b,0xd,0xa,0x20,0x20,0x20,0x20,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69, - 0x6c,0x79,0x3a,0x20,0x22,0x43,0x61,0x6c,0x69,0x62,0x72,0x69,0x22,0x3b,0xd,0xa, - 0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x77,0x68,0x69,0x74,0x65, - 0x3b,0xd,0xa,0x7d,0xd,0xa,0xd,0xa,0x51,0x4c,0x61,0x62,0x65,0x6c,0x23,0x6e, - 0x6f,0x74,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x61,0x62,0x65,0x6c, - 0xd,0xa,0x7b,0xd,0xa,0x20,0x20,0x20,0x20,0x66,0x6f,0x6e,0x74,0x3a,0x20,0x32, - 0x30,0x70,0x78,0x3b,0xd,0xa,0x7d,0xd,0xa,0xd,0xa,0x51,0x50,0x75,0x73,0x68, - 0x42,0x75,0x74,0x74,0x6f,0x6e,0x23,0x64,0x69,0x73,0x70,0x6c,0x61,0x79,0x56,0x69, - 0x65,0x77,0xd,0xa,0x7b,0xd,0xa,0x20,0x20,0x20,0x20,0x62,0x6f,0x72,0x64,0x65, - 0x72,0x3a,0x20,0x34,0x70,0x78,0x20,0x73,0x6f,0x6c,0x69,0x64,0x20,0x72,0x67,0x62, - 0x28,0x34,0x35,0x2c,0x38,0x34,0x2c,0x31,0x33,0x30,0x29,0x3b,0xd,0xa,0x20,0x20, - 0x20,0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x2d,0x72,0x61,0x64,0x69,0x75,0x73,0x3a, - 0x20,0x35,0x70,0x78,0x3b,0xd,0xa,0x20,0x20,0x20,0x20,0x62,0x61,0x63,0x6b,0x67, - 0x72,0x6f,0x75,0x6e,0x64,0x2d,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x77,0x68,0x69, - 0x74,0x65,0x3b,0xd,0xa,0x7d,0xd,0xa,0xd,0xa,0x51,0x50,0x75,0x73,0x68,0x42, - 0x75,0x74,0x74,0x6f,0x6e,0x23,0x64,0x69,0x73,0x70,0x6c,0x61,0x79,0x56,0x69,0x65, - 0x77,0x3a,0x63,0x68,0x65,0x63,0x6b,0x65,0x64,0xd,0xa,0x7b,0xd,0xa,0x20,0x20, - 0x20,0x20,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x2d,0x63,0x6f,0x6c, - 0x6f,0x72,0x3a,0x20,0x72,0x67,0x62,0x28,0x31,0x35,0x31,0x2c,0x31,0x37,0x36,0x2c, - 0x32,0x30,0x31,0x29,0x3b,0xd,0xa,0x7d,0xd,0xa,0xd,0xa,0xd,0xa,0x51,0x50, + 0x73,0x3a,0x20,0x32,0x70,0x78,0x3b,0xd,0xa,0x20,0x20,0x20,0x20,0x70,0x61,0x64, + 0x64,0x69,0x6e,0x67,0x3a,0x20,0x30,0x2e,0x32,0x65,0x6d,0x20,0x30,0x2e,0x32,0x65, + 0x6d,0x20,0x30,0x2e,0x33,0x65,0x6d,0x20,0x30,0x2e,0x32,0x65,0x6d,0x3b,0xd,0xa, + 0x20,0x20,0x20,0x20,0x6d,0x69,0x6e,0x2d,0x77,0x69,0x64,0x74,0x68,0x3a,0x20,0x37, + 0x30,0x70,0x78,0x3b,0xd,0xa,0x7d,0xd,0xa,0xd,0xa,0x51,0x4c,0x69,0x6e,0x65, + 0x45,0x64,0x69,0x74,0xd,0xa,0x7b,0xd,0xa,0x20,0x20,0x20,0x20,0x62,0x6f,0x72, + 0x64,0x65,0x72,0x2d,0x73,0x74,0x79,0x6c,0x65,0x3a,0x20,0x6f,0x75,0x74,0x73,0x65, + 0x74,0x3b,0xd,0xa,0x20,0x20,0x20,0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x2d,0x72, + 0x61,0x64,0x69,0x75,0x73,0x3a,0x20,0x33,0x70,0x78,0x3b,0xd,0xa,0x7d,0xd,0xa, + 0xd,0xa,0x51,0x50,0x72,0x6f,0x67,0x72,0x65,0x73,0x73,0x42,0x61,0x72,0xd,0xa, + 0x7b,0xd,0xa,0x20,0x20,0x20,0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x3a,0x20,0x32, + 0x70,0x78,0x20,0x73,0x6f,0x6c,0x69,0x64,0x20,0x72,0x67,0x62,0x28,0x34,0x35,0x2c, + 0x38,0x34,0x2c,0x31,0x33,0x30,0x29,0x3b,0xd,0xa,0x20,0x20,0x20,0x20,0x62,0x6f, + 0x72,0x64,0x65,0x72,0x2d,0x72,0x61,0x64,0x69,0x75,0x73,0x3a,0x20,0x31,0x32,0x70, + 0x78,0x3b,0xd,0xa,0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x62, + 0x6c,0x61,0x63,0x6b,0x3b,0xd,0xa,0x20,0x20,0x20,0x20,0x66,0x6f,0x6e,0x74,0x2d, + 0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x22,0x43,0x61,0x6c,0x69,0x62,0x72,0x69, + 0x22,0x3b,0xd,0xa,0x20,0x20,0x20,0x20,0x66,0x6f,0x6e,0x74,0x3a,0x20,0x31,0x35, + 0x70,0x78,0x20,0x62,0x6f,0x6c,0x64,0x3b,0xd,0xa,0x20,0x20,0x20,0x20,0x74,0x65, + 0x78,0x74,0x2d,0x61,0x6c,0x69,0x67,0x6e,0x3a,0x20,0x63,0x65,0x6e,0x74,0x65,0x72, + 0x3b,0xd,0xa,0x7d,0xd,0xa,0xd,0xa,0xd,0xa,0x51,0x50,0x72,0x6f,0x67,0x72, + 0x65,0x73,0x73,0x42,0x61,0x72,0x3a,0x3a,0x63,0x68,0x75,0x6e,0x6b,0xd,0xa,0x7b, + 0xd,0xa,0x20,0x20,0x20,0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x2d,0x72,0x61,0x64, + 0x69,0x75,0x73,0x3a,0x20,0x31,0x30,0x70,0x78,0x3b,0xd,0xa,0x20,0x20,0x20,0x20, + 0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x2d,0x63,0x6f,0x6c,0x6f,0x72, + 0x3a,0x20,0x72,0x67,0x62,0x28,0x32,0x30,0x33,0x2c,0x32,0x32,0x38,0x2c,0x32,0x35, + 0x35,0x29,0x3b,0xd,0xa,0x7d,0xd,0xa,0xd,0xa,0x51,0x43,0x68,0x65,0x63,0x6b, + 0x42,0x6f,0x78,0xd,0xa,0x7b,0xd,0xa,0x20,0x20,0x20,0x20,0x66,0x6f,0x6e,0x74, + 0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x22,0x43,0x61,0x6c,0x69,0x62,0x72,0x69, + 0x22,0x3b,0xd,0xa,0x20,0x20,0x20,0x20,0x66,0x6f,0x6e,0x74,0x3a,0x20,0x31,0x36, + 0x70,0x78,0x3b,0xd,0xa,0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20, + 0x77,0x68,0x69,0x74,0x65,0x3b,0xd,0xa,0x7d,0xd,0xa,0xd,0xa,0x51,0x4c,0x61, + 0x62,0x65,0x6c,0xd,0xa,0x7b,0xd,0xa,0x20,0x20,0x20,0x20,0x66,0x6f,0x6e,0x74, + 0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x22,0x43,0x61,0x6c,0x69,0x62,0x72, + 0x69,0x22,0x3b,0xd,0xa,0x20,0x20,0x20,0x20,0x66,0x6f,0x6e,0x74,0x3a,0x20,0x31, + 0x37,0x70,0x78,0x3b,0xd,0xa,0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3a, + 0x20,0x77,0x68,0x69,0x74,0x65,0x3b,0xd,0xa,0x7d,0xd,0xa,0xd,0xa,0x51,0x4c, + 0x61,0x62,0x65,0x6c,0x23,0x6c,0x61,0x6e,0x67,0x75,0x61,0x67,0x65,0x54,0x69,0x74, + 0x6c,0x65,0xd,0xa,0x7b,0xd,0xa,0x20,0x20,0x20,0x20,0x66,0x6f,0x6e,0x74,0x2d, + 0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x22,0x43,0x61,0x6c,0x69,0x62,0x72,0x69, + 0x22,0x3b,0xd,0xa,0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x77, + 0x68,0x69,0x74,0x65,0x3b,0xd,0xa,0x7d,0xd,0xa,0xd,0xa,0x51,0x4c,0x61,0x62, + 0x65,0x6c,0x23,0x6e,0x6f,0x74,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e,0x4c, + 0x61,0x62,0x65,0x6c,0xd,0xa,0x7b,0xd,0xa,0x20,0x20,0x20,0x20,0x66,0x6f,0x6e, + 0x74,0x3a,0x20,0x32,0x30,0x70,0x78,0x3b,0xd,0xa,0x7d,0xd,0xa,0xd,0xa,0x51, + 0x50,0x75,0x73,0x68,0x42,0x75,0x74,0x74,0x6f,0x6e,0x23,0x64,0x69,0x73,0x70,0x6c, + 0x61,0x79,0x56,0x69,0x65,0x77,0xd,0xa,0x7b,0xd,0xa,0x20,0x20,0x20,0x20,0x62, + 0x6f,0x72,0x64,0x65,0x72,0x3a,0x20,0x34,0x70,0x78,0x20,0x73,0x6f,0x6c,0x69,0x64, + 0x20,0x72,0x67,0x62,0x28,0x34,0x35,0x2c,0x38,0x34,0x2c,0x31,0x33,0x30,0x29,0x3b, + 0xd,0xa,0x20,0x20,0x20,0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x2d,0x72,0x61,0x64, + 0x69,0x75,0x73,0x3a,0x20,0x35,0x70,0x78,0x3b,0xd,0xa,0x20,0x20,0x20,0x20,0x62, + 0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x2d,0x63,0x6f,0x6c,0x6f,0x72,0x3a, + 0x20,0x77,0x68,0x69,0x74,0x65,0x3b,0xd,0xa,0x7d,0xd,0xa,0xd,0xa,0x51,0x50, 0x75,0x73,0x68,0x42,0x75,0x74,0x74,0x6f,0x6e,0x23,0x64,0x69,0x73,0x70,0x6c,0x61, - 0x79,0x56,0x69,0x65,0x77,0x3a,0x64,0x69,0x73,0x61,0x62,0x6c,0x65,0x64,0xd,0xa, - 0x7b,0xd,0xa,0x20,0x20,0x20,0x20,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e, - 0x64,0x2d,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x72,0x67,0x62,0x28,0x31,0x35,0x31, - 0x2c,0x31,0x37,0x36,0x2c,0x32,0x30,0x31,0x29,0x3b,0xd,0xa,0x20,0x20,0x20,0x20, - 0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x72,0x67,0x62,0x28,0x34,0x35,0x2c,0x38,0x34,0x2c, - 0x31,0x33,0x30,0x29,0x3b,0xd,0xa,0x7d,0xd,0xa,0xd,0xa,0x51,0x50,0x75,0x73, - 0x68,0x42,0x75,0x74,0x74,0x6f,0x6e,0x23,0x6c,0x69,0x6e,0x6b,0x42,0x75,0x74,0x74, - 0x6f,0x6e,0xd,0xa,0x7b,0xd,0xa,0x20,0x20,0x20,0x20,0x62,0x61,0x63,0x6b,0x67, + 0x79,0x56,0x69,0x65,0x77,0x3a,0x63,0x68,0x65,0x63,0x6b,0x65,0x64,0xd,0xa,0x7b, + 0xd,0xa,0x20,0x20,0x20,0x20,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64, + 0x2d,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x72,0x67,0x62,0x28,0x31,0x35,0x31,0x2c, + 0x31,0x37,0x36,0x2c,0x32,0x30,0x31,0x29,0x3b,0xd,0xa,0x7d,0xd,0xa,0xd,0xa, + 0xd,0xa,0x51,0x50,0x75,0x73,0x68,0x42,0x75,0x74,0x74,0x6f,0x6e,0x23,0x64,0x69, + 0x73,0x70,0x6c,0x61,0x79,0x56,0x69,0x65,0x77,0x3a,0x64,0x69,0x73,0x61,0x62,0x6c, + 0x65,0x64,0xd,0xa,0x7b,0xd,0xa,0x20,0x20,0x20,0x20,0x62,0x61,0x63,0x6b,0x67, 0x72,0x6f,0x75,0x6e,0x64,0x2d,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x72,0x67,0x62, - 0x61,0x28,0x30,0x2c,0x30,0x2c,0x30,0x2c,0x30,0x29,0x3b,0xd,0xa,0x20,0x20,0x20, - 0x20,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x22,0x43, - 0x61,0x6c,0x69,0x62,0x72,0x69,0x22,0x3b,0xd,0xa,0x20,0x20,0x20,0x20,0x63,0x6f, - 0x6c,0x6f,0x72,0x3a,0x62,0x6c,0x75,0x65,0x3b,0xd,0xa,0xd,0xa,0x7d,0xd,0xa, - 0xd,0xa, + 0x28,0x31,0x35,0x31,0x2c,0x31,0x37,0x36,0x2c,0x32,0x30,0x31,0x29,0x3b,0xd,0xa, + 0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x72,0x67,0x62,0x28,0x34,0x35, + 0x2c,0x38,0x34,0x2c,0x31,0x33,0x30,0x29,0x3b,0xd,0xa,0x7d,0xd,0xa,0xd,0xa, + 0x51,0x50,0x75,0x73,0x68,0x42,0x75,0x74,0x74,0x6f,0x6e,0x23,0x6c,0x69,0x6e,0x6b, + 0x42,0x75,0x74,0x74,0x6f,0x6e,0xd,0xa,0x7b,0xd,0xa,0x20,0x20,0x20,0x20,0x62, + 0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x2d,0x63,0x6f,0x6c,0x6f,0x72,0x3a, + 0x20,0x72,0x67,0x62,0x61,0x28,0x30,0x2c,0x30,0x2c,0x30,0x2c,0x30,0x29,0x3b,0xd, + 0xa,0x20,0x20,0x20,0x20,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79, + 0x3a,0x20,0x22,0x43,0x61,0x6c,0x69,0x62,0x72,0x69,0x22,0x3b,0xd,0xa,0x20,0x20, + 0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x62,0x6c,0x75,0x65,0x3b,0xd,0xa,0xd, + 0xa,0x7d,0xd,0xa,0xd,0xa, // E:/Projects/QT/GUIProj/RRJClient/RRJClient/resource/SSJ-100.png 0x0,0x8,0x31,0x5f, 0x89, @@ -69675,7 +69688,7 @@ static const unsigned char qt_resource_struct[] = { 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, // :/style.css 0x0,0x0,0x0,0x16,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x0, -0x0,0x0,0x1,0x92,0x48,0x9,0x7,0xd0, +0x0,0x0,0x1,0x92,0x4c,0x3f,0xc0,0xc2, // :/resource 0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x3,0x0,0x0,0x0,0x3, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, @@ -69686,28 +69699,28 @@ static const unsigned char qt_resource_struct[] = { 0x0,0x0,0x0,0x4a,0x0,0x2,0x0,0x0,0x0,0x4,0x0,0x0,0x0,0x6, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, // :/resource/SSJ-100.png - 0x0,0x0,0x0,0x2e,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x5,0xb7, + 0x0,0x0,0x0,0x2e,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x6,0x8b, 0x0,0x0,0x1,0x92,0x42,0xa,0xa2,0x28, // :/resource/Icons/setting.png - 0x0,0x0,0x1,0x56,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x10,0xcc,0x51, + 0x0,0x0,0x1,0x56,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x10,0xcd,0x25, 0x0,0x0,0x1,0x92,0x47,0x9,0xdd,0xaa, // :/resource/Icons/settingWhite.png - 0x0,0x0,0x1,0x4,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x10,0x80,0x4a, + 0x0,0x0,0x1,0x4,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x10,0x81,0x1e, 0x0,0x0,0x1,0x92,0x47,0xc,0xaf,0x4c, // :/resource/Icons/plane.png - 0x0,0x0,0x1,0x72,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x10,0xf7,0x63, + 0x0,0x0,0x1,0x72,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x10,0xf8,0x37, 0x0,0x0,0x1,0x91,0xb3,0xf,0xc0,0x1f, // :/resource/Icons/monitor-display.png - 0x0,0x0,0x1,0x2a,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x10,0xc6,0x82, + 0x0,0x0,0x1,0x2a,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x10,0xc7,0x56, 0x0,0x0,0x1,0x92,0x42,0xfe,0x89,0x26, // :/resource/Fonts/HelveticaNeue-Medium.ttf - 0x0,0x0,0x0,0x6a,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x8,0x37,0x1a, + 0x0,0x0,0x0,0x6a,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x8,0x37,0xee, 0x0,0x0,0x1,0x92,0x42,0xb4,0xbd,0xcd, // :/resource/Fonts/LiberationSans-Regular.ttf - 0x0,0x0,0x0,0xca,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0xb,0x28,0x4e, + 0x0,0x0,0x0,0xca,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0xb,0x29,0x22, 0x0,0x0,0x1,0x92,0x42,0x25,0xa7,0xdc, // :/resource/Fonts/Kanit Cyrillic.ttf - 0x0,0x0,0x0,0xa0,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0xa,0xa0,0x8e, + 0x0,0x0,0x0,0xa0,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0xa,0xa1,0x62, 0x0,0x0,0x1,0x92,0x42,0x14,0x94,0xcc, }; diff --git a/debug/qrc_resources.o b/debug/qrc_resources.o index b8a66ba..068b805 100644 Binary files a/debug/qrc_resources.o and b/debug/qrc_resources.o differ diff --git a/debug/updatenotifywidget.o b/debug/updatenotifywidget.o index d9f4bc6..bdefdc4 100644 Binary files a/debug/updatenotifywidget.o and b/debug/updatenotifywidget.o differ diff --git a/mainwindow.cpp b/mainwindow.cpp index 58e165c..c966c9f 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1,8 +1,10 @@ #include "mainwindow.h" #include "ui_mainwindow.h" #include "updatenotifywidget.h" +#include "updatenotifywidget.h" #include +#include #include #include #include @@ -34,7 +36,9 @@ void MainWindow::initialize() ui->autostartCheckBox->hide(); ui->startButton->setEnabled(false); ui->loginWidget->hide(); + ui->updateWidget->hide(); + ui->updateButtonGroup_2->hide(); createObjects(); @@ -51,7 +55,6 @@ void MainWindow::initialize() emit sigSetConnect(dataParser->getServerSettings(),connectionThread); checkAppAvailable(); - } void MainWindow::createObjects() @@ -96,11 +99,15 @@ void MainWindow::bindConnection() connect(recognizeSystem,&RecognizeSystem::sigSocketWaitForReadyRead,client,&TCPClient::waitRead,Qt::AutoConnection); connect(recognizeSystem,&RecognizeSystem::sigServerBlocked,this,&MainWindow::serverBlocked); + connect(updateController,&UpdateController::sigUpdateComplete,this,&MainWindow::showCompleteDialogBox); + connect(hashComparer,&HashComparer::sigCallCheck,this,&MainWindow::checkUpdate); connect(hashComparer,&HashComparer::sigHaveDelta,this,&MainWindow::showUpdateInfo); + connect(sendSystem,&SendSystem::sigSend,this,&MainWindow::updateProgress); connect(sendSystem,&SendSystem::sigGetXmlAnswer,dataParser,&DataParser::slotGetXmlAnswer); + connect(this,&MainWindow::sigUpdateFilesOnServer,updateController,&UpdateController::updateFilesOnServer); connect(this,&MainWindow::sigInitializeClient,client,&TCPClient::initialize,Qt::AutoConnection); connect(this,&MainWindow::sigSetConnect,client,&TCPClient::setConnect,Qt::AutoConnection); connect(this,&MainWindow::sigSendCommand,client,&TCPClient::slotSendCommand,Qt::AutoConnection); @@ -156,6 +163,7 @@ void MainWindow::setNeedUpdate(bool flag,quint64 size, quint64 fileCount) ui->loadingProgressBar->setValue(100); autoStart(); ui->startButton->show(); + ui->offlineStartButton->setGeometry(570,510,220,35); ui->offlineStartButton->show(); } @@ -311,14 +319,13 @@ void MainWindow::callUpdateList() QByteArray answer = dataParser->xmlAnswer_notify("GETSERVERDATALIST"); sendSystem->sendXMLAnswer(answer); - updateWidget->initialize(this,updateController); + updateWidget->initialize(this); } void MainWindow::bindNotifyWidget(UpdateNotifyWidget *widget) { updateWidget = widget; - connect(sendSystem,&SendSystem::sigSend,updateWidget,&UpdateNotifyWidget::updateCount); } void MainWindow::on_loginButton_clicked() @@ -406,6 +413,36 @@ void MainWindow::on_languageComboBox_activated(const QString &arg1) ui->retranslateUi(this); } +void MainWindow::on_loadToServerButton_clicked() +{ + ui->inlineTextDebug->setText(tr("Отправка файлов...")); + ui->loadingProgressBar->show(); + ui->updateButtonGroup_2->hide(); + ui->offlineStartButton->hide(); + ui->updateWidget->hide(); + + emit sigUpdateFilesOnServer(hashComparer->getFilesForUpdate()); +} + +void MainWindow::on_undoChangesButton_clicked() +{ + ui->loadingProgressBar->show(); + ui->offlineStartButton->hide(); + ui->updateButtonGroup_2->hide(); + ui->updateWidget->hide(); + on_updateButton_clicked(); +} + +void MainWindow::on_startWithCurrentChangesButton_clicked() +{ + on_startButton_clicked(); +} + +void MainWindow::on_updateListGuideLabel_linkActivated(const QString &link) +{ + updateWidget->show(); +} + void MainWindow::checkUpdate() { ui->loadingProgressBar->setValue(0); @@ -420,14 +457,42 @@ void MainWindow::showUpdateInfo() QString list = tr("Возможные действия:\n" " 1. Загрузить изменения на сервер\n" " 2. Отменить изменения с загрузкой версии с сервера \n" - " 3. Запустить с текущими изменениями"); + " 3. Запустить без отправки файлов, но с текущими изменениями"); ui->updateListGuideLabel->setText(text); ui->updateActionListLabel->setText(list); ui->updateWidget->show(); + ui->updateButtonGroup_2->show(); ui->offlineStartButton->setGeometry(570,552,220,35); + fileCountForUpdate = hashComparer->getFilesForUpdate()->length(); + + filesLoaded = 0; +} + +void MainWindow::showCompleteDialogBox(bool flag) +{ + QMessageBox *messageBox = new QMessageBox(this); + + if(flag) + { + messageBox->setIcon(QMessageBox::Information); + messageBox->setWindowTitle(tr("Информация")); + messageBox->addButton(QMessageBox::Ok); + messageBox->setStyleSheet("QMessageBox {color: black;}"); + messageBox->setText(tr("Загрузка завершена")); + } + else + { + messageBox->setIcon(QMessageBox::Warning); + messageBox->setWindowTitle(tr("Ошибка")); + messageBox->addButton(QMessageBox::Ok); + messageBox->setText(tr("Произошла ошибка при загрузке")); + } + + connect(messageBox,&QMessageBox::accepted,this,&MainWindow::checkUpdate); + messageBox->show(); } void MainWindow::keyPressEvent(QKeyEvent *event) @@ -441,12 +506,6 @@ void MainWindow::keyPressEvent(QKeyEvent *event) } } - -void MainWindow::on_updateListGuideLabel_linkActivated(const QString &link) -{ - updateWidget->show(); -} - void MainWindow::painting() { QFontDatabase::addApplicationFont(":/resource/Fonts/Kanit Cyrillic.ttf"); @@ -479,3 +538,4 @@ MainWindow::~MainWindow() } + diff --git a/mainwindow.h b/mainwindow.h index a64a1db..29c2397 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -44,6 +44,7 @@ signals: SendSystem *sendSystem, QThread *thread); + void sigUpdateFilesOnServer(QList *fileSendList); void sigSetConnect(ServerSettings* serverSettings,QThread *thread); void sigCalculateHash(); void sigSendCommand(QString message); @@ -52,26 +53,19 @@ signals: private slots: void on_loginButton_clicked(); - void on_updateButton_clicked(); - void on_startButton_clicked(); - void on_saveServerButton_clicked(); - void on_settingsButton_clicked(); - void on_connectButton_clicked(); - void on_languageComboBox_activated(const QString &arg1); - void slotDisableNotify(); - void slotConnectionState(bool flag); - void slotServerDisconnect(); - void on_updateListGuideLabel_linkActivated(const QString &link); + void on_loadToServerButton_clicked(); + void on_undoChangesButton_clicked(); + void on_startWithCurrentChangesButton_clicked(); private: Ui::MainWindow *ui; @@ -87,6 +81,7 @@ private: HashComparer *hashComparer; QThread *connectionThread; QTimer *timer; + QList *updateList; int fileCountForUpdate; int filesLoaded; @@ -107,6 +102,7 @@ private: void createObjects(); void showUpdateInfo(); + void showCompleteDialogBox(bool flag); protected: virtual void keyPressEvent(QKeyEvent *event); }; diff --git a/mainwindow.ui b/mainwindow.ui index e865b7f..f177dfd 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -584,6 +584,9 @@ true + + Qt::AlignCenter + true @@ -747,7 +750,7 @@ - 570 + 565 552 220 35 @@ -881,18 +884,18 @@ - + 10 - 550 + 541 551 - 41 + 50 - + 0 @@ -900,12 +903,12 @@ - PushButton + Загрузить на сервер - + 0 @@ -913,12 +916,12 @@ - PushButton + Отменить изменения - + 0 @@ -926,13 +929,12 @@ - PushButton + Запустить без отправки - updateWidget LanguageWidget mainFrame layoutWidget @@ -940,7 +942,8 @@ notificationLabel offlineStartButton debugWidget - horizontalLayoutWidget + updateButtonGroup_2 + updateWidget diff --git a/mainwindow.ui.autosave b/mainwindow.ui.autosave deleted file mode 100644 index be27b01..0000000 --- a/mainwindow.ui.autosave +++ /dev/null @@ -1,948 +0,0 @@ - - - MainWindow - - - - 0 - 0 - 800 - 600 - - - - - 0 - 0 - - - - - 800 - 600 - - - - - 800 - 600 - - - - Тренажер процедур технического обслуживания самолета RRJ-95NEW-100 - - - - - 800 - 600 - - - - - 800 - 600 - - - - - - 10 - 550 - 780 - 41 - - - - - - - 0 - - - - - - 0 - 30 - - - - - 16777215 - 30 - - - - 10 - - - - - - - - - QLayout::SetFixedSize - - - 0 - - - 0 - - - - - true - - - - 0 - 0 - - - - - 100 - 30 - - - - - 100 - 30 - - - - - Calibri - 8 - - - - Обновить - - - false - - - - - - - true - - - - 0 - 0 - - - - - 100 - 30 - - - - - 100 - 30 - - - - Запуск - - - - - - - - - - true - - - - 10 - 10 - 781 - 211 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - - 40 - 10 - 700 - 200 - - - - - 0 - 0 - - - - - 300 - 200 - - - - - 700 - 200 - - - - - - - - 0 - 0 - - - - - 16777215 - 30 - - - - - 10 - - - - Выберите активные мониторы: - - - Qt::AlignBottom|Qt::AlignHCenter - - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - - 700 - 16777215 - - - - - - - 6 - - - QLayout::SetDefaultConstraint - - - - - - - - - - - - 730 - 10 - 51 - 40 - - - - - 0 - 40 - - - - - - - - 30 - 30 - - - - - - - - 0 - 560 - 200 - 30 - - - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - Calibri - 10 - 50 - false - PreferAntialias - - - - Язык/Language - - - - - - - - 0 - 0 - - - - - Helvetica Cyr Upright-Bold - 75 - true - - - - - RUS - - - - - ENG - - - - - - - - - - 0 - 220 - 801 - 181 - - - - - QLayout::SetDefaultConstraint - - - 1 - - - - - true - - - - 0 - 0 - - - - - 0 - 0 - - - - - 250 - 300 - - - - false - - - - 5 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - 250 - 0 - - - - - 240 - 200 - - - - - - - - 0 - 0 - - - - - 250 - 30 - - - - Вход в систему - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - - 230 - 35 - - - - - - - Логин - - - - - - - - 0 - 0 - - - - - 230 - 35 - - - - Пароль - - - - - - - - 230 - 40 - - - - Войти - - - true - - - - - - - - - - - - - - 0 - 0 - - - - - 350 - 16777215 - - - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - 0 - 50 - - - - - 350 - 60 - - - - - 8 - - - - false - - - Связь с сервером не установлена проверьте настройки или запустите в автономном режиме - - - true - - - true - - - 0 - - - - - - - - - - true - - - - 0 - 0 - - - - - 0 - 0 - - - - - 200 - 16777215 - - - - false - - - - - - Настройки сервера - - - Qt::AlignCenter - - - - - - - - - - 0 - 35 - - - - Сервер - - - - - - - - - - - - 0 - 35 - - - - Порт - - - - - - - - - - 0 - 40 - - - - - 16777215 - 50 - - - - Сохранить - - - true - - - - - - - - - - - - 250 - 460 - 300 - 40 - - - - - 0 - 0 - - - - - 300 - 0 - - - - - 300 - 16777215 - - - - - 10 - - - - QFrame::StyledPanel - - - QFrame::Plain - - - Какая-то ошибка - - - Qt::RichText - - - Qt::AlignCenter - - - - - true - - - - 570 - 552 - 220 - 35 - - - - - 0 - 0 - - - - - 150 - 35 - - - - - 1500 - 35 - - - - Запуск в автономном режиме - - - false - - - false - - - - - - 10 - 500 - 561 - 51 - - - - - 10 - - - 1 - - - 1 - - - 1 - - - 1 - - - - - true - - - Автозапуск - - - false - - - - - - - - - - Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft - - - - - - - - - 0 - 330 - 791 - 171 - - - - - - - - 500 - 20 - - - - - 16777215 - 20 - - - - - Calibri - 10 - - - - Есть изменения в локальных файлах - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - TextLabel - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - - - 10 - 550 - 551 - 41 - - - - - - - - 0 - 35 - - - - Загрузить на сервер - - - - - - - - 0 - 35 - - - - PushButton - - - - - - - - 0 - 35 - - - - PushButton - - - - - - updateWidget - LanguageWidget - mainFrame - layoutWidget - horizontalWidget - notificationLabel - offlineStartButton - debugWidget - horizontalLayoutWidget - - - - - diff --git a/style.css b/style.css index 9d9be87..b187d3f 100644 --- a/style.css +++ b/style.css @@ -20,6 +20,20 @@ QPushButton:disabled color: gray } +QMessageBox QLabel +{ + font-family: "Calibri"; + font: 20px; + color: black; +} + +QMessageBox QPushButton +{ + border-radius: 2px; + padding: 0.2em 0.2em 0.3em 0.2em; + min-width: 70px; +} + QLineEdit { border-style: outset; @@ -40,7 +54,7 @@ QProgressBar QProgressBar::chunk { border-radius: 10px; - background-color: rgb(151,176,201); + background-color: rgb(203,228,255); } QCheckBox diff --git a/ui_mainwindow.h b/ui_mainwindow.h index a93fec0..359130a 100644 --- a/ui_mainwindow.h +++ b/ui_mainwindow.h @@ -79,6 +79,11 @@ public: QVBoxLayout *verticalLayout_10; QLabel *updateListGuideLabel; QLabel *updateActionListLabel; + QWidget *updateButtonGroup_2; + QHBoxLayout *updateButtonGroup; + QPushButton *loadToServerButton; + QPushButton *undoChangesButton; + QPushButton *startWithCurrentChangesButton; void setupUi(QMainWindow *MainWindow) { @@ -333,6 +338,7 @@ public: offlineNotifyLabel->setFont(font4); offlineNotifyLabel->setAutoFillBackground(false); offlineNotifyLabel->setScaledContents(true); + offlineNotifyLabel->setAlignment(Qt::AlignCenter); offlineNotifyLabel->setWordWrap(true); offlineNotifyLabel->setMargin(0); @@ -392,7 +398,7 @@ public: notificationLabel = new QLabel(centralwidget); notificationLabel->setObjectName(QString::fromUtf8("notificationLabel")); - notificationLabel->setGeometry(QRect(250, 470, 300, 40)); + notificationLabel->setGeometry(QRect(250, 460, 300, 40)); sizePolicy.setHeightForWidth(notificationLabel->sizePolicy().hasHeightForWidth()); notificationLabel->setSizePolicy(sizePolicy); notificationLabel->setMinimumSize(QSize(300, 0)); @@ -405,7 +411,7 @@ public: offlineStartButton = new QPushButton(centralwidget); offlineStartButton->setObjectName(QString::fromUtf8("offlineStartButton")); offlineStartButton->setEnabled(true); - offlineStartButton->setGeometry(QRect(570, 552, 220, 35)); + offlineStartButton->setGeometry(QRect(565, 552, 220, 35)); sizePolicy6.setHeightForWidth(offlineStartButton->sizePolicy().hasHeightForWidth()); offlineStartButton->setSizePolicy(sizePolicy6); offlineStartButton->setMinimumSize(QSize(150, 35)); @@ -455,6 +461,29 @@ public: verticalLayout_10->addWidget(updateActionListLabel); + updateButtonGroup_2 = new QWidget(centralwidget); + updateButtonGroup_2->setObjectName(QString::fromUtf8("updateButtonGroup_2")); + updateButtonGroup_2->setGeometry(QRect(10, 541, 551, 50)); + updateButtonGroup = new QHBoxLayout(updateButtonGroup_2); + updateButtonGroup->setObjectName(QString::fromUtf8("updateButtonGroup")); + loadToServerButton = new QPushButton(updateButtonGroup_2); + loadToServerButton->setObjectName(QString::fromUtf8("loadToServerButton")); + loadToServerButton->setMinimumSize(QSize(0, 35)); + + updateButtonGroup->addWidget(loadToServerButton); + + undoChangesButton = new QPushButton(updateButtonGroup_2); + undoChangesButton->setObjectName(QString::fromUtf8("undoChangesButton")); + undoChangesButton->setMinimumSize(QSize(0, 35)); + + updateButtonGroup->addWidget(undoChangesButton); + + startWithCurrentChangesButton = new QPushButton(updateButtonGroup_2); + startWithCurrentChangesButton->setObjectName(QString::fromUtf8("startWithCurrentChangesButton")); + startWithCurrentChangesButton->setMinimumSize(QSize(0, 35)); + + updateButtonGroup->addWidget(startWithCurrentChangesButton); + MainWindow->setCentralWidget(centralwidget); LanguageWidget->raise(); mainFrame->raise(); @@ -463,6 +492,7 @@ public: notificationLabel->raise(); offlineStartButton->raise(); debugWidget->raise(); + updateButtonGroup_2->raise(); updateWidget->raise(); retranslateUi(MainWindow); @@ -497,6 +527,9 @@ public: inlineTextDebug->setText(QString()); updateListGuideLabel->setText(QCoreApplication::translate("MainWindow", "\320\225\321\201\321\202\321\214 \320\270\320\267\320\274\320\265\320\275\320\265\320\275\320\270\321\217 \320\262 \320\273\320\276\320\272\320\260\320\273\321\214\320\275\321\213\321\205 \321\204\320\260\320\271\320\273\320\260\321\205", nullptr)); updateActionListLabel->setText(QCoreApplication::translate("MainWindow", "TextLabel", nullptr)); + loadToServerButton->setText(QCoreApplication::translate("MainWindow", "\320\227\320\260\320\263\321\200\321\203\320\267\320\270\321\202\321\214 \320\275\320\260 \321\201\320\265\321\200\320\262\320\265\321\200", nullptr)); + undoChangesButton->setText(QCoreApplication::translate("MainWindow", "\320\236\321\202\320\274\320\265\320\275\320\270\321\202\321\214 \320\270\320\267\320\274\320\265\320\275\320\265\320\275\320\270\321\217", nullptr)); + startWithCurrentChangesButton->setText(QCoreApplication::translate("MainWindow", "\320\227\320\260\320\277\321\203\321\201\321\202\320\270\321\202\321\214 \320\261\320\265\320\267 \320\276\321\202\320\277\321\200\320\260\320\262\320\272\320\270", nullptr)); } // retranslateUi }; diff --git a/updatenotifywidget.cpp b/updatenotifywidget.cpp index e8a7ef0..6d8c886 100644 --- a/updatenotifywidget.cpp +++ b/updatenotifywidget.cpp @@ -12,32 +12,10 @@ UpdateNotifyWidget::UpdateNotifyWidget(QWidget *parent) : setAttribute(Qt::WA_ShowModal,true); } -void UpdateNotifyWidget::initialize(MainWindow *mainWindow,UpdateController *updateController) +void UpdateNotifyWidget::initialize(MainWindow *mainWindow) { - setWindowTitle(tr("Отправка новых файлов")); - - //ui->LoadingBar->hide(); this->mainWindow = mainWindow; - this->updateController = updateController; currentLoadingCount = 0; - fillList(); - - connect(updateController,&UpdateController::sigUpdateComplete,this,&UpdateNotifyWidget::showCompleteDialogBox); - connect(this,&UpdateNotifyWidget::sigUpdateFilesOnServer,updateController,&UpdateController::updateFilesOnServer); -} - -void UpdateNotifyWidget::setUpdateList(QList *fileDataList) -{ - int listCount = fileDataList->count(); - this->updateList = fileDataList; - - //ui->LoadingBar->setRange(0,listCount); -} - -void UpdateNotifyWidget::updateCount() -{ - currentLoadingCount++; - //ui->LoadingBar->setValue(currentLoadingCount); } void UpdateNotifyWidget::addToList(FileData fileData) @@ -48,54 +26,11 @@ void UpdateNotifyWidget::addToList(FileData fileData) } -void UpdateNotifyWidget::on_StartLoadButton_clicked() -{ - emit sigUpdateFilesOnServer(updateList); - //ui->StartLoadButton->setEnabled(false); - //ui->CancelButton->setEnabled(false); - //ui->LoadingBar->show(); -} - -void UpdateNotifyWidget::on_CancelButton_clicked() -{ - mainWindow->checkUpdate(); - -} - -void UpdateNotifyWidget::fillList() -{ - -} - UpdateNotifyWidget::~UpdateNotifyWidget() { delete ui; } -void UpdateNotifyWidget::showCompleteDialogBox(bool flag) -{ - QMessageBox *messageBox = new QMessageBox(this); - - if(flag) - { - messageBox->setIcon(QMessageBox::Information); - messageBox->setWindowTitle(tr("Информация")); - messageBox->addButton(QMessageBox::Ok); - messageBox->setText(tr("Загрузка завершена")); - } - else - { - messageBox->setIcon(QMessageBox::Warning); - messageBox->setWindowTitle(tr("Ошибка")); - messageBox->addButton(QMessageBox::Ok); - messageBox->setText(tr("Произошла ошибка при загрузке")); - } - - connect(messageBox,&QMessageBox::accepted,this,&UpdateNotifyWidget::hide); - connect(messageBox,&QMessageBox::accepted,this,&UpdateNotifyWidget::on_CancelButton_clicked); - messageBox->show(); -} - void UpdateNotifyWidget::on_closeButton_clicked() { close(); diff --git a/updatenotifywidget.h b/updatenotifywidget.h index 04620e7..2fac5a7 100644 --- a/updatenotifywidget.h +++ b/updatenotifywidget.h @@ -20,28 +20,19 @@ class UpdateNotifyWidget : public QWidget public: explicit UpdateNotifyWidget(QWidget *parent = nullptr); - void initialize(MainWindow *mainWindow, UpdateController *updateController); + void initialize(MainWindow *mainWindow); void addToList(FileData fileData); - void setUpdateList(QList *fileDataList); - void updateCount(); ~UpdateNotifyWidget(); signals: - void sigUpdateFilesOnServer(QList *fileSendList); + private slots: - void showCompleteDialogBox(bool flag); - void on_StartLoadButton_clicked(); - void on_CancelButton_clicked(); - void on_closeButton_clicked(); private: Ui::UpdateNotifyWidget *ui; MainWindow *mainWindow; - UpdateController *updateController; - QList *updateList; - void fillList(); int currentLoadingCount; };