diff --git a/InstructorsAndTrainees/commonview.h b/InstructorsAndTrainees/commonview.h index 157044e..123cdb4 100644 --- a/InstructorsAndTrainees/commonview.h +++ b/InstructorsAndTrainees/commonview.h @@ -34,11 +34,7 @@ public: void setAdminMode(bool adminMode) { this->adminMode = adminMode; - } - void setAuthComplited(bool authComplited) - { - this->authComplited = authComplited; - } + } void clearTree() { treeWidget->clear(); diff --git a/InstructorsAndTrainees/instructors/viewerinstructors.cpp b/InstructorsAndTrainees/instructors/viewerinstructors.cpp index c72d8e9..9ef38c9 100644 --- a/InstructorsAndTrainees/instructors/viewerinstructors.cpp +++ b/InstructorsAndTrainees/instructors/viewerinstructors.cpp @@ -22,6 +22,12 @@ ViewerInstructors::~ViewerInstructors() delete ui; } +void ViewerInstructors::setAuthComplited(bool authComplited) +{ + this->authComplited = authComplited; + updateButtons(); +} + void ViewerInstructors::changeEvent(QEvent *event) { // В случае получения события изменения языка приложения diff --git a/InstructorsAndTrainees/instructors/viewerinstructors.h b/InstructorsAndTrainees/instructors/viewerinstructors.h index 3febad1..e055b0f 100644 --- a/InstructorsAndTrainees/instructors/viewerinstructors.h +++ b/InstructorsAndTrainees/instructors/viewerinstructors.h @@ -17,6 +17,9 @@ public: explicit ViewerInstructors(ConnectorToServer* connectorToServer, QWidget *parent = nullptr); ~ViewerInstructors(); +public: + void setAuthComplited(bool authComplited); + protected: void changeEvent(QEvent * event) override; diff --git a/InstructorsAndTrainees/trainees/viewertrainees.cpp b/InstructorsAndTrainees/trainees/viewertrainees.cpp index 487fc24..ab3b2e9 100644 --- a/InstructorsAndTrainees/trainees/viewertrainees.cpp +++ b/InstructorsAndTrainees/trainees/viewertrainees.cpp @@ -21,6 +21,12 @@ ViewerTrainees::~ViewerTrainees() delete ui; } +void ViewerTrainees::setAuthComplited(bool authComplited) +{ + this->authComplited = authComplited; + updateButtons(); +} + /* void ViewerTrainees::on_treeWidget_itemClicked(QTreeWidgetItem *item, int column) { diff --git a/InstructorsAndTrainees/trainees/viewertrainees.h b/InstructorsAndTrainees/trainees/viewertrainees.h index 6613484..1dc19be 100644 --- a/InstructorsAndTrainees/trainees/viewertrainees.h +++ b/InstructorsAndTrainees/trainees/viewertrainees.h @@ -17,6 +17,9 @@ public: explicit ViewerTrainees(ConnectorToServer* connectorToServer, QWidget *parent = nullptr); ~ViewerTrainees(); +public: + void setAuthComplited(bool authComplited); + protected: void changeEvent(QEvent * event) override;