mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-27 19:45:43 +03:00
TrayServerLMS рабочая версия
This commit is contained in:
@@ -16,7 +16,7 @@ bool InterfaceDataBaseLMS::connectionToDB()
|
||||
{
|
||||
if(!createConnection())
|
||||
{
|
||||
QMessageBox::critical(ownerWidget, dbSettings.dbName, tr("Connection error") /*+ db->lastError().text()*/);
|
||||
//QMessageBox::critical(ownerWidget, dbSettings.dbName, tr("Connection error") /*+ db->lastError().text()*/);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -70,6 +70,7 @@ DialogSettings::DialogSettings(ConnectorToServer* connectorToServer, bool instru
|
||||
ui->checkAutoStart->setVisible(false);
|
||||
|
||||
ui->btnSave->setEnabled(false);
|
||||
flSettingsServerChanged = false;
|
||||
}
|
||||
|
||||
DialogSettings::~DialogSettings()
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<string>Instructor authorization</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset resource="../resources.qrc">
|
||||
<iconset resource="../InstructorsAndTrainees.qrc">
|
||||
<normaloff>:/resources/icons/lms.png</normaloff>:/resources/icons/lms.png</iconset>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
@@ -90,7 +90,7 @@
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../resources.qrc">
|
||||
<iconset resource="../InstructorsAndTrainees.qrc">
|
||||
<normaloff>:/resources/icons/eye.png</normaloff>:/resources/icons/eye.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
@@ -136,7 +136,7 @@
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../resources.qrc"/>
|
||||
<include location="../InstructorsAndTrainees.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
||||
@@ -34,6 +34,9 @@ DialogSettingsTray::DialogSettingsTray(QWidget *parent) :
|
||||
//Задаём два пункта с текстом локалей в комбобоксе
|
||||
ui->cmbLanguage->addItems(QStringList() << "English" << "Русский");
|
||||
|
||||
//Скрываем пароль
|
||||
ui->editPassword->setEchoMode(QLineEdit::EchoMode::Password);
|
||||
|
||||
if(loadSettings(settings))
|
||||
{
|
||||
if(settings->Language == "ENG")
|
||||
@@ -49,6 +52,7 @@ DialogSettingsTray::DialogSettingsTray(QWidget *parent) :
|
||||
}
|
||||
|
||||
ui->btnSave->setEnabled(false);
|
||||
flSettingsServerChanged = false;
|
||||
}
|
||||
|
||||
DialogSettingsTray::~DialogSettingsTray()
|
||||
|
||||
@@ -30,7 +30,7 @@ public:
|
||||
|
||||
ServerDBSettings getSettings();
|
||||
|
||||
bool settingsServerIsChanged(){ return flSettingsServerChanged;}
|
||||
bool settingsDBisChanged(){ return flSettingsServerChanged;}
|
||||
|
||||
static bool loadSettings(ServerDBSettings *settings);
|
||||
|
||||
|
||||
@@ -60,6 +60,7 @@ bool MultiThreadServer::stopServer()
|
||||
//Закрываем сервер
|
||||
close();
|
||||
stateServer = stoped;
|
||||
Logger::instance().log("SERVER: stop OK");
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@@ -73,7 +74,7 @@ QMap<int, ClientHandler *> *MultiThreadServer::getClientsMap() const
|
||||
|
||||
void MultiThreadServer::updateClientList()
|
||||
{
|
||||
serverLmsWidget->slotUpdateListClients();
|
||||
serverLmsWidget->slot_UpdateListClients();
|
||||
}
|
||||
|
||||
void MultiThreadServer::disableClients()
|
||||
@@ -130,19 +131,19 @@ void MultiThreadServer::slotDisconnectClient(QString peerAddress, QString peerPo
|
||||
emit signalStopSendFile();
|
||||
Logger::instance().log("SERVER: Client " + login + " disconnected");
|
||||
|
||||
serverLmsWidget->slotUpdateListClients();
|
||||
serverLmsWidget->slot_UpdateListClients();
|
||||
serverLmsWidget->getProcessingSystem()->processingClientDeAutorization(login);
|
||||
}
|
||||
|
||||
void MultiThreadServer::removeClient(int idSocket)
|
||||
{
|
||||
clientsMap->remove(idSocket);
|
||||
serverLmsWidget->slotUpdateListClients();
|
||||
serverLmsWidget->slot_UpdateListClients();
|
||||
}
|
||||
|
||||
void MultiThreadServer::addClient(qintptr descriptor, ClientHandler *client)
|
||||
{
|
||||
(*clientsMap)[descriptor] = client;
|
||||
serverLmsWidget->slotUpdateListClients();
|
||||
serverLmsWidget->slot_UpdateListClients();
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ ProviderDBLMS::~ProviderDBLMS()
|
||||
DisConnectionFromDB();
|
||||
}
|
||||
|
||||
void ProviderDBLMS::ConnectionToDB()
|
||||
bool ProviderDBLMS::ConnectionToDB()
|
||||
{
|
||||
mtxAccess.lock();
|
||||
if(! dbLMS->DBisConnected())
|
||||
@@ -24,9 +24,18 @@ void ProviderDBLMS::ConnectionToDB()
|
||||
if(dbLMS->connectionToDB())
|
||||
{
|
||||
Q_EMIT signal_BlockAutorization(false);
|
||||
|
||||
mtxAccess.unlock();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
mtxAccess.unlock();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
mtxAccess.unlock();
|
||||
return true;
|
||||
}
|
||||
|
||||
void ProviderDBLMS::DisConnectionFromDB()
|
||||
@@ -41,6 +50,15 @@ void ProviderDBLMS::DisConnectionFromDB()
|
||||
mtxAccess.unlock();
|
||||
}
|
||||
|
||||
bool ProviderDBLMS::DBisConnected()
|
||||
{
|
||||
bool res = false;
|
||||
mtxAccess.lock();
|
||||
res = dbLMS->DBisConnected();
|
||||
mtxAccess.unlock();
|
||||
return res;
|
||||
}
|
||||
|
||||
DataBaseSettings ProviderDBLMS::getDBSettings()
|
||||
{
|
||||
return dbLMS->getDataBaseSettings();
|
||||
|
||||
@@ -75,8 +75,9 @@ Q_SIGNALS:
|
||||
void signal_BlockAutorization(bool block);
|
||||
|
||||
public:
|
||||
void ConnectionToDB();
|
||||
bool ConnectionToDB();
|
||||
void DisConnectionFromDB();
|
||||
bool DBisConnected();
|
||||
DataBaseSettings getDBSettings();
|
||||
|
||||
private:
|
||||
|
||||
@@ -29,7 +29,8 @@ ServerLMSWidget::ServerLMSWidget(QWidget *parent) :
|
||||
providerDBLMS(nullptr),
|
||||
first (true),
|
||||
language(languageENG),
|
||||
errorCode(0)
|
||||
errorCode(0),
|
||||
flStartInitialization(false)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
@@ -41,96 +42,68 @@ ServerLMSWidget::ServerLMSWidget(QWidget *parent) :
|
||||
|
||||
setLanguageInterfase();
|
||||
|
||||
mutex = new QMutex;
|
||||
startInitialization();
|
||||
|
||||
ui->btnStopServer->setEnabled(false);
|
||||
ui->btnStartServer->setEnabled(true);
|
||||
|
||||
updateThread = new QThread;
|
||||
loggerThread = new QThread;
|
||||
|
||||
providerDBLMS = new ProviderDBLMS(this);
|
||||
providerDBLMS->ConnectionToDB();
|
||||
providerDBLMS->deAuthorizationAll();
|
||||
|
||||
//Настройки БД
|
||||
DataBaseSettings dbSettings = providerDBLMS->getDBSettings();
|
||||
QString strDBsettings = QString("%1 (%2) %3 : %4").arg(dbSettings.dbName,
|
||||
dbSettings.dbType,
|
||||
dbSettings.dbHostName,
|
||||
QString::number(dbSettings.dbPort));
|
||||
ui->lblDBsettings->setText(strDBsettings);
|
||||
|
||||
chatSystem = new ChatSystem();
|
||||
|
||||
connect(providerDBLMS, &ProviderDBLMS::signal_BlockAutorization, this, &ServerLMSWidget::slot_BlockAutorization);
|
||||
|
||||
assetsManager = new AssetsManager;
|
||||
assetsManager->moveToThread(updateThread);
|
||||
|
||||
updateController = new UpdateController;
|
||||
updateController->moveToThread(updateThread);
|
||||
|
||||
processingSystem = new ProcessingSystem(providerDBLMS, updateController);
|
||||
//processingSystem->moveToThread(updateThread);
|
||||
|
||||
dataParser = new DataParser(assetsManager,processingSystem);
|
||||
|
||||
commonClientHandler = new CommonClientHandler;
|
||||
server = new MultiThreadServer(this,updateController,processingSystem,dataParser,6000);
|
||||
|
||||
loggerThread->start();
|
||||
updateThread->start();
|
||||
|
||||
commonClientHandler->initialize(server->getClientsMap(),processingSystem,dataParser);
|
||||
processingSystem->initialize(server,dataParser,commonClientHandler,updateController,chatSystem);
|
||||
chatSystem->initialize(commonClientHandler,dataParser,server->getClientsMap());
|
||||
|
||||
Logger::instance().moveToThread(loggerThread);
|
||||
Logger::instance().setLoggingType(LoggingType::WIDGET);
|
||||
Logger::instance().setLogToFile(true);
|
||||
|
||||
connect(this,&ServerLMSWidget::sigUpdateController,updateController,&UpdateController::initialize,Qt::DirectConnection);
|
||||
connect(this,&ServerLMSWidget::sigCalculateFullHash,updateController,&UpdateController::calculateFullHash,Qt::AutoConnection);
|
||||
connect(updateController,&UpdateController::sigErrorRequired,this,&ServerLMSWidget::setError);
|
||||
connect(&Logger::instance(),&Logger::sigLogToWidget,this, &ServerLMSWidget::addToLog,Qt::QueuedConnection);
|
||||
|
||||
emit sigUpdateController(commonClientHandler,dataParser,assetsManager);
|
||||
on_btnStartServer_clicked();
|
||||
tryConnectionToDB();
|
||||
}
|
||||
|
||||
ServerLMSWidget::~ServerLMSWidget()
|
||||
{
|
||||
server->stopServer();
|
||||
updateThread->exit();
|
||||
loggerThread->exit();
|
||||
if(flStartInitialization)
|
||||
{
|
||||
server->stopServer();
|
||||
|
||||
//updateThread->exit();
|
||||
updateThread->quit();
|
||||
updateThread->wait();
|
||||
delete updateThread;
|
||||
|
||||
delete server;
|
||||
delete commonClientHandler;
|
||||
delete dataParser;
|
||||
delete processingSystem;
|
||||
delete updateController;
|
||||
delete assetsManager;
|
||||
delete chatSystem;
|
||||
|
||||
delete mutex;
|
||||
|
||||
//loggerThread->exit();
|
||||
loggerThread->quit();
|
||||
loggerThread->wait();
|
||||
delete loggerThread;
|
||||
}
|
||||
|
||||
delete server;
|
||||
delete commonClientHandler;
|
||||
delete dataParser;
|
||||
delete processingSystem;
|
||||
delete updateController;
|
||||
delete assetsManager;
|
||||
delete chatSystem;
|
||||
delete providerDBLMS;
|
||||
delete loggerThread;
|
||||
delete updateThread;
|
||||
delete mutex;
|
||||
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void ServerLMSWidget::setError(int code)
|
||||
void ServerLMSWidget::changeEvent(QEvent *event)
|
||||
{
|
||||
errorCode = code;
|
||||
// В случае получения события изменения языка приложения
|
||||
if (event->type() == QEvent::LanguageChange)
|
||||
{
|
||||
ui->retranslateUi(this); // переведём окно заново
|
||||
|
||||
if(providerDBLMS->DBisConnected())
|
||||
{
|
||||
//Настройки БД
|
||||
DataBaseSettings dbSettings = providerDBLMS->getDBSettings();
|
||||
QString strDBsettings = QString("%1 (%2) %3 : %4").arg(dbSettings.dbName,
|
||||
dbSettings.dbType,
|
||||
dbSettings.dbHostName,
|
||||
QString::number(dbSettings.dbPort));
|
||||
ui->lblDBsettings->setText(strDBsettings);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->lblDBsettings->setText("");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QString ServerLMSWidget::getLanguage()
|
||||
{
|
||||
return language;
|
||||
}
|
||||
|
||||
void ServerLMSWidget::slotUpdateListClients()
|
||||
void ServerLMSWidget::slot_UpdateListClients()
|
||||
{
|
||||
//Очищаем список
|
||||
ui->listWidget_Clients->clear();
|
||||
@@ -148,7 +121,7 @@ void ServerLMSWidget::slotUpdateListClients()
|
||||
Logger::instance().log("SERVER: countClients = " + QString::number(countClients));
|
||||
}
|
||||
|
||||
void ServerLMSWidget::addToLog(QString message)
|
||||
void ServerLMSWidget::slot_AddMessageToLog(QString message)
|
||||
{
|
||||
ui->loggerTextField->appendPlainText(message);
|
||||
}
|
||||
@@ -185,6 +158,7 @@ void ServerLMSWidget::on_btnStartServer_clicked()
|
||||
ui->btnStartServer->setEnabled(false);
|
||||
ui->btnStopServer->setEnabled(true);
|
||||
ui->lblOnOff->setPixmap(QPixmap(QStringLiteral(":/resources/icons/switchOn.png")));
|
||||
slot_BlockAutorization(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -195,29 +169,7 @@ void ServerLMSWidget::on_btnStopServer_clicked()
|
||||
ui->btnStopServer->setEnabled(false);
|
||||
ui->btnStartServer->setEnabled(true);
|
||||
ui->lblOnOff->setPixmap(QPixmap(QStringLiteral(":/resources/icons/switchOff.png")));
|
||||
slot_BlockAutorization(false);
|
||||
}
|
||||
}
|
||||
|
||||
QMutex *ServerLMSWidget::getMutex() const
|
||||
{
|
||||
return mutex;
|
||||
}
|
||||
|
||||
void ServerLMSWidget::changeEvent(QEvent *event)
|
||||
{
|
||||
// В случае получения события изменения языка приложения
|
||||
if (event->type() == QEvent::LanguageChange)
|
||||
{
|
||||
ui->retranslateUi(this); // переведём окно заново
|
||||
|
||||
//Настройки БД
|
||||
DataBaseSettings dbSettings = providerDBLMS->getDBSettings();
|
||||
QString strDBsettings = QString("%1 (%2) %3 : %4").arg(dbSettings.dbName,
|
||||
dbSettings.dbType,
|
||||
dbSettings.dbHostName,
|
||||
QString::number(dbSettings.dbPort));
|
||||
ui->lblDBsettings->setText(strDBsettings);
|
||||
slot_BlockAutorization(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -236,20 +188,19 @@ void ServerLMSWidget::on_btnSettings_clicked()
|
||||
{
|
||||
language = dlg.getSettings().Language;
|
||||
|
||||
if(dlg.settingsServerIsChanged())
|
||||
{//TODO Здесь нужно переподключать БД
|
||||
|
||||
//SpecialMessageBox(this, SpecialMessageBox::TypeSpecMsgBox::warningClose, tr("Server settings have been changed. Please reconnect to the server.")).exec();
|
||||
if(dlg.settingsDBisChanged())
|
||||
{
|
||||
on_btnStopServer_clicked();
|
||||
|
||||
providerDBLMS->deAuthorizationAll();
|
||||
|
||||
on_btnStopServer_clicked();
|
||||
|
||||
providerDBLMS->DisConnectionFromDB();
|
||||
|
||||
providerDBLMS->ConnectionToDB();
|
||||
ui->lblDBsettings->setText("");
|
||||
|
||||
//on_btnStartServer_clicked();
|
||||
QMessageBox::warning(this, tr("Warning!"), tr("Database settings have been changed.\nThe server will be restarted."));
|
||||
|
||||
tryConnectionToDB();
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -308,3 +259,78 @@ QString ServerLMSWidget::loadStyleSheet()
|
||||
return style;
|
||||
}
|
||||
}
|
||||
|
||||
void ServerLMSWidget::startInitialization()
|
||||
{
|
||||
providerDBLMS = new ProviderDBLMS(this);
|
||||
connect(providerDBLMS, &ProviderDBLMS::signal_BlockAutorization, this, &ServerLMSWidget::slot_BlockAutorization);
|
||||
|
||||
mutex = new QMutex;
|
||||
|
||||
updateThread = new QThread;
|
||||
loggerThread = new QThread;
|
||||
|
||||
chatSystem = new ChatSystem();
|
||||
|
||||
assetsManager = new AssetsManager;
|
||||
assetsManager->moveToThread(updateThread);
|
||||
|
||||
updateController = new UpdateController;
|
||||
updateController->moveToThread(updateThread);
|
||||
|
||||
processingSystem = new ProcessingSystem(providerDBLMS, updateController);
|
||||
//processingSystem->moveToThread(updateThread);
|
||||
|
||||
dataParser = new DataParser(assetsManager,processingSystem);
|
||||
|
||||
commonClientHandler = new CommonClientHandler;
|
||||
server = new MultiThreadServer(this,updateController,processingSystem,dataParser,6000);
|
||||
|
||||
loggerThread->start();
|
||||
updateThread->start();
|
||||
|
||||
commonClientHandler->initialize(server->getClientsMap(),processingSystem,dataParser);
|
||||
processingSystem->initialize(server,dataParser,commonClientHandler,updateController,chatSystem);
|
||||
chatSystem->initialize(commonClientHandler,dataParser,server->getClientsMap());
|
||||
|
||||
Logger::instance().moveToThread(loggerThread);
|
||||
Logger::instance().setLoggingType(LoggingType::WIDGET);
|
||||
Logger::instance().setLogToFile(true);
|
||||
|
||||
connect(this,&ServerLMSWidget::sigUpdateController,updateController,&UpdateController::initialize,Qt::DirectConnection);
|
||||
connect(this,&ServerLMSWidget::sigCalculateFullHash,updateController,&UpdateController::calculateFullHash,Qt::AutoConnection);
|
||||
connect(updateController,&UpdateController::sigErrorRequired,this,&ServerLMSWidget::setError);
|
||||
connect(&Logger::instance(),&Logger::sigLogToWidget,this, &ServerLMSWidget::slot_AddMessageToLog,Qt::QueuedConnection);
|
||||
|
||||
emit sigUpdateController(commonClientHandler,dataParser,assetsManager);
|
||||
|
||||
ui->btnStopServer->setEnabled(false);
|
||||
ui->btnStartServer->setEnabled(true);
|
||||
|
||||
flStartInitialization = true;
|
||||
}
|
||||
|
||||
void ServerLMSWidget::tryConnectionToDB()
|
||||
{
|
||||
if(! providerDBLMS->ConnectionToDB())
|
||||
{
|
||||
ui->lblDBsettings->setText("");
|
||||
ui->btnStopServer->setEnabled(false);
|
||||
ui->btnStartServer->setEnabled(false);
|
||||
QMessageBox::critical(this, tr("Error!"), tr("Database connection error"));
|
||||
}
|
||||
else
|
||||
{
|
||||
providerDBLMS->deAuthorizationAll();
|
||||
|
||||
//Настройки БД
|
||||
DataBaseSettings dbSettings = providerDBLMS->getDBSettings();
|
||||
QString strDBsettings = QString("%1 (%2) %3 : %4").arg(dbSettings.dbName,
|
||||
dbSettings.dbType,
|
||||
dbSettings.dbHostName,
|
||||
QString::number(dbSettings.dbPort));
|
||||
ui->lblDBsettings->setText(strDBsettings);
|
||||
|
||||
on_btnStartServer_clicked();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,34 +53,36 @@ public:
|
||||
static const QString languageENG;
|
||||
static const QString languageRUS;
|
||||
|
||||
public:
|
||||
QString getLanguage();
|
||||
|
||||
void setError(int code);
|
||||
|
||||
protected:
|
||||
// Метод получения событий
|
||||
// В нём будет производиться проверка события смены перевода приложения
|
||||
void changeEvent(QEvent * event) override;
|
||||
|
||||
signals:
|
||||
void sigRecognize();
|
||||
void sigCalculateFullHash();
|
||||
void sigUpdateController(CommonClientHandler* commonClientHandler,DataParser *dataParser,AssetsManager *assetManager);
|
||||
|
||||
QTcpSocket* sigGetSocket();
|
||||
|
||||
//сигнал смены языка
|
||||
void signal_LanguageChanged(QString language);
|
||||
|
||||
void sigRecognize();
|
||||
void sigCalculateFullHash();
|
||||
void sigUpdateController(CommonClientHandler* commonClientHandler,DataParser *dataParser,AssetsManager *assetManager);
|
||||
QTcpSocket* sigGetSocket();
|
||||
|
||||
public slots:
|
||||
void slot_LanguageChanged(QString language);
|
||||
void slotUpdateListClients();
|
||||
void slot_UpdateListClients();
|
||||
void slot_BlockAutorization(bool block);
|
||||
void addToLog(QString message);
|
||||
void slot_AddMessageToLog(QString message);
|
||||
|
||||
public:
|
||||
void removeClient(int socketId);
|
||||
QString getLanguage()
|
||||
{
|
||||
return language;
|
||||
}
|
||||
|
||||
void setError(int code)
|
||||
{
|
||||
errorCode = code;
|
||||
}
|
||||
|
||||
int hasError() const
|
||||
{
|
||||
@@ -92,7 +94,12 @@ public:
|
||||
return processingSystem;
|
||||
}
|
||||
|
||||
QMutex *getMutex() const;
|
||||
QMutex *getMutex() const
|
||||
{
|
||||
return mutex;
|
||||
}
|
||||
|
||||
void removeClient(int socketId);
|
||||
|
||||
private slots:
|
||||
void on_btnStartServer_clicked();
|
||||
@@ -101,11 +108,13 @@ private slots:
|
||||
|
||||
private:
|
||||
void setLanguageInterfase();
|
||||
|
||||
private:
|
||||
void updateMyStyleSheet();
|
||||
QString loadStyleSheet();
|
||||
|
||||
void startInitialization();
|
||||
|
||||
void tryConnectionToDB();
|
||||
|
||||
private:
|
||||
Ui::ServerLMSWidget *ui;
|
||||
|
||||
@@ -129,6 +138,8 @@ private:
|
||||
QTranslator qtLanguageTranslator;
|
||||
QString language;
|
||||
int errorCode;
|
||||
|
||||
bool flStartInitialization;
|
||||
};
|
||||
|
||||
#endif // SERVERLMSWIDGET_H
|
||||
|
||||
Binary file not shown.
@@ -9,6 +9,59 @@
|
||||
<translation>ООО Константа-Дизайн</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DialogSettingsTray</name>
|
||||
<message>
|
||||
<location filename="../dialogsettingstray.ui" line="14"/>
|
||||
<source>Settings</source>
|
||||
<translation>Настройки</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogsettingstray.ui" line="22"/>
|
||||
<source>Main</source>
|
||||
<translation>Основные</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogsettingstray.ui" line="32"/>
|
||||
<source>Language</source>
|
||||
<translation>Язык</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogsettingstray.ui" line="57"/>
|
||||
<source>Data Base</source>
|
||||
<translation>База Данных</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogsettingstray.ui" line="67"/>
|
||||
<source>DB name</source>
|
||||
<translation>Имя БД</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogsettingstray.ui" line="91"/>
|
||||
<source>Host name</source>
|
||||
<translation>Хост</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogsettingstray.ui" line="115"/>
|
||||
<source>Port</source>
|
||||
<translation>Порт</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogsettingstray.ui" line="139"/>
|
||||
<source>User name</source>
|
||||
<translation>Имя пользователя</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogsettingstray.ui" line="163"/>
|
||||
<source>Password</source>
|
||||
<translation>Пароль</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogsettingstray.ui" line="211"/>
|
||||
<source>Save</source>
|
||||
<translation>Сохранить</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ServerLMSWidget</name>
|
||||
<message>
|
||||
@@ -17,30 +70,35 @@
|
||||
<translation>Форма</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../serverlmswidget.ui" line="238"/>
|
||||
<source>Block Authorization</source>
|
||||
<translation>Блокировка авторизации</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../serverlmswidget.ui" line="181"/>
|
||||
<location filename="../serverlmswidget.ui" line="207"/>
|
||||
<source>Logger</source>
|
||||
<translation>Логгер</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../serverlmswidget.ui" line="146"/>
|
||||
<location filename="../serverlmswidget.ui" line="172"/>
|
||||
<source>Clients</source>
|
||||
<translation>Клиенты</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../serverlmswidget.ui" line="209"/>
|
||||
<location filename="../serverlmswidget.ui" line="150"/>
|
||||
<source>Settings</source>
|
||||
<translation>Настройки</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../serverlmswidget.ui" line="235"/>
|
||||
<source>Data base: </source>
|
||||
<translation>База данных: </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../serverlmswidget.ui" line="216"/>
|
||||
<location filename="../serverlmswidget.ui" line="242"/>
|
||||
<source>...</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../serverlmswidget.ui" line="264"/>
|
||||
<source>Authorization</source>
|
||||
<translation>Авторизация</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../serverlmswidget.ui" line="51"/>
|
||||
<source>Start</source>
|
||||
@@ -51,5 +109,33 @@
|
||||
<source>Stop</source>
|
||||
<translation>Остановить</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../serverlmswidget.cpp" line="201"/>
|
||||
<location filename="../serverlmswidget.cpp" line="250"/>
|
||||
<source>Warning!</source>
|
||||
<translation>Внимание!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../serverlmswidget.cpp" line="201"/>
|
||||
<source>Database settings have been changed.
|
||||
The server will be restarted.</source>
|
||||
<translation>Настройки Базы Данных были изменены.
|
||||
Сервер будет перезапущен.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../serverlmswidget.cpp" line="250"/>
|
||||
<source>The file could not be opened </source>
|
||||
<translation>Файл не может быть открыт </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../serverlmswidget.cpp" line="320"/>
|
||||
<source>Error!</source>
|
||||
<translation>Ошибка!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../serverlmswidget.cpp" line="320"/>
|
||||
<source>Database connection error</source>
|
||||
<translation>Ошибка подключения к Базе Данных</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
||||
@@ -131,6 +131,7 @@ void MainWindow::changeEvent(QEvent *event)
|
||||
{// переведём окно заново
|
||||
ui->retranslateUi(this);
|
||||
|
||||
trayIcon->setToolTip(tr("Server LMS"));
|
||||
action_ShowWindow->setText(tr("Expand window"));
|
||||
action_HideWindow->setText(tr("Minimize window"));
|
||||
action_Exit->setText(tr("Exit"));
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 8.9 KiB |
BIN
TrayServerLMS/resources/IcoServerRRJ_2.ico
Normal file
BIN
TrayServerLMS/resources/IcoServerRRJ_2.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
BIN
TrayServerLMS/resources/IcoServerRRJ_old.ico
Normal file
BIN
TrayServerLMS/resources/IcoServerRRJ_old.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 66 KiB |
Reference in New Issue
Block a user