mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
передается список ПП в sendQueryToDB для отправки
This commit is contained in:
@@ -69,6 +69,25 @@ void ListSubProc::setTask(TaskAmmFim *task)
|
||||
waitAnimationWidget->hideWithStop();
|
||||
}
|
||||
|
||||
bool ListSubProc::getListCheckedSubProc(QList<SubProc>* listSubProc)
|
||||
{
|
||||
//Заполнение списка отмеченных ПП
|
||||
for (int i = 0; i < treeWidget->topLevelItemCount(); i++)
|
||||
{
|
||||
QTreeWidgetItem *item = treeWidget->topLevelItem(i);
|
||||
if(item->checkState(0) == Qt::Checked)
|
||||
{
|
||||
SubProc subProc;
|
||||
subProc.dmCode = item->text(ColumnsTreeSubProc::clmnSP_code);
|
||||
subProc.title = item->text(ColumnsTreeSubProc::clmnSP_title);
|
||||
subProc.modeList = parseCanplay(item->text(ColumnsTreeSubProc::clmnSP_canplay));
|
||||
listSubProc->append(subProc);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void ListSubProc::preparationTreeWidget()
|
||||
{
|
||||
treeWidget->setColumnCount(ColumnsTreeSubProc::clmnSP_count);
|
||||
@@ -131,6 +150,45 @@ QString ListSubProc::buildCanplay(ModeList modeList)
|
||||
return canplay;
|
||||
}
|
||||
|
||||
ModeList ListSubProc::parseCanplay(QString canplay)
|
||||
{
|
||||
ModeList modeList;
|
||||
|
||||
if(canplay == "")
|
||||
{
|
||||
modeList.demo = false;
|
||||
modeList.train = false;
|
||||
modeList.exam = false;
|
||||
modeList.autoM = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
QStringList list = canplay.split("/");
|
||||
|
||||
if(list.at(0) == "+")
|
||||
modeList.demo = true;
|
||||
else
|
||||
modeList.demo = false;
|
||||
|
||||
if(list.at(1) == "+")
|
||||
modeList.train = true;
|
||||
else
|
||||
modeList.train = false;
|
||||
|
||||
if(list.at(2) == "+")
|
||||
modeList.exam = true;
|
||||
else
|
||||
modeList.exam = false;
|
||||
|
||||
if(list.at(3) == "+")
|
||||
modeList.autoM = true;
|
||||
else
|
||||
modeList.autoM = false;
|
||||
}
|
||||
|
||||
return modeList;
|
||||
}
|
||||
|
||||
void ListSubProc::slot_UpdateSubProcForDMCode(QString dmCode)
|
||||
{
|
||||
if(this->task.ammProcedure.dmCode == dmCode)
|
||||
@@ -155,3 +213,8 @@ void ListSubProc::slot_UpdateSubProcForDMCode(QString dmCode)
|
||||
waitAnimationWidget->hideWithStop();
|
||||
}
|
||||
}
|
||||
|
||||
void ListSubProc::on_btnAssign_clicked()
|
||||
{
|
||||
emit signal_Accepted();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user