This commit is contained in:
2025-11-27 18:06:13 +03:00
parent 6f44b6125e
commit c61066cfd1
3 changed files with 33 additions and 1 deletions

View File

@@ -55,7 +55,8 @@ InstructorsAndTraineesWidget::InstructorsAndTraineesWidget(QWidget *parent) :
connect(connectorToServer, &ConnectorToServer::sigDeLoginResult, this, &InstructorsAndTraineesWidget::slot_checkDeLoginResult);
connect(connectorToServer, &ConnectorToServer::sigServerBlocked, this, &InstructorsAndTraineesWidget::slot_ServerBlocked);
connect(connectorToServer, &ConnectorToServer::sigErrorAuth, this, &InstructorsAndTraineesWidget::slot_ErrorAuth);
connect(connectorToServer,&ConnectorToServer::signal_AnswerDocsChanged,this, &InstructorsAndTraineesWidget::slot_AnswerDocsChanged);
connect(connectorToServer, &ConnectorToServer::signal_SetVersion, this, &InstructorsAndTraineesWidget::slot_SetVersion);
connect(connectorToServer, &ConnectorToServer::signal_AnswerDocsChanged,this, &InstructorsAndTraineesWidget::slot_AnswerDocsChanged);
messangerController = new MessangerController(connectorToServer, this);
@@ -320,6 +321,12 @@ void InstructorsAndTraineesWidget::slot_ErrorAuth(QString error)
}
}
void InstructorsAndTraineesWidget::slot_SetVersion(StreamingVersionData *serverVersion)
{
QString viewName = serverVersion->getViewName();
ui->lblVersionText->setText(viewName);
}
void InstructorsAndTraineesWidget::slot_ConnectedToServer(bool state)
{
if(state)

View File

@@ -55,6 +55,7 @@ public Q_SLOTS:
void slot_ServerBlocked();
void slot_ErrorAuth(QString error);
void slot_SetVersion(StreamingVersionData* serverVersion);
//Слот обработки результата подключения к серверу
void slot_ConnectedToServer(bool state);

View File

@@ -365,6 +365,12 @@
</item>
<item>
<widget class="QLabel" name="lblServer">
<property name="minimumSize">
<size>
<width>400</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>none</string>
</property>
@@ -372,6 +378,24 @@
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_Version">
<item>
<widget class="QLabel" name="label_Version">
<property name="text">
<string>Version of materials: </string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lblVersionText">
<property name="text">
<string>...</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">