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:
@@ -86,6 +86,7 @@ target_link_libraries(ServerLMS PRIVATE libDataBaseLMS.dll)
|
||||
target_include_directories(ServerLMS PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../InstructorsAndTrainees)
|
||||
target_include_directories(ServerLMS PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../InstructorsAndTrainees/authorization)
|
||||
target_include_directories(ServerLMS PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../InstructorsAndTrainees/tasks)
|
||||
target_include_directories(ServerLMS PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../InstructorsAndTrainees/widgets)
|
||||
if(PROJECT_TYPE_DEBUG)
|
||||
target_link_directories(ServerLMS PUBLIC ${REPO_PATH}/BUILDS/Debug64/InstructorsAndTrainees)
|
||||
else()
|
||||
|
||||
@@ -16,6 +16,7 @@ const QString ServerLMSWidget::languageRUS = "ru_RU";
|
||||
ServerLMSWidget::ServerLMSWidget(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::ServerLMSWidget),
|
||||
waitAnimationWidget(nullptr),
|
||||
server(nullptr),
|
||||
updateThread(nullptr),
|
||||
loggerThread(nullptr),
|
||||
@@ -42,6 +43,13 @@ ServerLMSWidget::ServerLMSWidget(QWidget *parent) :
|
||||
updateMyStyleSheet();
|
||||
|
||||
setLanguageInterfase();
|
||||
|
||||
waitAnimationWidget = new WaitAnimationWidget;
|
||||
QMovie *movie = new QMovie(":/resources/icons/762.gif");
|
||||
waitAnimationWidget->setParent(this);
|
||||
waitAnimationWidget->initialize(movie,this);
|
||||
|
||||
waitAnimationWidget->showWithPlay();
|
||||
}
|
||||
|
||||
ServerLMSWidget::~ServerLMSWidget()
|
||||
@@ -72,6 +80,9 @@ ServerLMSWidget::~ServerLMSWidget()
|
||||
delete providerDBLMS;
|
||||
}
|
||||
|
||||
waitAnimationWidget->hideWithStop();
|
||||
delete waitAnimationWidget;
|
||||
|
||||
delete ui;
|
||||
}
|
||||
|
||||
@@ -86,6 +97,12 @@ void ServerLMSWidget::changeEvent(QEvent *event)
|
||||
}
|
||||
}
|
||||
|
||||
void ServerLMSWidget::resizeEvent(QResizeEvent *event)
|
||||
{
|
||||
QSize size = event->size();
|
||||
waitAnimationWidget->resize(size);
|
||||
}
|
||||
|
||||
void ServerLMSWidget::slot_UpdateListClients()
|
||||
{
|
||||
//Очищаем список
|
||||
@@ -131,6 +148,8 @@ void ServerLMSWidget::start()
|
||||
if(hasError() == 100)
|
||||
return;
|
||||
tryConnectionToDB();
|
||||
|
||||
waitAnimationWidget->hideWithStop();
|
||||
}
|
||||
|
||||
void ServerLMSWidget::slot_BlockAutorization(bool block)
|
||||
|
||||
@@ -28,6 +28,10 @@
|
||||
#include "providerdblms.h"
|
||||
#include "docsupdater.h"
|
||||
|
||||
#include "waitanimationwidget.h"
|
||||
|
||||
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class ServerLMSWidget;
|
||||
@@ -64,6 +68,8 @@ protected:
|
||||
// В нём будет производиться проверка события смены перевода приложения
|
||||
void changeEvent(QEvent * event) override;
|
||||
|
||||
void resizeEvent(QResizeEvent *event) override;
|
||||
|
||||
signals:
|
||||
//сигнал смены языка
|
||||
void signal_LanguageChanged(QString language);
|
||||
@@ -139,7 +145,7 @@ private:
|
||||
Ui::ServerLMSWidget *ui;
|
||||
|
||||
private:
|
||||
//WaitAnimationWidget *waitAnimationWidget;
|
||||
WaitAnimationWidget *waitAnimationWidget;
|
||||
|
||||
MultiThreadServer *server;
|
||||
QThread *updateThread;
|
||||
|
||||
Reference in New Issue
Block a user