mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-27 19:45:43 +03:00
Кнопка для Персональной карточки
This commit is contained in:
@@ -81,6 +81,7 @@ InstructorsAndTraineesWidget::InstructorsAndTraineesWidget(QWidget *parent) :
|
||||
ui->btnAuthorizationInstructor->setEnabled(false);
|
||||
ui->btnEditorTrainees->setEnabled(false);
|
||||
ui->btnEditorInstructors->setEnabled(false);
|
||||
ui->btnPersonalCard->setEnabled(false);
|
||||
}
|
||||
|
||||
InstructorsAndTraineesWidget::~InstructorsAndTraineesWidget()
|
||||
@@ -209,6 +210,7 @@ void InstructorsAndTraineesWidget::slot_checkDeLoginResult(ServerDeAuthorization
|
||||
|
||||
ui->btnEditorTrainees->setEnabled(false);
|
||||
ui->btnEditorInstructors->setEnabled(false);
|
||||
ui->btnPersonalCard->setEnabled(false);
|
||||
|
||||
updateLabelLoggedInInstructor("","");
|
||||
}
|
||||
@@ -243,6 +245,7 @@ void InstructorsAndTraineesWidget::slot_ConnectedToServer(bool state)
|
||||
|
||||
ui->btnEditorTrainees->setEnabled(false);
|
||||
ui->btnEditorInstructors->setEnabled(false);
|
||||
ui->btnPersonalCard->setEnabled(false);
|
||||
|
||||
viewerTrainees->deactivate();
|
||||
viewerInstructors->deactivate();
|
||||
@@ -264,6 +267,7 @@ void InstructorsAndTraineesWidget::slot_ConnectedToServer(bool state)
|
||||
|
||||
void InstructorsAndTraineesWidget::slot_traineeSelected(int id_trainee)
|
||||
{
|
||||
ui->btnPersonalCard->setEnabled(false);
|
||||
viewerInstructors->clearSelection();
|
||||
|
||||
/*Messanger*/
|
||||
@@ -272,12 +276,16 @@ void InstructorsAndTraineesWidget::slot_traineeSelected(int id_trainee)
|
||||
{
|
||||
Trainee trainee = connectorToServer->getTrainee(id_trainee);
|
||||
if(trainee.getID())
|
||||
{
|
||||
messangerWidget = messangerController->newWidget(this, &trainee, ui->verticalLayout_Messenger);
|
||||
ui->btnPersonalCard->setEnabled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void InstructorsAndTraineesWidget::slot_instructorSelected(int id_instructor)
|
||||
{
|
||||
ui->btnPersonalCard->setEnabled(false);
|
||||
viewerTrainees->clearSelection();
|
||||
|
||||
/*Messanger*/
|
||||
@@ -474,3 +482,8 @@ void InstructorsAndTraineesWidget::on_btnEditorInstructors_clicked()
|
||||
{
|
||||
this->viewerInstructors->on_btnEditorInstructors_clicked();
|
||||
}
|
||||
|
||||
void InstructorsAndTraineesWidget::on_btnPersonalCard_clicked()
|
||||
{
|
||||
this->viewerTrainees->on_btnPersonalCard_clicked();
|
||||
}
|
||||
|
||||
@@ -69,6 +69,8 @@ private Q_SLOTS:
|
||||
void on_btnEditorTrainees_clicked();
|
||||
void on_btnEditorInstructors_clicked();
|
||||
|
||||
void on_btnPersonalCard_clicked();
|
||||
|
||||
private:
|
||||
//Авторизация инструктора локальная (на ГУИ)
|
||||
bool authorizationInstructorDialog(QWidget* parent = nullptr);
|
||||
|
||||
@@ -151,6 +151,32 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="btnPersonalCard">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>130</width>
|
||||
<height>58</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Personal card</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="resources.qrc">
|
||||
<normaloff>:/resources/icons/personalCard.png</normaloff>:/resources/icons/personalCard.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>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
|
||||
@@ -52,5 +52,6 @@
|
||||
<file>resources/icons/critical.png</file>
|
||||
<file>resources/icons/warning.png</file>
|
||||
<file>resources/icons/info.png</file>
|
||||
<file>resources/icons/personalCard.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
BIN
InstructorsAndTrainees/resources/icons/personalCard.png
Normal file
BIN
InstructorsAndTrainees/resources/icons/personalCard.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
@@ -109,6 +109,24 @@ void ViewerTrainees::on_btnEditorTrainees_clicked()
|
||||
connectorToServer->sendQueryBlockAuth(false);
|
||||
}
|
||||
|
||||
void ViewerTrainees::on_btnPersonalCard_clicked()
|
||||
{
|
||||
if(lastCurrentID && typeObject == TypeObject::objTrainee)
|
||||
{
|
||||
dlgCardTrainee = new DialogCardTrainee(connectorToServer, messangerController, lastCurrentID, ammTasksWidgetCommon, fimTasksWidgetCommon, this);
|
||||
dlgCardTrainee->exec();
|
||||
|
||||
ammTasksWidgetCommon->setParent(this);
|
||||
fimTasksWidgetCommon->setParent(this);
|
||||
|
||||
if(dlgCardTrainee)
|
||||
{
|
||||
delete dlgCardTrainee;
|
||||
dlgCardTrainee = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ViewerTrainees::on_itemDoubleClicked(QTreeWidgetItem *item, int column)
|
||||
{
|
||||
if(item == nullptr)
|
||||
|
||||
@@ -37,6 +37,7 @@ Q_SIGNALS:
|
||||
public Q_SLOTS:
|
||||
//void on_treeWidget_itemClicked(QTreeWidgetItem *item, int column);
|
||||
void on_btnEditorTrainees_clicked();
|
||||
void on_btnPersonalCard_clicked();
|
||||
private Q_SLOTS:
|
||||
void on_itemDoubleClicked(QTreeWidgetItem *item, int column);
|
||||
void on_treeWidgetItemClicked(QTreeWidgetItem *item, int column);
|
||||
|
||||
Reference in New Issue
Block a user