Рефакт

This commit is contained in:
2025-09-19 10:42:51 +03:00
parent 4eabd95506
commit d93e5e49c9
5 changed files with 23 additions and 16 deletions

View File

@@ -24,20 +24,20 @@ void InstructorsView::resizeEvent(QResizeEvent *event)
if(typeView == TypeView::onlyView)
{//onlyView
widthInstructor = width - (220 + 10);
widthInstructor = width - (220 + 10 + 20);
}
else
{//control
if(adminMode)
{
#ifdef PROJECT_TYPE_DEBUG
widthInstructor = width - (610 + 10);
widthInstructor = width - (610 + 10 + 20);
#else
widthInstructor = width - (560 + 10);
widthInstructor = width - (560 + 10 + 20);
#endif
}
else
widthInstructor = width - (480 + 10);
widthInstructor = width - (480 + 10 + 20);
}
if(widthInstructor < 250)
widthInstructor = 250;

View File

@@ -14,9 +14,16 @@ DialogChekerTask::DialogChekerTask(ConnectorToServer* connectorToServer, QString
QHBoxLayout *layout = new QHBoxLayout(this);
layout->addWidget(checkerTask);
this->setWindowTitle(tr("Check Task"));
this->setMinimumSize(1400, 700);
if(type == "fim")
{
this->setMinimumSize(1400, 700);
this->setWindowState(Qt::WindowMaximized);
}
else
{
this->setMinimumSize(400, 200);
}
this->setModal(true);
}

View File

@@ -89,7 +89,7 @@ QTreeWidgetItem *TaskAMMFIMTreePreparation::addModuleToTreeWidgetAMM(Module *mod
QString text = "";
QString ID = QString::number(module->getID());
QString code = "";
QString DMcode = "---";
itemModule = new QTreeWidgetItem();
countItems++;
@@ -101,7 +101,7 @@ QTreeWidgetItem *TaskAMMFIMTreePreparation::addModuleToTreeWidgetAMM(Module *mod
{
PM* PMmodul = static_cast<PM*>(module);
text = PMmodul->getLangStructRus().title;
code = PMmodul->pmCode();
//DMcode = PMmodul->pmCode();
for(Module* module : PMmodul->getListChildModules())
{
@@ -112,7 +112,7 @@ QTreeWidgetItem *TaskAMMFIMTreePreparation::addModuleToTreeWidgetAMM(Module *mod
{
DM* DMmodul = static_cast<DM*>(module);
text = DMmodul->getLangStructRus().techName;
code = DMmodul->dmCode();
DMcode = DMmodul->dmCode();
//itemModule->setFlags(itemModule->flags() | Qt::ItemIsUserCheckable);
//itemModule->setCheckState(0, Qt::Checked);
@@ -120,7 +120,7 @@ QTreeWidgetItem *TaskAMMFIMTreePreparation::addModuleToTreeWidgetAMM(Module *mod
}
itemModule->setText(ColumnsTreeAMM::clmnAMM_PMorDM, text);
itemModule->setText(ColumnsTreeAMM::clmnAMM_code, code);
itemModule->setText(ColumnsTreeAMM::clmnAMM_code, DMcode);
itemModule->setText(ColumnsTreeAMM::clmnAMM_ID, ID);
itemModule->setToolTip(0, text);

View File

@@ -25,20 +25,20 @@ void TraineesView::resizeEvent(QResizeEvent *event)
if(typeView == TypeView::onlyView)
{//onlyView
widthTrainee = width - (220 + 10);
widthTrainee = width - (220 + 10 + 20);
}
else
{//control
if(adminMode)
{
#ifdef PROJECT_TYPE_DEBUG
widthTrainee = width - (470 + 10);
widthTrainee = width - (470 + 10 + 20);
#else
widthTrainee = width - (420 + 10);
widthTrainee = width - (420 + 10 + 20);
#endif
}
else
widthTrainee = width - (440 + 10);
widthTrainee = width - (440 + 10 + 20);
}
if(widthTrainee < 250)
widthTrainee = 250;