diff --git a/InstructorsAndTrainees/commonview.cpp b/InstructorsAndTrainees/commonview.cpp index 6b71455..ec62f6f 100644 --- a/InstructorsAndTrainees/commonview.cpp +++ b/InstructorsAndTrainees/commonview.cpp @@ -28,7 +28,6 @@ CommonView::CommonView(ConnectorToServer* connectorToServer, TypeView type, QWid waitAnimationWidget = new WaitAnimationWidget; QMovie *movie = new QMovie(":/resources/icons/762.gif"); - //waitAnimationWidget->setParent(this); waitAnimationWidget->initialize(movie,this); } diff --git a/InstructorsAndTrainees/connectorToServer/connectortoserver.cpp b/InstructorsAndTrainees/connectorToServer/connectortoserver.cpp index 231e35d..467f12b 100644 --- a/InstructorsAndTrainees/connectorToServer/connectortoserver.cpp +++ b/InstructorsAndTrainees/connectorToServer/connectortoserver.cpp @@ -226,7 +226,8 @@ bool ConnectorToServer::isArchivedInstructor(int id) { if(instructor.getID() == id) { - if(instructor.getArchived()) return true; else return false; + if(instructor.getArchived()) return true; + else return false; } } return false; @@ -238,7 +239,8 @@ bool ConnectorToServer::isAdminInstructor(int id) { if(instructor.getID() == id) { - if(instructor.getIsAdmin()) return true; else return false; + if(instructor.getIsAdmin()) return true; + else return false; } } return false; @@ -250,7 +252,8 @@ bool ConnectorToServer::isLoggedInInstructor(int id) { if(instructor.getID() == id) { - if(instructor.getLoggedIn()) return true; else return false; + if(instructor.getLoggedIn()) return true; + else return false; } } return false; @@ -283,7 +286,8 @@ bool ConnectorToServer::isArchivedTrainee(int id) { if(trainee.getID() == id) { - if(trainee.getArchived()) return true; else return false; + if(trainee.getArchived()) return true; + else return false; } } return false; @@ -295,7 +299,8 @@ bool ConnectorToServer::isLoggedInTrainee(int id) { if(trainee.getID() == id) { - if(trainee.getLoggedIn()) return true; else return false; + if(trainee.getLoggedIn()) return true; + else return false; } } return false; @@ -437,15 +442,14 @@ void ConnectorToServer::slot_sendMessage(ClientMessage clientMessage) sendMessage(clientMessage); } -void ConnectorToServer::showServerList(QList *serverList) +void ConnectorToServer::slot_showServerList(QList *serverList) { versionSelectWidget->fillView(serverList); } void ConnectorToServer::slot_HashReady() { - //sendQueryTasksXML("fim"); - //sendQueryTasksXML("amm"); + } void ConnectorToServer::slot_Auth(ServerAuthorization *serverAuth) @@ -476,7 +480,7 @@ void ConnectorToServer::bindConnection() connect(recognizeSystem,&RecognizeSystem::sigAuth,this,&ConnectorToServer::slot_Auth); connect(recognizeSystem,&RecognizeSystem::sigDeAuth,this,&ConnectorToServer::sigDeLoginResult); connect(recognizeSystem,&RecognizeSystem::signal_ReceiveMessage,this,&ConnectorToServer::signal_receiveMessage,Qt::AutoConnection); - connect(recognizeSystem,&RecognizeSystem::sigShowServerDataList,this,&ConnectorToServer::showServerList); + connect(recognizeSystem,&RecognizeSystem::sigShowServerDataList,this,&ConnectorToServer::slot_showServerList); connect (recognizeSystem,&RecognizeSystem::sigSetVersion,versionContainer,&VersionContainer::setServerVersionData); connect(recognizeSystem,&RecognizeSystem::sigAnswerQueryToDB_ListInstructors,this,&ConnectorToServer::slot_AnswerQueryToDB_ListInstructors); diff --git a/InstructorsAndTrainees/connectorToServer/connectortoserver.h b/InstructorsAndTrainees/connectorToServer/connectortoserver.h index 38d9f42..4ef8def 100644 --- a/InstructorsAndTrainees/connectorToServer/connectortoserver.h +++ b/InstructorsAndTrainees/connectorToServer/connectortoserver.h @@ -88,7 +88,7 @@ public slots: void slot_AnswerQueryTasksXML_AMM(QByteArray array); void slot_sendMessage(ClientMessage clientMessage); - void showServerList(QList *serverList); + void slot_showServerList(QList *serverList); void slot_HashReady(); diff --git a/InstructorsAndTrainees/instructors/dialogauthorizationinstructor.h b/InstructorsAndTrainees/instructors/dialogauthorizationinstructor.h index a746730..5d98e4e 100644 --- a/InstructorsAndTrainees/instructors/dialogauthorizationinstructor.h +++ b/InstructorsAndTrainees/instructors/dialogauthorizationinstructor.h @@ -29,9 +29,7 @@ public: private slots: void on_btnLogIn_clicked(); - void on_btnViewPassword_pressed(); - void on_btnViewPassword_released(); private: diff --git a/InstructorsAndTrainees/instructors/editorinstructors.ui b/InstructorsAndTrainees/instructors/editorinstructors.ui index 6244e07..1f1de14 100644 --- a/InstructorsAndTrainees/instructors/editorinstructors.ui +++ b/InstructorsAndTrainees/instructors/editorinstructors.ui @@ -30,7 +30,7 @@ - + 0 0 @@ -68,7 +68,7 @@ - + 0 0 @@ -105,6 +105,12 @@ + + + 0 + 0 + + 160 @@ -138,7 +144,7 @@ - + 0 0 @@ -189,7 +195,7 @@ - + 0 0 diff --git a/InstructorsAndTrainees/instructors/viewerinstructors.h b/InstructorsAndTrainees/instructors/viewerinstructors.h index f08be2d..6944a5d 100644 --- a/InstructorsAndTrainees/instructors/viewerinstructors.h +++ b/InstructorsAndTrainees/instructors/viewerinstructors.h @@ -26,14 +26,9 @@ public: protected: void changeEvent(QEvent * event) override; -Q_SIGNALS: - //сигнал о блокировке авторизации - //void signal_BlockAutorization(bool block); - public Q_SLOTS: void on_btnEditorInstructors_clicked(); -public slots: void on_treeWidgetItemClicked(QTreeWidgetItem *item, int column); Q_SIGNALS: diff --git a/InstructorsAndTrainees/instructorsandtraineeswidget.cpp b/InstructorsAndTrainees/instructorsandtraineeswidget.cpp index 05314c6..f08745a 100644 --- a/InstructorsAndTrainees/instructorsandtraineeswidget.cpp +++ b/InstructorsAndTrainees/instructorsandtraineeswidget.cpp @@ -49,8 +49,6 @@ InstructorsAndTraineesWidget::InstructorsAndTraineesWidget(QWidget *parent) : viewerInstructors = new ViewerInstructors(connectorToServer, this); connect(this, &InstructorsAndTraineesWidget::signal_NeedUpdateUI, viewerTrainees, &ViewerTrainees::slot_NeedUpdateUI); connect(this, &InstructorsAndTraineesWidget::signal_NeedUpdateUI, viewerInstructors, &ViewerInstructors::slot_NeedUpdateUI); - //connect(viewerInstructors, &ViewerInstructors::signal_BlockAutorization, this, &InstructorsAndTraineesWidget::signal_BlockAutorization); - //connect(viewerTrainees, &ViewerTrainees::signal_BlockAutorization, this, &InstructorsAndTraineesWidget::signal_BlockAutorization); connect(connectorToServer, &ConnectorToServer::signal_ConnectedToServer, this, &InstructorsAndTraineesWidget::slot_ConnectedToServer); diff --git a/InstructorsAndTrainees/instructorsandtraineeswidget.h b/InstructorsAndTrainees/instructorsandtraineeswidget.h index 36c51a8..54ebcee 100644 --- a/InstructorsAndTrainees/instructorsandtraineeswidget.h +++ b/InstructorsAndTrainees/instructorsandtraineeswidget.h @@ -59,8 +59,6 @@ Q_SIGNALS: void signal_LanguageChanged(QString language); //сигнал о необходимости обновления интерфейса void signal_NeedUpdateUI(bool treeInstructor, bool treeTrainee); - //сигнал о блокировке авторизации - //void signal_BlockAutorization(bool block); private Q_SLOTS: void on_btnConnectionToServer_clicked(); diff --git a/InstructorsAndTrainees/resources/icons/personalCard.png b/InstructorsAndTrainees/resources/icons/personalCard.png index 9ee6a77..555709c 100644 Binary files a/InstructorsAndTrainees/resources/icons/personalCard.png and b/InstructorsAndTrainees/resources/icons/personalCard.png differ diff --git a/InstructorsAndTrainees/resources/icons/personalCard_2.png b/InstructorsAndTrainees/resources/icons/personalCard_2.png new file mode 100644 index 0000000..9ee6a77 Binary files /dev/null and b/InstructorsAndTrainees/resources/icons/personalCard_2.png differ diff --git a/InstructorsAndTrainees/specialmessagebox.ui b/InstructorsAndTrainees/specialmessagebox.ui index 92de763..32c879a 100644 --- a/InstructorsAndTrainees/specialmessagebox.ui +++ b/InstructorsAndTrainees/specialmessagebox.ui @@ -17,7 +17,7 @@ - + @@ -76,7 +76,7 @@ - + diff --git a/InstructorsAndTrainees/tasks/ammtaskswidget.ui b/InstructorsAndTrainees/tasks/ammtaskswidget.ui index 3f4ca46..886be33 100644 --- a/InstructorsAndTrainees/tasks/ammtaskswidget.ui +++ b/InstructorsAndTrainees/tasks/ammtaskswidget.ui @@ -27,7 +27,7 @@ - + diff --git a/InstructorsAndTrainees/tasks/fimtaskswidget.ui b/InstructorsAndTrainees/tasks/fimtaskswidget.ui index adfc3ec..8a3fbed 100644 --- a/InstructorsAndTrainees/tasks/fimtaskswidget.ui +++ b/InstructorsAndTrainees/tasks/fimtaskswidget.ui @@ -21,7 +21,7 @@ - + diff --git a/InstructorsAndTrainees/trainees/dialogeditgroup.ui b/InstructorsAndTrainees/trainees/dialogeditgroup.ui index 77a4e92..3466384 100644 --- a/InstructorsAndTrainees/trainees/dialogeditgroup.ui +++ b/InstructorsAndTrainees/trainees/dialogeditgroup.ui @@ -23,7 +23,7 @@ - + @@ -61,7 +61,7 @@ - + diff --git a/InstructorsAndTrainees/trainees/editortrainees.cpp b/InstructorsAndTrainees/trainees/editortrainees.cpp index 5d21689..545a08f 100644 --- a/InstructorsAndTrainees/trainees/editortrainees.cpp +++ b/InstructorsAndTrainees/trainees/editortrainees.cpp @@ -58,52 +58,6 @@ void EditorTrainees::on_btnNewGroup_clicked() } return; - /* - if(int id_group = dbLMS->newGroup()) - { - loadTraineesFromDB(); - setCurrentGroup(id_group); - - DialogEditGroup dlg(this); - - Group group = dbLMS->getGroup(id_group); - if(group.getID() == 0) - return; - - dlg.setGroup(group); - - while (true) - { - switch( dlg.exec() ) - { - case QDialog::Accepted: - { - Group group_edit = dlg.getGroup(); - - if(int id_edit = dbLMS->editGroup(group_edit)) - {//Отредактировано - loadTraineesFromDB(); - setCurrentGroup(id_edit); - return; - } - else - { - dlg.setGroup(group_edit); - continue; - } - - } - case QDialog::Rejected: - dbLMS->delGroup(id_group); - loadTraineesFromDB(); - return; - default: - dbLMS->delGroup(id_group); - loadTraineesFromDB(); - return; - } - } - }*/ } void EditorTrainees::on_btnDeleteGroup_clicked() diff --git a/InstructorsAndTrainees/trainees/personalcardtrainee.cpp b/InstructorsAndTrainees/trainees/personalcardtrainee.cpp index 0007e96..c05d929 100644 --- a/InstructorsAndTrainees/trainees/personalcardtrainee.cpp +++ b/InstructorsAndTrainees/trainees/personalcardtrainee.cpp @@ -19,6 +19,8 @@ PersonalCardTrainee::PersonalCardTrainee(ConnectorToServer* connectorToServer, M ui->lblName->setObjectName("PersonalCard_lblName"); + ui->lblLoginIn->setVisible(false); + ammTasksWidget_personal = new AMMtasksWidget(connectorToServer, TypeListTreeAMMFIM::listForTrainee, this); fimTasksWidget_personal = new FIMtasksWidget(connectorToServer, TypeListTreeAMMFIM::listForTrainee, this); diff --git a/InstructorsAndTrainees/trainees/personalcardtrainee.ui b/InstructorsAndTrainees/trainees/personalcardtrainee.ui index 5ac5638..483ce3e 100644 --- a/InstructorsAndTrainees/trainees/personalcardtrainee.ui +++ b/InstructorsAndTrainees/trainees/personalcardtrainee.ui @@ -17,7 +17,7 @@ - + @@ -30,8 +30,29 @@ Trainee + + + + + + Assigned AMM + + + + + + + 0 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + - + @@ -60,71 +81,8 @@ - - - - - - Last login - - - - - - - 0 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - - - Assigned FIM - - - - - - - 0 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - - - Assigned AMM - - - - - - - 0 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - + + @@ -144,8 +102,8 @@ - - + + @@ -165,6 +123,62 @@ + + + + Qt::Horizontal + + + + + + + + + Assigned FIM + + + + + + + 0 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + + Last login + + + + + + + 0 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + Qt::Horizontal + + + @@ -183,7 +197,7 @@ - + 0 @@ -197,9 +211,9 @@ - 0 + 1 - + AMM @@ -211,7 +225,7 @@ - + List @@ -236,7 +250,7 @@ - + FIM diff --git a/InstructorsAndTrainees/trainees/traineesview.cpp b/InstructorsAndTrainees/trainees/traineesview.cpp index e4d3d2e..9cecf5f 100644 --- a/InstructorsAndTrainees/trainees/traineesview.cpp +++ b/InstructorsAndTrainees/trainees/traineesview.cpp @@ -44,8 +44,6 @@ void TraineesView::loadTraineesFromDB() ItemGroup->setIcon(ColumnsTreeUsers::clmn_Name, QIcon(QStringLiteral(":/resources/icons/group.png"))); setItemColor(ItemGroup, QColor(220, 220, 220)); - //ItemGroup->set Property("greenButton", QVariant(true)); - //((QAbstractItemView*)ItemGroup)->setIconSize(QSize(32, 32)); //Обучаемые for(Trainee trainee : listTrainees) diff --git a/InstructorsAndTrainees/trainees/viewertrainees.h b/InstructorsAndTrainees/trainees/viewertrainees.h index f2dcff1..c5e9609 100644 --- a/InstructorsAndTrainees/trainees/viewertrainees.h +++ b/InstructorsAndTrainees/trainees/viewertrainees.h @@ -30,12 +30,7 @@ public: protected: void changeEvent(QEvent * event) override; -Q_SIGNALS: - //сигнал о блокировке авторизации - //void signal_BlockAutorization(bool block); - public Q_SLOTS: - //void on_treeWidget_itemClicked(QTreeWidgetItem *item, int column); void on_btnEditorTrainees_clicked(); void on_btnPersonalCard_clicked(); private Q_SLOTS: