mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-29 20:05:38 +03:00
Вынес кнопки редакторов Обучаимых Инструкторов
This commit is contained in:
@@ -15,6 +15,8 @@ ViewerInstructors::ViewerInstructors(ConnectorToServer* connectorToServer, QWidg
|
|||||||
|
|
||||||
preparationTreeWidget();
|
preparationTreeWidget();
|
||||||
setNotLoggedInVisible(true);
|
setNotLoggedInVisible(true);
|
||||||
|
|
||||||
|
ui->btnEditorInstructors->setVisible(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
ViewerInstructors::~ViewerInstructors()
|
ViewerInstructors::~ViewerInstructors()
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ Q_SIGNALS:
|
|||||||
//сигнал о блокировке авторизации
|
//сигнал о блокировке авторизации
|
||||||
void signal_BlockAutorization(bool block);
|
void signal_BlockAutorization(bool block);
|
||||||
|
|
||||||
private Q_SLOTS:
|
public Q_SLOTS:
|
||||||
void on_btnEditorInstructors_clicked();
|
void on_btnEditorInstructors_clicked();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -104,6 +104,9 @@ InstructorsAndTraineesWidget::InstructorsAndTraineesWidget(QWidget *parent) :
|
|||||||
messangerWidget->setMaximumWidth(500);
|
messangerWidget->setMaximumWidth(500);
|
||||||
|
|
||||||
ui->btnAuthorizationInstructor->setEnabled(false);
|
ui->btnAuthorizationInstructor->setEnabled(false);
|
||||||
|
|
||||||
|
ui->btnEditorTrainees->setEnabled(false);
|
||||||
|
ui->btnEditorInstructors->setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
InstructorsAndTraineesWidget::~InstructorsAndTraineesWidget()
|
InstructorsAndTraineesWidget::~InstructorsAndTraineesWidget()
|
||||||
@@ -202,6 +205,10 @@ void InstructorsAndTraineesWidget::checkLoginResult(ServerAuthorization *serverA
|
|||||||
viewerInstructors->setAuthComplited(true);
|
viewerInstructors->setAuthComplited(true);
|
||||||
viewerTrainees->setAuthComplited(true);
|
viewerTrainees->setAuthComplited(true);
|
||||||
|
|
||||||
|
ui->btnEditorTrainees->setEnabled(true);
|
||||||
|
if(adminMode)
|
||||||
|
ui->btnEditorInstructors->setEnabled(true);
|
||||||
|
|
||||||
Q_EMIT signal_NeedUpdateUI(true, true);
|
Q_EMIT signal_NeedUpdateUI(true, true);
|
||||||
//ui->btnSetVersion->show();
|
//ui->btnSetVersion->show();
|
||||||
ui->btnAuthorizationInstructor->setText(tr("Deauthorization Instructor"));
|
ui->btnAuthorizationInstructor->setText(tr("Deauthorization Instructor"));
|
||||||
@@ -234,6 +241,9 @@ void InstructorsAndTraineesWidget::checkDeLoginResult(ServerDeAuthorization *ser
|
|||||||
viewerInstructors->setAuthComplited(false);
|
viewerInstructors->setAuthComplited(false);
|
||||||
viewerTrainees->setAuthComplited(false);
|
viewerTrainees->setAuthComplited(false);
|
||||||
|
|
||||||
|
ui->btnEditorTrainees->setEnabled(false);
|
||||||
|
ui->btnEditorInstructors->setEnabled(false);
|
||||||
|
|
||||||
//Q_EMIT signal_NeedUpdateUI(true, false);
|
//Q_EMIT signal_NeedUpdateUI(true, false);
|
||||||
|
|
||||||
ui->btnAuthorizationInstructor->setText(tr("Authorization Instructor"));
|
ui->btnAuthorizationInstructor->setText(tr("Authorization Instructor"));
|
||||||
@@ -273,6 +283,9 @@ void InstructorsAndTraineesWidget::slot_ConnectedToServer(bool state)
|
|||||||
viewerInstructors->setAuthComplited(false);
|
viewerInstructors->setAuthComplited(false);
|
||||||
viewerTrainees->setAuthComplited(false);
|
viewerTrainees->setAuthComplited(false);
|
||||||
|
|
||||||
|
ui->btnEditorTrainees->setEnabled(false);
|
||||||
|
ui->btnEditorInstructors->setEnabled(false);
|
||||||
|
|
||||||
viewerTrainees->deactivate();
|
viewerTrainees->deactivate();
|
||||||
viewerInstructors->deactivate();
|
viewerInstructors->deactivate();
|
||||||
|
|
||||||
@@ -429,3 +442,13 @@ void InstructorsAndTraineesWidget::on_btnSettings_clicked()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void InstructorsAndTraineesWidget::on_btnEditorTrainees_clicked()
|
||||||
|
{
|
||||||
|
this->viewerTrainees->on_btnEditorTrainees_clicked();
|
||||||
|
}
|
||||||
|
|
||||||
|
void InstructorsAndTraineesWidget::on_btnEditorInstructors_clicked()
|
||||||
|
{
|
||||||
|
this->viewerInstructors->on_btnEditorInstructors_clicked();
|
||||||
|
}
|
||||||
|
|||||||
@@ -72,6 +72,10 @@ private Q_SLOTS:
|
|||||||
|
|
||||||
void on_btnSettings_clicked();
|
void on_btnSettings_clicked();
|
||||||
|
|
||||||
|
void on_btnEditorTrainees_clicked();
|
||||||
|
|
||||||
|
void on_btnEditorInstructors_clicked();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
//Авторизация инструктора локальная
|
//Авторизация инструктора локальная
|
||||||
bool authorizationInstructorDialog(QWidget* parent = nullptr);
|
bool authorizationInstructorDialog(QWidget* parent = nullptr);
|
||||||
|
|||||||
@@ -218,6 +218,58 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="btnEditorTrainees">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>58</width>
|
||||||
|
<height>58</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Editor Trainees</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="resources.qrc">
|
||||||
|
<normaloff>:/resources/icons/DB-trainees.png</normaloff>:/resources/icons/DB-trainees.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="btnEditorInstructors">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>58</width>
|
||||||
|
<height>58</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Editor Instructors</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="resources.qrc">
|
||||||
|
<normaloff>:/resources/icons/DB-instructors.png</normaloff>:/resources/icons/DB-instructors.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>
|
<item>
|
||||||
<widget class="QToolButton" name="btnSettings">
|
<widget class="QToolButton" name="btnSettings">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
|
|||||||
@@ -50,5 +50,6 @@
|
|||||||
<file>resources/icons/settings.png</file>
|
<file>resources/icons/settings.png</file>
|
||||||
<file>resources/icons/style.png</file>
|
<file>resources/icons/style.png</file>
|
||||||
<file>resources/icons/updateVersion.png</file>
|
<file>resources/icons/updateVersion.png</file>
|
||||||
|
<file>resources/icons/editorDB.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|||||||
BIN
InstructorsAndTrainees/resources/icons/editorDB.png
Normal file
BIN
InstructorsAndTrainees/resources/icons/editorDB.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 40 KiB |
@@ -28,6 +28,8 @@ ViewerTrainees::ViewerTrainees(ConnectorToServer* connectorToServer, QWidget *pa
|
|||||||
|
|
||||||
preparationTreeWidget();
|
preparationTreeWidget();
|
||||||
setNotLoggedInVisible(true);
|
setNotLoggedInVisible(true);
|
||||||
|
|
||||||
|
ui->btnEditorTrainees->setVisible(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
ViewerTrainees::~ViewerTrainees()
|
ViewerTrainees::~ViewerTrainees()
|
||||||
|
|||||||
@@ -31,9 +31,10 @@ Q_SIGNALS:
|
|||||||
//сигнал о блокировке авторизации
|
//сигнал о блокировке авторизации
|
||||||
void signal_BlockAutorization(bool block);
|
void signal_BlockAutorization(bool block);
|
||||||
|
|
||||||
private Q_SLOTS:
|
public Q_SLOTS:
|
||||||
//void on_treeWidget_itemClicked(QTreeWidgetItem *item, int column);
|
//void on_treeWidget_itemClicked(QTreeWidgetItem *item, int column);
|
||||||
void on_btnEditorTrainees_clicked();
|
void on_btnEditorTrainees_clicked();
|
||||||
|
private Q_SLOTS:
|
||||||
void on_treeWidget_currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous);
|
void on_treeWidget_currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous);
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
|
|||||||
Reference in New Issue
Block a user