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:
@@ -260,12 +260,12 @@ void RecognizeSystem::recognize(QTcpSocket *socket)
|
||||
|
||||
if(packetType == PacketType::BUSY)
|
||||
{
|
||||
//emit sigAnimationActivated(true);
|
||||
signal_ServerBlockState(true);
|
||||
}
|
||||
|
||||
if(packetType == PacketType::FREE)
|
||||
{
|
||||
//emit sigAnimationActivated(false);
|
||||
signal_ServerBlockState(false);
|
||||
}
|
||||
|
||||
if(packetType == PacketType::HASH_READY)
|
||||
|
||||
@@ -62,6 +62,8 @@ signals:
|
||||
|
||||
void signal_AnswerDocsChanged();
|
||||
|
||||
void signal_ServerBlockState(bool state);
|
||||
|
||||
private:
|
||||
QList<QString> *folderList;
|
||||
//MainWindow *mainWindow;
|
||||
|
||||
@@ -9,7 +9,8 @@ ConnectorToServer::ConnectorToServer(QObject *parent) :
|
||||
sendSystem(nullptr),
|
||||
recognizeSystem(nullptr),
|
||||
fl_GetedOfflineMessages(false),
|
||||
nameInstructorLoggedInLocal("")
|
||||
nameInstructorLoggedInLocal(""),
|
||||
serverBlockState(false)
|
||||
{
|
||||
initialize();
|
||||
}
|
||||
@@ -38,6 +39,8 @@ bool ConnectorToServer::getIsConnected()
|
||||
|
||||
void ConnectorToServer::SetConnectToServer()
|
||||
{
|
||||
serverBlockState = false;
|
||||
|
||||
qDebug() << "connectorToServer::SetConnectToServer() thread ID " << QThread::currentThreadId();
|
||||
serverSettings = *dataParser->getServerSettings();
|
||||
emit sigSetConnect(dataParser->getServerSettings(),connectionThread);
|
||||
@@ -45,6 +48,8 @@ void ConnectorToServer::SetConnectToServer()
|
||||
|
||||
void ConnectorToServer::StopConnectToServer()
|
||||
{
|
||||
serverBlockState = false;
|
||||
|
||||
emit sigStopConnect();
|
||||
clearListModelDB();
|
||||
}
|
||||
@@ -117,6 +122,12 @@ void ConnectorToServer::slot_NotifyVersionControl(QString text)
|
||||
emit signal_NotifyVersionControl(text);
|
||||
}
|
||||
|
||||
void ConnectorToServer::slot_ServerBlockState(bool state)
|
||||
{
|
||||
serverBlockState = state;
|
||||
emit signal_ServerBlockState(state);
|
||||
}
|
||||
|
||||
void ConnectorToServer::initialize()
|
||||
{
|
||||
createObjects();
|
||||
@@ -169,6 +180,8 @@ void ConnectorToServer::bindConnection()
|
||||
|
||||
connect(recognizeSystem, &RecognizeSystem::sigSetVersion, this, &ConnectorToServer::signal_SetVersion);
|
||||
|
||||
connect(recognizeSystem,&RecognizeSystem::signal_ServerBlockState,this,&ConnectorToServer::slot_ServerBlockState);
|
||||
|
||||
connect(this, &ConnectorToServer::signal_SendCopyVersion, sendSystem, &SendSystem::sendCopyVersion);
|
||||
connect(this, &ConnectorToServer::signal_SendDeleteVersion, sendSystem, &SendSystem::sendDeleteVersion);
|
||||
connect(this, &ConnectorToServer::signal_SendSwitchVersion, sendSystem, &SendSystem::sendChangeVersion);
|
||||
@@ -195,6 +208,11 @@ void ConnectorToServer::createObjects()
|
||||
connectionThread->setPriority(QThread::HighestPriority);
|
||||
}
|
||||
|
||||
bool ConnectorToServer::getServerBlockState() const
|
||||
{
|
||||
return serverBlockState;
|
||||
}
|
||||
|
||||
SendSystem *ConnectorToServer::getSendSystem() const
|
||||
{
|
||||
return sendSystem;
|
||||
|
||||
@@ -82,6 +82,8 @@ public:
|
||||
int getIdTraineeByLogin(QString login);
|
||||
int getIdInstructorByLogin(QString login);
|
||||
|
||||
bool getServerBlockState() const;
|
||||
|
||||
private:
|
||||
//Очистка списочной модели БД СУО
|
||||
void clearListModelDB();
|
||||
@@ -117,6 +119,8 @@ public slots:
|
||||
|
||||
void slot_NotifyVersionControl(QString text);
|
||||
|
||||
void slot_ServerBlockState(bool state);
|
||||
|
||||
signals:
|
||||
void sigSetConnect(ServerSettings* serverSettings,QThread *thread);
|
||||
void sigStopConnect();
|
||||
@@ -159,6 +163,8 @@ signals:
|
||||
|
||||
void signal_NotifyVersionControl(QString text);
|
||||
|
||||
void signal_ServerBlockState(bool state);
|
||||
|
||||
private:
|
||||
void initialize();
|
||||
void bindConnection();
|
||||
@@ -191,6 +197,8 @@ private:
|
||||
bool fl_GetedOfflineMessages;
|
||||
|
||||
QString nameInstructorLoggedInLocal;
|
||||
|
||||
bool serverBlockState;
|
||||
};
|
||||
|
||||
#endif // CONNECTORTOSERVER_H
|
||||
|
||||
Reference in New Issue
Block a user