mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-27 19:45:43 +03:00
в процессе 1
This commit is contained in:
@@ -56,5 +56,6 @@
|
||||
<file>resources/icons/eye.png</file>
|
||||
<file>resources/icons/exchange.png</file>
|
||||
<file>resources/icons/link.png</file>
|
||||
<file>resources/icons/new.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
BIN
LibInstructorsAndTrainees/resources/icons/new.png
Normal file
BIN
LibInstructorsAndTrainees/resources/icons/new.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 23 KiB |
@@ -529,7 +529,7 @@ void AMMtasksWidget::on_btnStatus_clicked()
|
||||
if(!task.getID())
|
||||
return;
|
||||
|
||||
dlgStatusTask = new DialogChekerTask(connectorToServer, CheckerTask::TypeChecker::amm_status, this);
|
||||
dlgStatusTask = new DialogChekerTask(connectorToServer, CheckerTask::TypeChecker::amm_check, this);
|
||||
dlgStatusTask->setTask(&task);
|
||||
dlgStatusTask->exec();
|
||||
|
||||
|
||||
@@ -14,30 +14,31 @@ CheckerTask::CheckerTask(ConnectorToServer* connectorToServer, TypeChecker type,
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
ui->btnNew->setObjectName("btnNew");
|
||||
ui->btnCheckup->setObjectName("btnCheckup");
|
||||
ui->btnWrong->setObjectName("btnWrong");
|
||||
ui->btnCompleted->setObjectName("btnCompleted");
|
||||
|
||||
this->type = type;
|
||||
|
||||
if(type == TypeChecker::fim_check)
|
||||
{
|
||||
fimTasksWidget = new FIMtasksWidget(nullptr, TypeListTreeAMMFIM::listOneTask, this);
|
||||
|
||||
ui->verticalLayout_3->addWidget(fimTasksWidget);
|
||||
|
||||
ui->lblName->setVisible(false);
|
||||
ui->lblDMcode->setVisible(false);
|
||||
|
||||
ui->plainText->setReadOnly(true);
|
||||
ui->plainText->setObjectName("plainText");
|
||||
}
|
||||
else if(type == TypeChecker::amm_status)
|
||||
else if(type == TypeChecker::amm_check)
|
||||
{
|
||||
ui->plainText->setVisible(false);
|
||||
ui->label->setVisible(false);
|
||||
//ui->label_Task->setVisible(false);
|
||||
ui->btnRight->setText(tr("Completed"));
|
||||
ui->btnWrong->setText(tr("New"));
|
||||
ui->btnWrong->setIcon(QIcon(QStringLiteral(":/resources/icons/circleGray.png")));
|
||||
|
||||
ui->btnRight->setEnabled(false);
|
||||
ui->btnWrong->setEnabled(false);
|
||||
ui->btnCheckup->setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,12 +71,14 @@ void CheckerTask::setTask(TaskAmmFim* task)
|
||||
//Репорт
|
||||
outReport(this->task.report);
|
||||
}
|
||||
else if(type == TypeChecker::amm_status)
|
||||
else if(type == TypeChecker::amm_check)
|
||||
{
|
||||
/*
|
||||
if(this->task.status == "new")
|
||||
ui->btnRight->setEnabled(true);
|
||||
ui->btnCompleted->setEnabled(true);
|
||||
else
|
||||
ui->btnWrong->setEnabled(true);
|
||||
*/
|
||||
|
||||
ui->lblName->setText(task->ammProcedure.title);
|
||||
ui->lblDMcode->setText(task->ammProcedure.dmCode);
|
||||
@@ -100,7 +103,7 @@ void CheckerTask::setTask(TaskAmmFim* task)
|
||||
else
|
||||
{
|
||||
ui->lblStatusCurrText->setText(tr("new"));
|
||||
ui->lblStatusCurrIco->setPixmap(QPixmap(QStringLiteral(":/resources/icons/circleGray.png")));
|
||||
ui->lblStatusCurrIco->setPixmap(QPixmap(QStringLiteral(":/resources/icons/new.png")));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -157,6 +160,7 @@ void CheckerTask::outReport(FIMReport report)
|
||||
}
|
||||
}
|
||||
|
||||
//НЕВЕРНО
|
||||
void CheckerTask::on_btnWrong_clicked()
|
||||
{
|
||||
TypeQueryToDB typeQuery;
|
||||
@@ -169,7 +173,57 @@ void CheckerTask::on_btnWrong_clicked()
|
||||
status = "failed";
|
||||
msgString = tr("Change task status?\nThe status will be set:\n'failed'");
|
||||
}
|
||||
else if(type == TypeChecker::amm_status)
|
||||
|
||||
if(SpecMsgBox::WarningYesNo(this, msgString) == QDialog::Accepted)
|
||||
{
|
||||
connectorToServer->sendQueryToDB(typeQuery, id_task, (void*)&status);
|
||||
this->parentWidget()->close();
|
||||
flChanged = true;
|
||||
}
|
||||
}
|
||||
|
||||
//ВЫПОЛНЕНО
|
||||
void CheckerTask::on_btnCompleted_clicked()
|
||||
{
|
||||
TypeQueryToDB typeQuery;
|
||||
QString status;
|
||||
QString msgString;
|
||||
|
||||
if(type == TypeChecker::fim_check)
|
||||
{
|
||||
typeQuery = TypeQueryToDB::TYPE_QUERY_CHANGE_STATUS_REPORT_TASK_FIM_TO_TRAINEE;
|
||||
status = "completed";
|
||||
msgString = tr("Change task status?\nThe status will be set:\n'completed'");
|
||||
}
|
||||
else if(type == TypeChecker::amm_check)
|
||||
{
|
||||
typeQuery = TypeQueryToDB::TYPE_QUERY_CHANGE_STATUS_REPORT_TASK_AMM_TO_TRAINEE;
|
||||
status = "completed";
|
||||
msgString = tr("Change task status?\nThe status will be set:\n'completed'");
|
||||
}
|
||||
|
||||
if(SpecMsgBox::WarningYesNo(this, msgString) == QDialog::Accepted)
|
||||
{
|
||||
connectorToServer->sendQueryToDB(typeQuery, id_task, (void*)&status);
|
||||
this->parentWidget()->close();
|
||||
flChanged = true;
|
||||
}
|
||||
}
|
||||
|
||||
//НОВАЯ
|
||||
void CheckerTask::on_btnNew_clicked()
|
||||
{
|
||||
TypeQueryToDB typeQuery;
|
||||
QString status;
|
||||
QString msgString;
|
||||
|
||||
if(type == TypeChecker::fim_check)
|
||||
{
|
||||
typeQuery = TypeQueryToDB::TYPE_QUERY_CHANGE_STATUS_REPORT_TASK_FIM_TO_TRAINEE;
|
||||
status = "new";
|
||||
msgString = tr("Change task status?\nThe status will be set:\n'new'");
|
||||
}
|
||||
else if(type == TypeChecker::amm_check)
|
||||
{
|
||||
typeQuery = TypeQueryToDB::TYPE_QUERY_CHANGE_STATUS_REPORT_TASK_AMM_TO_TRAINEE;
|
||||
status = "new";
|
||||
@@ -184,7 +238,8 @@ void CheckerTask::on_btnWrong_clicked()
|
||||
}
|
||||
}
|
||||
|
||||
void CheckerTask::on_btnRight_clicked()
|
||||
//НА ПРОВЕРКЕ
|
||||
void CheckerTask::on_btnCheckup_clicked()
|
||||
{
|
||||
TypeQueryToDB typeQuery;
|
||||
QString status;
|
||||
@@ -193,14 +248,8 @@ void CheckerTask::on_btnRight_clicked()
|
||||
if(type == TypeChecker::fim_check)
|
||||
{
|
||||
typeQuery = TypeQueryToDB::TYPE_QUERY_CHANGE_STATUS_REPORT_TASK_FIM_TO_TRAINEE;
|
||||
status = "completed";
|
||||
msgString = tr("Change task status?\nThe status will be set:\n'completed'");
|
||||
}
|
||||
else if(type == TypeChecker::amm_status)
|
||||
{
|
||||
typeQuery = TypeQueryToDB::TYPE_QUERY_CHANGE_STATUS_REPORT_TASK_AMM_TO_TRAINEE;
|
||||
status = "completed";
|
||||
msgString = tr("Change task status?\nThe status will be set:\n'completed'");
|
||||
status = "checkup";
|
||||
msgString = tr("Change task status?\nThe status will be set:\n'checkup'");
|
||||
}
|
||||
|
||||
if(SpecMsgBox::WarningYesNo(this, msgString) == QDialog::Accepted)
|
||||
|
||||
@@ -21,9 +21,7 @@ class CheckerTask : public QWidget
|
||||
public:
|
||||
enum TypeChecker
|
||||
{
|
||||
amm_status,
|
||||
amm_check,
|
||||
fim_status,
|
||||
fim_check
|
||||
};
|
||||
|
||||
@@ -42,7 +40,9 @@ public:
|
||||
|
||||
private slots:
|
||||
void on_btnWrong_clicked();
|
||||
void on_btnRight_clicked();
|
||||
void on_btnCompleted_clicked();
|
||||
void on_btnNew_clicked();
|
||||
void on_btnCheckup_clicked();
|
||||
|
||||
private:
|
||||
void outReport(FIMReport report);
|
||||
|
||||
@@ -53,6 +53,9 @@
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../InstructorsAndTrainees.qrc">:/resources/icons/rectGray.png</pixmap>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
@@ -159,6 +162,58 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="btnNew">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>New</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../InstructorsAndTrainees.qrc">
|
||||
<normaloff>:/resources/icons/new.png</normaloff>:/resources/icons/new.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextUnderIcon</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="btnCheckup">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Checkup</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../InstructorsAndTrainees.qrc">
|
||||
<normaloff>:/resources/icons/circleYellow.png</normaloff>:/resources/icons/circleYellow.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextUnderIcon</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="btnWrong">
|
||||
<property name="minimumSize">
|
||||
@@ -186,7 +241,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="btnRight">
|
||||
<widget class="QToolButton" name="btnCompleted">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
@@ -194,7 +249,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Right</string>
|
||||
<string>Completed</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../InstructorsAndTrainees.qrc">
|
||||
|
||||
@@ -17,13 +17,11 @@ DialogChekerTask::DialogChekerTask(ConnectorToServer* connectorToServer, Checker
|
||||
switch (type)
|
||||
{
|
||||
case CheckerTask::TypeChecker::fim_check:
|
||||
case CheckerTask::TypeChecker::amm_check:
|
||||
this->setWindowTitle(tr("Check Task"));
|
||||
this->setMinimumSize(1400, 700);
|
||||
this->setWindowState(Qt::WindowMaximized);
|
||||
break;
|
||||
case CheckerTask::TypeChecker::fim_status:
|
||||
case CheckerTask::TypeChecker::amm_status:
|
||||
case CheckerTask::TypeChecker::amm_check:
|
||||
this->setWindowTitle(tr("Status Task"));
|
||||
this->setMinimumSize(400, 200);
|
||||
break;
|
||||
|
||||
@@ -191,10 +191,11 @@ void FIMtasksWidget::on_treeWidgetItemClicked(QTreeWidgetItem *item, int column)
|
||||
|
||||
ui->btnDelete->setEnabled(true);
|
||||
|
||||
if(task.status != "new")
|
||||
ui->btnCheck->setEnabled(true);
|
||||
/*if(task.status != "new")
|
||||
ui->btnCheck->setEnabled(true);
|
||||
else
|
||||
ui->btnCheck->setEnabled(false);
|
||||
ui->btnCheck->setEnabled(false);*/
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -525,7 +525,7 @@ void TaskAMMFIMTreePreparation::slot_prepareAMMListItemsForTrainee(QList<TaskAmm
|
||||
else
|
||||
{
|
||||
item->setText(ColumnsTreeAMM::clmnAMM_status, tr("new"));
|
||||
item->setIcon(ColumnsTreeAMM::clmnAMM_status, QIcon(QStringLiteral(":/resources/icons/circleGray.png")));
|
||||
item->setIcon(ColumnsTreeAMM::clmnAMM_status, QIcon(QStringLiteral(":/resources/icons/new.png")));
|
||||
}
|
||||
|
||||
item->setToolTip(0, text);
|
||||
@@ -598,7 +598,7 @@ void TaskAMMFIMTreePreparation::slot_prepareFIMListItems(QByteArray array)
|
||||
else
|
||||
{
|
||||
itemTask->setText(ColumnsTreeFIM::clmnFIM_status, tr("new"));
|
||||
itemTask->setIcon(ColumnsTreeFIM::clmnFIM_status, QIcon(QStringLiteral(":/resources/icons/circleGray.png")));
|
||||
itemTask->setIcon(ColumnsTreeFIM::clmnFIM_status, QIcon(QStringLiteral(":/resources/icons/new.png")));
|
||||
}
|
||||
|
||||
|
||||
@@ -691,7 +691,7 @@ void TaskAMMFIMTreePreparation::slot_prepareFIMListItemsForTrainee(QList<TaskAmm
|
||||
else
|
||||
{
|
||||
itemTask->setText(ColumnsTreeFIM::clmnFIM_status, tr("new"));
|
||||
itemTask->setIcon(ColumnsTreeFIM::clmnFIM_status, QIcon(QStringLiteral(":/resources/icons/circleGray.png")));
|
||||
itemTask->setIcon(ColumnsTreeFIM::clmnFIM_status, QIcon(QStringLiteral(":/resources/icons/new.png")));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user