mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-27 19:45:43 +03:00
bugFixing 4
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
|
||||
ViewerInstructors::ViewerInstructors(ConnectorToServer* connectorToServer, QWidget *parent) :
|
||||
InstructorsView(connectorToServer, CommonView::TypeView::onlyView, parent),
|
||||
dlgEditor(nullptr),
|
||||
ui(new Ui::ViewerInstructors)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
@@ -23,6 +24,8 @@ ViewerInstructors::ViewerInstructors(ConnectorToServer* connectorToServer, QWidg
|
||||
|
||||
ViewerInstructors::~ViewerInstructors()
|
||||
{
|
||||
if(dlgEditor)
|
||||
dlgEditor->close();
|
||||
delete ui;
|
||||
}
|
||||
|
||||
@@ -34,6 +37,9 @@ void ViewerInstructors::setAuthComplited(bool authComplited)
|
||||
|
||||
void ViewerInstructors::deactivate()
|
||||
{
|
||||
if(dlgEditor)
|
||||
dlgEditor->close();
|
||||
|
||||
CommonView::deactivate();
|
||||
updateButtons();
|
||||
}
|
||||
@@ -55,18 +61,22 @@ void ViewerInstructors::on_btnEditorInstructors_clicked()
|
||||
{
|
||||
Q_EMIT signal_BlockAutorization(true);
|
||||
|
||||
EditorInstructors editorInstructors(connectorToServer, adminMode);
|
||||
connect(connectorToServer, &ConnectorToServer::signal_UpdateDB, &editorInstructors, &EditorInstructors::slot_NeedUpdateUI);
|
||||
EditorInstructors* editorInstructors = new EditorInstructors(connectorToServer, adminMode);
|
||||
connect(connectorToServer, &ConnectorToServer::signal_UpdateDB, editorInstructors, &EditorInstructors::slot_NeedUpdateUI);
|
||||
|
||||
QDialog* dialog = new QDialog(this);
|
||||
QHBoxLayout *layout = new QHBoxLayout(dialog);
|
||||
layout->addWidget(&editorInstructors);
|
||||
dialog->setWindowTitle(tr("Editor of instructors"));
|
||||
dialog->setMinimumSize(1600, 800);
|
||||
dialog->setWindowFlags(dialog->windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||
dialog->exec();
|
||||
dlgEditor = new QDialog(this);
|
||||
QHBoxLayout *layout = new QHBoxLayout(dlgEditor);
|
||||
layout->addWidget(editorInstructors);
|
||||
dlgEditor->setWindowTitle(tr("Editor of instructors"));
|
||||
dlgEditor->setMinimumSize(1600, 800);
|
||||
dlgEditor->setWindowFlags(dlgEditor->windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||
dlgEditor->exec();
|
||||
|
||||
loadInstructorsFromDB();
|
||||
delete dlgEditor;
|
||||
dlgEditor = nullptr;
|
||||
|
||||
if(authComplited)
|
||||
loadInstructorsFromDB();
|
||||
|
||||
Q_EMIT signal_BlockAutorization(false);
|
||||
}
|
||||
|
||||
@@ -42,6 +42,9 @@ Q_SIGNALS:
|
||||
private:
|
||||
void updateButtons() override;
|
||||
|
||||
private:
|
||||
QDialog* dlgEditor;
|
||||
|
||||
private:
|
||||
Ui::ViewerInstructors *ui;
|
||||
};
|
||||
|
||||
@@ -8,6 +8,7 @@ ViewerTrainees::ViewerTrainees(ConnectorToServer* connectorToServer, MessangerCo
|
||||
ammTasksWidgetCommon(nullptr),
|
||||
fimTasksWidgetCommon(nullptr),
|
||||
messangerController(messangerController),
|
||||
dlgEditor(nullptr),
|
||||
ui(new Ui::ViewerTrainees)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
@@ -36,6 +37,9 @@ ViewerTrainees::~ViewerTrainees()
|
||||
delete ammTasksWidgetCommon;
|
||||
delete fimTasksWidgetCommon;
|
||||
|
||||
if(dlgEditor)
|
||||
dlgEditor->close();
|
||||
|
||||
delete ui;
|
||||
}
|
||||
|
||||
@@ -47,6 +51,9 @@ void ViewerTrainees::setAuthComplited(bool authComplited)
|
||||
|
||||
void ViewerTrainees::deactivate()
|
||||
{
|
||||
if(dlgEditor)
|
||||
dlgEditor->close();
|
||||
|
||||
CommonView::deactivate();
|
||||
|
||||
ammTasksWidgetCommon->deactivate();
|
||||
@@ -71,18 +78,22 @@ void ViewerTrainees::on_btnEditorTrainees_clicked()
|
||||
{
|
||||
Q_EMIT signal_BlockAutorization(true);
|
||||
|
||||
EditorTrainees editorTraineesGroups(connectorToServer, adminMode);
|
||||
connect(connectorToServer, &ConnectorToServer::signal_UpdateDB, &editorTraineesGroups, &EditorTrainees::slot_NeedUpdateUI);
|
||||
EditorTrainees* editorTraineesGroups = new EditorTrainees(connectorToServer, adminMode);
|
||||
connect(connectorToServer, &ConnectorToServer::signal_UpdateDB, editorTraineesGroups, &EditorTrainees::slot_NeedUpdateUI);
|
||||
|
||||
QDialog* dialog = new QDialog(this);
|
||||
QHBoxLayout *layout = new QHBoxLayout(dialog);
|
||||
layout->addWidget(&editorTraineesGroups);
|
||||
dialog->setWindowTitle(tr("Editor of trainees"));
|
||||
dialog->setMinimumSize(1600, 800);
|
||||
dialog->setWindowFlags(dialog->windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||
dialog->exec();
|
||||
dlgEditor = new QDialog(this);
|
||||
QHBoxLayout *layout = new QHBoxLayout(dlgEditor);
|
||||
layout->addWidget(editorTraineesGroups);
|
||||
dlgEditor->setWindowTitle(tr("Editor of trainees"));
|
||||
dlgEditor->setMinimumSize(1600, 800);
|
||||
dlgEditor->setWindowFlags(dlgEditor->windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||
dlgEditor->exec();
|
||||
|
||||
loadTraineesFromDB();
|
||||
delete dlgEditor;
|
||||
dlgEditor = nullptr;
|
||||
|
||||
if(authComplited)
|
||||
loadTraineesFromDB();
|
||||
|
||||
Q_EMIT signal_BlockAutorization(false);
|
||||
}
|
||||
|
||||
@@ -52,6 +52,8 @@ private:
|
||||
|
||||
MessangerController* messangerController;
|
||||
|
||||
QDialog* dlgEditor;
|
||||
|
||||
private:
|
||||
Ui::ViewerTrainees *ui;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user