mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
Выбор Обучаемых/Инструкторов исправил
This commit is contained in:
@@ -44,6 +44,7 @@ public:
|
|||||||
void clearSelection()
|
void clearSelection()
|
||||||
{
|
{
|
||||||
treeWidget->clearSelection();
|
treeWidget->clearSelection();
|
||||||
|
lastCurrentID = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
TraineesView::TraineesView(ConnectorToServer* connectorToServer, TypeView type, QWidget *parent):
|
TraineesView::TraineesView(ConnectorToServer* connectorToServer, TypeView type, QWidget *parent):
|
||||||
CommonView(connectorToServer, type, parent)
|
CommonView(connectorToServer, type, parent)
|
||||||
{
|
{
|
||||||
typeObject = TypeObject::objGroup;
|
typeObject = TypeObject::objTrainee;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TraineesView::resizeEvent(QResizeEvent *event)
|
void TraineesView::resizeEvent(QResizeEvent *event)
|
||||||
|
|||||||
@@ -151,8 +151,10 @@ void ViewerTrainees::on_treeWidget_itemClicked(QTreeWidgetItem *item, int column
|
|||||||
if(item == nullptr)
|
if(item == nullptr)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
//if(current->childCount() == 0)
|
if(item->childCount() == 0)
|
||||||
{//Выбран обучаемый
|
{//Выбран обучаемый
|
||||||
|
typeObject = TypeObject::objTrainee;
|
||||||
|
|
||||||
QString login = item->text(ColumnsTreeTrainees::clmn_Login);
|
QString login = item->text(ColumnsTreeTrainees::clmn_Login);
|
||||||
//if(login != "")
|
//if(login != "")
|
||||||
{
|
{
|
||||||
@@ -166,6 +168,18 @@ void ViewerTrainees::on_treeWidget_itemClicked(QTreeWidgetItem *item, int column
|
|||||||
Q_EMIT signal_traineeSelected(login);
|
Q_EMIT signal_traineeSelected(login);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{//Выбрана группа
|
||||||
|
typeObject = TypeObject::objGroup;
|
||||||
|
|
||||||
|
int id_group = item->text(ColumnsTreeTrainees::clmn_ID).toInt();
|
||||||
|
|
||||||
|
lastCurrentID = id_group;
|
||||||
|
typeObject = TypeObject::objGroup;
|
||||||
|
|
||||||
|
QString login = "";
|
||||||
|
Q_EMIT signal_traineeSelected(login);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewerTrainees::updateButtons()
|
void ViewerTrainees::updateButtons()
|
||||||
|
|||||||
Reference in New Issue
Block a user