mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-27 19:45:43 +03:00
вынес DialogChekerTask
This commit is contained in:
@@ -5,15 +5,22 @@ common_info_for_project(InstructorsAndTrainees)
|
|||||||
add_library(InstructorsAndTrainees SHARED
|
add_library(InstructorsAndTrainees SHARED
|
||||||
metatypes.h
|
metatypes.h
|
||||||
metatypes.cpp
|
metatypes.cpp
|
||||||
|
|
||||||
instructorsAndTrainees_global.h
|
instructorsAndTrainees_global.h
|
||||||
instructorsandtraineeswidget.cpp
|
instructorsandtraineeswidget.cpp
|
||||||
instructorsandtraineeswidget.h
|
instructorsandtraineeswidget.h
|
||||||
instructorsandtraineeswidget.ui
|
instructorsandtraineeswidget.ui
|
||||||
|
|
||||||
dialogsettings.cpp
|
dialogsettings.cpp
|
||||||
dialogsettings.h
|
dialogsettings.h
|
||||||
dialogsettings.ui
|
dialogsettings.ui
|
||||||
|
|
||||||
commonview.cpp
|
commonview.cpp
|
||||||
commonview.h
|
commonview.h
|
||||||
|
|
||||||
|
specialmessagebox.cpp
|
||||||
|
specialmessagebox.h
|
||||||
|
specialmessagebox.ui
|
||||||
|
|
||||||
trainees/editortrainees.cpp
|
trainees/editortrainees.cpp
|
||||||
trainees/editortrainees.h
|
trainees/editortrainees.h
|
||||||
@@ -34,6 +41,8 @@ add_library(InstructorsAndTrainees SHARED
|
|||||||
trainees/personalcardtrainee.cpp
|
trainees/personalcardtrainee.cpp
|
||||||
trainees/personalcardtrainee.h
|
trainees/personalcardtrainee.h
|
||||||
trainees/personalcardtrainee.ui
|
trainees/personalcardtrainee.ui
|
||||||
|
trainees/dialogcardtrainee.cpp
|
||||||
|
trainees/dialogcardtrainee.h
|
||||||
|
|
||||||
instructors/viewerinstructors.cpp
|
instructors/viewerinstructors.cpp
|
||||||
instructors/viewerinstructors.h
|
instructors/viewerinstructors.h
|
||||||
@@ -69,6 +78,7 @@ add_library(InstructorsAndTrainees SHARED
|
|||||||
connectorToServer/Core/versioncontainer.h
|
connectorToServer/Core/versioncontainer.h
|
||||||
connectorToServer/Datas.h
|
connectorToServer/Datas.h
|
||||||
connectorToServer/streamingversiondata.h
|
connectorToServer/streamingversiondata.h
|
||||||
|
|
||||||
messanger/messangerwidget.cpp
|
messanger/messangerwidget.cpp
|
||||||
messanger/messangerwidget.h
|
messanger/messangerwidget.h
|
||||||
messanger/messangerwidget.ui
|
messanger/messangerwidget.ui
|
||||||
@@ -93,6 +103,9 @@ add_library(InstructorsAndTrainees SHARED
|
|||||||
tasks/checkertask.cpp
|
tasks/checkertask.cpp
|
||||||
tasks/checkertask.h
|
tasks/checkertask.h
|
||||||
tasks/checkertask.ui
|
tasks/checkertask.ui
|
||||||
|
tasks/dialogchekertask.cpp
|
||||||
|
tasks/dialogchekertask.h
|
||||||
|
|
||||||
widgets/newversionwidget.cpp
|
widgets/newversionwidget.cpp
|
||||||
widgets/newversionwidget.h
|
widgets/newversionwidget.h
|
||||||
widgets/newversionwidget.ui
|
widgets/newversionwidget.ui
|
||||||
@@ -103,13 +116,6 @@ add_library(InstructorsAndTrainees SHARED
|
|||||||
widgets/waitanimationwidget.h
|
widgets/waitanimationwidget.h
|
||||||
widgets/waitanimationwidget.ui
|
widgets/waitanimationwidget.ui
|
||||||
|
|
||||||
specialmessagebox.cpp
|
|
||||||
specialmessagebox.h
|
|
||||||
specialmessagebox.ui
|
|
||||||
|
|
||||||
trainees/dialogcardtrainee.cpp
|
|
||||||
trainees/dialogcardtrainee.h
|
|
||||||
|
|
||||||
resources.qrc
|
resources.qrc
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ AMMtasksWidget::AMMtasksWidget(ConnectorToServer* connectorToServer, TypeListTre
|
|||||||
threadPreparation(nullptr),
|
threadPreparation(nullptr),
|
||||||
taskTreePreparation(nullptr),
|
taskTreePreparation(nullptr),
|
||||||
waitAnimationWidget(nullptr),
|
waitAnimationWidget(nullptr),
|
||||||
|
dlgCheckerTask(nullptr),
|
||||||
flOnlyActive(false)
|
flOnlyActive(false)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
@@ -329,21 +330,18 @@ void AMMtasksWidget::on_btnCheck_clicked()
|
|||||||
if(!task.getID())
|
if(!task.getID())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
CheckerTask dlg(connectorToServer, "amm", this);
|
dlgCheckerTask = new DialogChekerTask(connectorToServer, "amm", this);
|
||||||
|
dlgCheckerTask->setTask(&task);
|
||||||
|
dlgCheckerTask->exec();
|
||||||
|
|
||||||
dlg.setTask(&task);
|
if(dlgCheckerTask->getFlChanged())
|
||||||
|
|
||||||
QDialog* dialog = new QDialog(this);
|
|
||||||
QHBoxLayout *layout = new QHBoxLayout(dialog);
|
|
||||||
layout->addWidget(&dlg);
|
|
||||||
dialog->setWindowTitle(tr("Status Task"));
|
|
||||||
dialog->setMinimumSize(200, 100);
|
|
||||||
dialog->setWindowFlags(dialog->windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
|
||||||
//dialog->setStyleSheet(this->styleSheet());
|
|
||||||
dialog->exec();
|
|
||||||
|
|
||||||
if(dlg.getFlChanged())
|
|
||||||
waitAnimationWidget->showWithPlay();
|
waitAnimationWidget->showWithPlay();
|
||||||
|
|
||||||
|
if(dlgCheckerTask)
|
||||||
|
{
|
||||||
|
delete dlgCheckerTask;
|
||||||
|
dlgCheckerTask = nullptr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
#include "module.h"
|
#include "module.h"
|
||||||
#include "connectortoserver.h"
|
#include "connectortoserver.h"
|
||||||
#include "tasktreepreparation.h"
|
#include "tasktreepreparation.h"
|
||||||
|
#include "dialogchekertask.h"
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class AMMtasksWidget;
|
class AMMtasksWidget;
|
||||||
@@ -76,6 +77,8 @@ private:
|
|||||||
TaskAMMFIMTreePreparation* taskTreePreparation;
|
TaskAMMFIMTreePreparation* taskTreePreparation;
|
||||||
WaitAnimationWidget *waitAnimationWidget;
|
WaitAnimationWidget *waitAnimationWidget;
|
||||||
|
|
||||||
|
DialogChekerTask* dlgCheckerTask;
|
||||||
|
|
||||||
bool flOnlyActive; //AMM
|
bool flOnlyActive; //AMM
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#include "checkertask.h"
|
#include "checkertask.h"
|
||||||
#include "specialmessagebox.h"
|
#include "specialmessagebox.h"
|
||||||
#include "ui_checkertask.h"
|
#include "ui_checkertask.h"
|
||||||
|
#include "fimtaskswidget.h"
|
||||||
|
|
||||||
CheckerTask::CheckerTask(ConnectorToServer* connectorToServer, QString type, QWidget *parent) :
|
CheckerTask::CheckerTask(ConnectorToServer* connectorToServer, QString type, QWidget *parent) :
|
||||||
QWidget(parent),
|
QWidget(parent),
|
||||||
@@ -48,6 +49,11 @@ CheckerTask::~CheckerTask()
|
|||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CheckerTask::closeEvent(QCloseEvent *event)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void CheckerTask::setTask(TaskAmmFim* task)
|
void CheckerTask::setTask(TaskAmmFim* task)
|
||||||
{
|
{
|
||||||
this->task = *task;
|
this->task = *task;
|
||||||
|
|||||||
@@ -3,12 +3,16 @@
|
|||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include "tasksAmmFim.h"
|
#include "tasksAmmFim.h"
|
||||||
#include "fimtaskswidget.h"
|
//#include "fimtaskswidget.h"
|
||||||
|
#include "module.h"
|
||||||
|
#include "connectortoserver.h"
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class CheckerTask;
|
class CheckerTask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class FIMtasksWidget;
|
||||||
|
|
||||||
class CheckerTask : public QWidget
|
class CheckerTask : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@@ -17,6 +21,8 @@ public:
|
|||||||
explicit CheckerTask(ConnectorToServer* connectorToServer, QString type, QWidget *parent = nullptr);
|
explicit CheckerTask(ConnectorToServer* connectorToServer, QString type, QWidget *parent = nullptr);
|
||||||
~CheckerTask();
|
~CheckerTask();
|
||||||
|
|
||||||
|
void closeEvent(QCloseEvent *event) override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void setTask(TaskAmmFim* task);
|
void setTask(TaskAmmFim* task);
|
||||||
TaskAmmFim getTask();
|
TaskAmmFim getTask();
|
||||||
|
|||||||
40
InstructorsAndTrainees/tasks/dialogchekertask.cpp
Normal file
40
InstructorsAndTrainees/tasks/dialogchekertask.cpp
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
#include <QHBoxLayout>
|
||||||
|
#include "dialogchekertask.h"
|
||||||
|
|
||||||
|
DialogChekerTask::DialogChekerTask(ConnectorToServer* connectorToServer, QString type, QWidget *parent) :
|
||||||
|
QDialog(parent,
|
||||||
|
Qt::WindowSystemMenuHint
|
||||||
|
| Qt::WindowMaximizeButtonHint
|
||||||
|
| Qt::WindowMinimizeButtonHint
|
||||||
|
| Qt::WindowCloseButtonHint),
|
||||||
|
checkerTask(nullptr)
|
||||||
|
{
|
||||||
|
checkerTask = new CheckerTask(connectorToServer, type, this);
|
||||||
|
|
||||||
|
QHBoxLayout *layout = new QHBoxLayout(this);
|
||||||
|
layout->addWidget(checkerTask);
|
||||||
|
this->setWindowTitle(tr("Check Task"));
|
||||||
|
this->setMinimumSize(1400, 700);
|
||||||
|
this->setWindowState(Qt::WindowMaximized);
|
||||||
|
this->setModal(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
DialogChekerTask::~DialogChekerTask()
|
||||||
|
{
|
||||||
|
delete checkerTask;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DialogChekerTask::closeEvent(QCloseEvent *event)
|
||||||
|
{
|
||||||
|
checkerTask->close();
|
||||||
|
}
|
||||||
|
|
||||||
|
void DialogChekerTask::setTask(TaskAmmFim *task)
|
||||||
|
{
|
||||||
|
checkerTask->setTask(task);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool DialogChekerTask::getFlChanged()
|
||||||
|
{
|
||||||
|
return checkerTask->getFlChanged();
|
||||||
|
}
|
||||||
25
InstructorsAndTrainees/tasks/dialogchekertask.h
Normal file
25
InstructorsAndTrainees/tasks/dialogchekertask.h
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
#ifndef DIALOGCHEKERTASK_H
|
||||||
|
#define DIALOGCHEKERTASK_H
|
||||||
|
|
||||||
|
#include <QDialog>
|
||||||
|
#include <QObject>
|
||||||
|
#include "checkertask.h"
|
||||||
|
|
||||||
|
class DialogChekerTask : public QDialog
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
DialogChekerTask(ConnectorToServer* connectorToServer, QString type, QWidget *parent = nullptr);
|
||||||
|
~DialogChekerTask();
|
||||||
|
|
||||||
|
void closeEvent(QCloseEvent *event) override;
|
||||||
|
|
||||||
|
public:
|
||||||
|
void setTask(TaskAmmFim* task);
|
||||||
|
bool getFlChanged();
|
||||||
|
|
||||||
|
private:
|
||||||
|
CheckerTask* checkerTask;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // DIALOGCHEKERTASK_H
|
||||||
@@ -20,7 +20,7 @@ FIMtasksWidget::FIMtasksWidget(ConnectorToServer* connectorToServer, TypeListTre
|
|||||||
threadPreparation(nullptr),
|
threadPreparation(nullptr),
|
||||||
taskTreePreparation(nullptr),
|
taskTreePreparation(nullptr),
|
||||||
waitAnimationWidget(nullptr),
|
waitAnimationWidget(nullptr),
|
||||||
dlgCheckTask(nullptr),
|
dlgCheckerTask(nullptr),
|
||||||
userName("")
|
userName("")
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
@@ -97,9 +97,9 @@ FIMtasksWidget::~FIMtasksWidget()
|
|||||||
delete waitAnimationWidget;
|
delete waitAnimationWidget;
|
||||||
delete treeWidget;
|
delete treeWidget;
|
||||||
|
|
||||||
if(dlgCheckTask)
|
if(dlgCheckerTask)
|
||||||
{
|
{
|
||||||
dlgCheckTask->close();
|
dlgCheckerTask->close();
|
||||||
}
|
}
|
||||||
|
|
||||||
delete ui;
|
delete ui;
|
||||||
@@ -146,8 +146,8 @@ void FIMtasksWidget::resizeEvent(QResizeEvent *event)
|
|||||||
|
|
||||||
void FIMtasksWidget::closeDlgCheckTask()
|
void FIMtasksWidget::closeDlgCheckTask()
|
||||||
{
|
{
|
||||||
if(dlgCheckTask)
|
if(dlgCheckerTask)
|
||||||
dlgCheckTask->close();
|
dlgCheckerTask->close();
|
||||||
}
|
}
|
||||||
|
|
||||||
void FIMtasksWidget::changeEvent(QEvent *event)
|
void FIMtasksWidget::changeEvent(QEvent *event)
|
||||||
@@ -391,31 +391,17 @@ void FIMtasksWidget::on_btnCheck_clicked()
|
|||||||
if(!task.getID())
|
if(!task.getID())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
CheckerTask* checkTask = new CheckerTask(connectorToServer, "fim", this);
|
dlgCheckerTask = new DialogChekerTask(connectorToServer, "fim", this);
|
||||||
|
dlgCheckerTask->setTask(&task);
|
||||||
|
dlgCheckerTask->exec();
|
||||||
|
|
||||||
checkTask->setTask(&task);
|
if(dlgCheckerTask->getFlChanged())
|
||||||
|
|
||||||
dlgCheckTask = new QDialog(this,
|
|
||||||
Qt::WindowSystemMenuHint
|
|
||||||
| Qt::WindowMaximizeButtonHint
|
|
||||||
| Qt::WindowMinimizeButtonHint
|
|
||||||
| Qt::WindowCloseButtonHint);
|
|
||||||
QHBoxLayout *layout = new QHBoxLayout(dlgCheckTask);
|
|
||||||
layout->addWidget(checkTask);
|
|
||||||
dlgCheckTask->setWindowTitle(tr("Check Task"));
|
|
||||||
dlgCheckTask->setMinimumSize(1400, 700);
|
|
||||||
dlgCheckTask->setWindowState(Qt::WindowMaximized);
|
|
||||||
dlgCheckTask->setModal(true);
|
|
||||||
dlgCheckTask->showMaximized();
|
|
||||||
dlgCheckTask->exec();
|
|
||||||
|
|
||||||
if(checkTask->getFlChanged())
|
|
||||||
waitAnimationWidget->showWithPlay();
|
waitAnimationWidget->showWithPlay();
|
||||||
|
|
||||||
if(dlgCheckTask)
|
if(dlgCheckerTask)
|
||||||
{
|
{
|
||||||
delete dlgCheckTask;
|
delete dlgCheckerTask;
|
||||||
dlgCheckTask = nullptr;
|
dlgCheckerTask = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
#include "tasksAmmFim.h"
|
#include "tasksAmmFim.h"
|
||||||
#include "connectortoserver.h"
|
#include "connectortoserver.h"
|
||||||
#include "tasktreepreparation.h"
|
#include "tasktreepreparation.h"
|
||||||
|
#include "dialogchekertask.h"
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class FIMtasksWidget;
|
class FIMtasksWidget;
|
||||||
@@ -79,7 +80,7 @@ private:
|
|||||||
TaskAMMFIMTreePreparation* taskTreePreparation;
|
TaskAMMFIMTreePreparation* taskTreePreparation;
|
||||||
WaitAnimationWidget *waitAnimationWidget;
|
WaitAnimationWidget *waitAnimationWidget;
|
||||||
|
|
||||||
QDialog* dlgCheckTask;
|
DialogChekerTask* dlgCheckerTask;
|
||||||
|
|
||||||
QString userName; //FIM
|
QString userName; //FIM
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -18,10 +18,6 @@ DialogCardTrainee::DialogCardTrainee(ConnectorToServer* connectorToServer, Messa
|
|||||||
this->setWindowTitle(tr("Personal card trainee"));
|
this->setWindowTitle(tr("Personal card trainee"));
|
||||||
this->setMinimumSize(1400, 700);
|
this->setMinimumSize(1400, 700);
|
||||||
this->setWindowState(Qt::WindowMaximized);
|
this->setWindowState(Qt::WindowMaximized);
|
||||||
/*this->setWindowFlags(Qt::WindowSystemMenuHint
|
|
||||||
| Qt::WindowMaximizeButtonHint
|
|
||||||
| Qt::WindowMinimizeButtonHint
|
|
||||||
| Qt::WindowCloseButtonHint);*/
|
|
||||||
this->setModal(true);
|
this->setModal(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user