mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-27 19:45:43 +03:00
Прокинул сигнал ошибки SQL на виджет
This commit is contained in:
@@ -94,7 +94,7 @@ DataBaseSettings DataBaseLMS::getDataBaseSettings()
|
||||
QFile file("config/settings.xml");
|
||||
if(!file.open(QIODevice::ReadOnly))
|
||||
{
|
||||
QMessageBox::critical(ownerWidget, tr("Attention!"), tr("The file could not be opened:") + "config/settings.xml");
|
||||
//QMessageBox::critical(ownerWidget, tr("Attention!"), tr("The file could not be opened:") + "config/settings.xml");
|
||||
return settings;
|
||||
}
|
||||
QXmlStreamReader xmlReader(&file);
|
||||
@@ -234,8 +234,18 @@ void DataBaseLMS::messageWarningErrorQuery(QString queryStr, QSqlQuery* query)
|
||||
|
||||
|
||||
//Сообщение об ошибке
|
||||
QMessageBox::warning(ownerWidget, dbSettings.dbName,
|
||||
/*
|
||||
QWidget* owner = ownerWidget;
|
||||
QMessageBox::critical(ownerWidget, tr("Error PostgreSQL!"),
|
||||
//dbSettings.dbName
|
||||
"Error query:\n" + query->lastError().text() + "\n" +
|
||||
"String of query:\n" + queryStr + "\n" +
|
||||
"Executed query:\n" + query->executedQuery());
|
||||
*/
|
||||
|
||||
QString textError = "";
|
||||
textError = "Error query:\n" + query->lastError().text() + "\n" +
|
||||
"String of query:\n" + queryStr + "\n" +
|
||||
"Executed query:\n" + query->executedQuery();
|
||||
emit signal_ErrorPostgreSQL(textError);
|
||||
}
|
||||
|
||||
@@ -35,6 +35,9 @@ public:
|
||||
public Q_SLOTS:
|
||||
void slot_LanguageChanged(QString language);
|
||||
|
||||
signals:
|
||||
void signal_ErrorPostgreSQL(QString text);
|
||||
|
||||
public:
|
||||
static const QString TypeUserDBInstructor;
|
||||
static const QString TypeUserDBTrainee;
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
<context>
|
||||
<name>DataBaseLMS</name>
|
||||
<message>
|
||||
<location filename="../databaselms.cpp" line="95"/>
|
||||
<location filename="../databaselms.cpp" line="97"/>
|
||||
<source>Attention!</source>
|
||||
<translation>Внимание!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../databaselms.cpp" line="95"/>
|
||||
<location filename="../databaselms.cpp" line="97"/>
|
||||
<source>The file could not be opened:</source>
|
||||
<translation>Файл не может быть открыт:</translation>
|
||||
</message>
|
||||
|
||||
@@ -222,31 +222,31 @@ The status will be set:
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DialogAuthorizationInstructor</name>
|
||||
<name>DialogAuthorization</name>
|
||||
<message>
|
||||
<location filename="../instructors/dialogauthorizationinstructor.ui" line="20"/>
|
||||
<location filename="../authorization/dialogauthorization.ui" line="20"/>
|
||||
<source>Instructor authorization</source>
|
||||
<translation>Авторизация инструктора</translation>
|
||||
<translation type="unfinished">Авторизация инструктора</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../instructors/dialogauthorizationinstructor.ui" line="41"/>
|
||||
<location filename="../authorization/dialogauthorization.ui" line="41"/>
|
||||
<source>Login</source>
|
||||
<translation>Логин</translation>
|
||||
<translation type="unfinished">Логин</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../instructors/dialogauthorizationinstructor.ui" line="90"/>
|
||||
<source>...</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../instructors/dialogauthorizationinstructor.ui" line="128"/>
|
||||
<source>Log in</source>
|
||||
<translation>Войти</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../instructors/dialogauthorizationinstructor.ui" line="53"/>
|
||||
<location filename="../authorization/dialogauthorization.ui" line="53"/>
|
||||
<source>Password</source>
|
||||
<translation>Пароль</translation>
|
||||
<translation type="unfinished">Пароль</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../authorization/dialogauthorization.ui" line="90"/>
|
||||
<source>...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../authorization/dialogauthorization.ui" line="128"/>
|
||||
<source>Log in</source>
|
||||
<translation type="unfinished">Войти</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -423,42 +423,42 @@ The status will be set:
|
||||
<translation>Язык</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogsettings.ui" line="88"/>
|
||||
<location filename="../dialogsettings.ui" line="98"/>
|
||||
<source>Server</source>
|
||||
<translation>Сервер</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogsettings.ui" line="98"/>
|
||||
<location filename="../dialogsettings.ui" line="108"/>
|
||||
<source>Address</source>
|
||||
<translation>Адрес</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogsettings.ui" line="135"/>
|
||||
<location filename="../dialogsettings.ui" line="145"/>
|
||||
<source>Port</source>
|
||||
<translation>Порт</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogsettings.ui" line="181"/>
|
||||
<location filename="../dialogsettings.ui" line="191"/>
|
||||
<source>Auto start</source>
|
||||
<translation>Авто старт</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogsettings.ui" line="232"/>
|
||||
<location filename="../dialogsettings.ui" line="242"/>
|
||||
<source>Save</source>
|
||||
<translation>Сохранить</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogsettings.ui" line="271"/>
|
||||
<location filename="../dialogsettings.ui" line="281"/>
|
||||
<source>Additional</source>
|
||||
<translation>Расширенные</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogsettings.ui" line="291"/>
|
||||
<location filename="../dialogsettings.ui" line="301"/>
|
||||
<source>Version</source>
|
||||
<translation>Версия</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogsettings.ui" line="323"/>
|
||||
<location filename="../dialogsettings.ui" line="333"/>
|
||||
<source>Style</source>
|
||||
<translation>Стиль</translation>
|
||||
</message>
|
||||
@@ -796,7 +796,7 @@ Delete it anyway?</source>
|
||||
<message>
|
||||
<location filename="../instructorsandtraineeswidget.ui" line="343"/>
|
||||
<location filename="../instructorsandtraineeswidget.ui" line="417"/>
|
||||
<location filename="../instructorsandtraineeswidget.cpp" line="402"/>
|
||||
<location filename="../instructorsandtraineeswidget.cpp" line="406"/>
|
||||
<source>none</source>
|
||||
<translation>нет</translation>
|
||||
</message>
|
||||
@@ -826,17 +826,17 @@ Delete it anyway?</source>
|
||||
<translation>Сервер недоступен!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../instructorsandtraineeswidget.cpp" line="415"/>
|
||||
<location filename="../instructorsandtraineeswidget.cpp" line="419"/>
|
||||
<source>connected</source>
|
||||
<translation>подключен</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../instructorsandtraineeswidget.cpp" line="418"/>
|
||||
<location filename="../instructorsandtraineeswidget.cpp" line="422"/>
|
||||
<source>not connected</source>
|
||||
<translation>не подключен</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../instructorsandtraineeswidget.cpp" line="459"/>
|
||||
<location filename="../instructorsandtraineeswidget.cpp" line="463"/>
|
||||
<source>Server settings have been changed. Please reconnect to the server.</source>
|
||||
<translation>Настройки сервера изменены. Выполните переподключение к серверу.</translation>
|
||||
</message>
|
||||
|
||||
@@ -64,11 +64,26 @@ DialogSettingsTray::DialogSettingsTray(ProviderDBLMS* providerDBLMS, QWidget *pa
|
||||
ui->editPort->setText(settings->Port);
|
||||
ui->editUserName->setText(settings->UserName);
|
||||
ui->editPassword->setText(settings->Password);
|
||||
}
|
||||
|
||||
ui->btnSave->setEnabled(false);
|
||||
ui->btnCheckDB->setEnabled(true);
|
||||
flSettingsServerChanged = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->checkLocalhost->setChecked(true);
|
||||
//ui->editHostName->setEnabled(true);
|
||||
ui->editPort->setEnabled(true);
|
||||
ui->editNameDB->setEnabled(true);
|
||||
ui->editUserName->setEnabled(true);
|
||||
ui->editPassword->setEnabled(true);
|
||||
|
||||
ui->btnSave->setEnabled(false);
|
||||
|
||||
ui->btnSave->setEnabled(false);
|
||||
ui->btnCheckDB->setEnabled(false);
|
||||
flSettingsServerChanged = false;
|
||||
}
|
||||
}
|
||||
|
||||
DialogSettingsTray::~DialogSettingsTray()
|
||||
|
||||
@@ -9,6 +9,7 @@ ProviderDBLMS::ProviderDBLMS(QWidget *parentWidget, QObject *parent) :
|
||||
parentWidget(parentWidget)
|
||||
{
|
||||
dbLMS = new InterfaceDataBaseLMS(parentWidget);
|
||||
connect(dbLMS, &InterfaceDataBaseLMS::signal_ErrorPostgreSQL, this, &ProviderDBLMS::signal_ErrorPostgreSQL);
|
||||
}
|
||||
|
||||
ProviderDBLMS::~ProviderDBLMS()
|
||||
|
||||
@@ -73,6 +73,8 @@ public:
|
||||
Q_SIGNALS:
|
||||
//сигнал о блокировке авторизации
|
||||
void signal_BlockAutorization(bool block);
|
||||
signals:
|
||||
void signal_ErrorPostgreSQL(QString text);
|
||||
|
||||
public:
|
||||
bool ConnectionToDB();
|
||||
|
||||
@@ -107,6 +107,12 @@ void ServerLMSWidget::slot_AddMessageToLog(QString message)
|
||||
ui->loggerTextField->appendPlainText(message);
|
||||
}
|
||||
|
||||
void ServerLMSWidget::slot_ErrorPostgreSQL(QString text)
|
||||
{
|
||||
emit signal_Menu_ShowWindow();
|
||||
QMessageBox::critical(this, tr("Error PostgreSQL!"),text);
|
||||
}
|
||||
|
||||
void ServerLMSWidget::start()
|
||||
{
|
||||
startInitialization();
|
||||
@@ -170,6 +176,13 @@ void ServerLMSWidget::on_btnStopServer_clicked()
|
||||
|
||||
void ServerLMSWidget::on_btnSettings_clicked()
|
||||
{
|
||||
ServerDBSettings settingsTemp;
|
||||
if(!DialogSettingsTray::loadSettings(&settingsTemp))
|
||||
{
|
||||
QMessageBox::critical(this, tr("Error!"), tr("Settings file could not be opened:") + "'config/settings.xml'");
|
||||
return;
|
||||
}
|
||||
|
||||
DialogSettingsTray dlg(providerDBLMS, this);
|
||||
dlg.setWindowFlags(dlg.windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||
|
||||
@@ -258,6 +271,7 @@ QString ServerLMSWidget::loadStyleSheet()
|
||||
void ServerLMSWidget::startInitialization()
|
||||
{
|
||||
providerDBLMS = new ProviderDBLMS(this);
|
||||
connect(providerDBLMS, &ProviderDBLMS::signal_ErrorPostgreSQL, this, &ServerLMSWidget::slot_ErrorPostgreSQL);
|
||||
connect(providerDBLMS, &ProviderDBLMS::signal_BlockAutorization, this, &ServerLMSWidget::slot_BlockAutorization);
|
||||
|
||||
mutex = new QMutex;
|
||||
|
||||
@@ -82,6 +82,8 @@ public slots:
|
||||
void slot_BlockAutorization(bool block);
|
||||
void slot_AddMessageToLog(QString message);
|
||||
|
||||
void slot_ErrorPostgreSQL(QString text);
|
||||
|
||||
public:
|
||||
QString getLanguage()
|
||||
{
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<name>DialogCheckDB</name>
|
||||
<message>
|
||||
<location filename="../dialogcheckdb.ui" line="14"/>
|
||||
<location filename="../dialogcheckdb.ui" line="152"/>
|
||||
<location filename="../dialogcheckdb.ui" line="178"/>
|
||||
<source>Database</source>
|
||||
<translation>База данных</translation>
|
||||
</message>
|
||||
@@ -24,67 +24,72 @@
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogcheckdb.ui" line="43"/>
|
||||
<location filename="../dialogcheckdb.ui" line="101"/>
|
||||
<location filename="../dialogcheckdb.ui" line="159"/>
|
||||
<location filename="../dialogcheckdb.ui" line="204"/>
|
||||
<location filename="../dialogcheckdb.ui" line="114"/>
|
||||
<location filename="../dialogcheckdb.ui" line="185"/>
|
||||
<source>...</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogcheckdb.ui" line="94"/>
|
||||
<location filename="../dialogcheckdb.ui" line="107"/>
|
||||
<source>User</source>
|
||||
<translation>Пользователь</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogcheckdb.ui" line="217"/>
|
||||
<location filename="../dialogcheckdb.ui" line="259"/>
|
||||
<source>Repare</source>
|
||||
<translation>Восстановить</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogcheckdb.cpp" line="35"/>
|
||||
<location filename="../dialogcheckdb.cpp" line="38"/>
|
||||
<source>Installed</source>
|
||||
<translation>Установлен</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogcheckdb.cpp" line="40"/>
|
||||
<location filename="../dialogcheckdb.cpp" line="43"/>
|
||||
<source>Not installed</source>
|
||||
<translation>Не установлен</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogcheckdb.cpp" line="47"/>
|
||||
<location filename="../dialogcheckdb.cpp" line="59"/>
|
||||
<location filename="../dialogcheckdb.cpp" line="50"/>
|
||||
<location filename="../dialogcheckdb.cpp" line="62"/>
|
||||
<source>Exist</source>
|
||||
<translation>Существует</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogcheckdb.cpp" line="52"/>
|
||||
<location filename="../dialogcheckdb.cpp" line="64"/>
|
||||
<location filename="../dialogcheckdb.cpp" line="55"/>
|
||||
<location filename="../dialogcheckdb.cpp" line="67"/>
|
||||
<source>Not exist</source>
|
||||
<translation>Не существует</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogcheckdb.cpp" line="78"/>
|
||||
<source>Warning!</source>
|
||||
<translation>Внимание!</translation>
|
||||
<location filename="../dialogcheckdb.cpp" line="114"/>
|
||||
<source>Completed!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogcheckdb.cpp" line="78"/>
|
||||
<location filename="../dialogcheckdb.cpp" line="114"/>
|
||||
<source>The database has been successfully restored!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogcheckdb.cpp" line="83"/>
|
||||
<source>Install PostgreSQL.</source>
|
||||
<translation>Установите PostgreSQL.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogcheckdb.cpp" line="86"/>
|
||||
<location filename="../dialogcheckdb.cpp" line="95"/>
|
||||
<location filename="../dialogcheckdb.cpp" line="83"/>
|
||||
<location filename="../dialogcheckdb.cpp" line="93"/>
|
||||
<location filename="../dialogcheckdb.cpp" line="104"/>
|
||||
<source>Error!</source>
|
||||
<translation>Ошибка!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogcheckdb.cpp" line="86"/>
|
||||
<location filename="../dialogcheckdb.cpp" line="93"/>
|
||||
<source>Failed to create user!</source>
|
||||
<translation>Ошибка создания пользователя!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogcheckdb.cpp" line="95"/>
|
||||
<location filename="../dialogcheckdb.cpp" line="104"/>
|
||||
<source>Failed to create Database!</source>
|
||||
<translation>Ошибка создания Базы данных!</translation>
|
||||
</message>
|
||||
@@ -106,46 +111,101 @@
|
||||
<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>
|
||||
<source>Database</source>
|
||||
<translation type="unfinished">База данных</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogsettingstray.ui" line="91"/>
|
||||
<location filename="../dialogsettingstray.ui" line="77"/>
|
||||
<source>Host name</source>
|
||||
<translation>Хост</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogsettingstray.ui" line="115"/>
|
||||
<location filename="../dialogsettingstray.ui" line="97"/>
|
||||
<source>Localhost</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogsettingstray.ui" line="121"/>
|
||||
<source>Port</source>
|
||||
<translation>Порт</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogsettingstray.ui" line="139"/>
|
||||
<location filename="../dialogsettingstray.ui" line="145"/>
|
||||
<source>Database name</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogsettingstray.ui" line="172"/>
|
||||
<source>User name</source>
|
||||
<translation>Имя пользователя</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogsettingstray.ui" line="163"/>
|
||||
<source>Password</source>
|
||||
<translation>Пароль</translation>
|
||||
<location filename="../dialogsettingstray.ui" line="199"/>
|
||||
<source>User password</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogsettingstray.ui" line="193"/>
|
||||
<source>Check DB</source>
|
||||
<translation>Проверить БД</translation>
|
||||
<location filename="../dialogsettingstray.ui" line="245"/>
|
||||
<source>Check&&Repare</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogsettingstray.ui" line="241"/>
|
||||
<location filename="../dialogsettingstray.ui" line="293"/>
|
||||
<source>Save</source>
|
||||
<translation>Сохранить</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogsettingstray.cpp" line="272"/>
|
||||
<location filename="../dialogsettingstray.cpp" line="324"/>
|
||||
<location filename="../dialogsettingstray.cpp" line="329"/>
|
||||
<source>Error!</source>
|
||||
<translation type="unfinished">Ошибка!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogsettingstray.cpp" line="272"/>
|
||||
<source>Driver PostgreSQL is not installed!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogsettingstray.cpp" line="281"/>
|
||||
<source>Superuser PostgreSQL authorization</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogsettingstray.cpp" line="324"/>
|
||||
<location filename="../dialogsettingstray.cpp" line="329"/>
|
||||
<source>Error connecting to PostgreSQL!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogsettingstray.cpp" line="325"/>
|
||||
<location filename="../dialogsettingstray.cpp" line="330"/>
|
||||
<source>Possible reasons:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogsettingstray.cpp" line="326"/>
|
||||
<location filename="../dialogsettingstray.cpp" line="331"/>
|
||||
<source>*superuser PostgreSQL login or password is incorrect;</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogsettingstray.cpp" line="327"/>
|
||||
<source>*Port is incorrect.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogsettingstray.cpp" line="332"/>
|
||||
<source>*Port is incorrect;</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dialogsettingstray.cpp" line="333"/>
|
||||
<source>*file 'pg_hba.conf' does not contain an entry for the IP address:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ServerLMSWidget</name>
|
||||
@@ -201,66 +261,66 @@
|
||||
<translation>Остановить</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../serverlmswidget.cpp" line="151"/>
|
||||
<location filename="../serverlmswidget.cpp" line="153"/>
|
||||
<source>Server is started!</source>
|
||||
<translation>Сервер запущен!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../serverlmswidget.cpp" line="164"/>
|
||||
<location filename="../serverlmswidget.cpp" line="166"/>
|
||||
<source>Server is stoped!</source>
|
||||
<translation>Сервер остановлен!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../serverlmswidget.cpp" line="194"/>
|
||||
<location filename="../serverlmswidget.cpp" line="243"/>
|
||||
<location filename="../serverlmswidget.cpp" line="196"/>
|
||||
<location filename="../serverlmswidget.cpp" line="245"/>
|
||||
<source>Warning!</source>
|
||||
<translation>Внимание!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../serverlmswidget.cpp" line="194"/>
|
||||
<location filename="../serverlmswidget.cpp" line="196"/>
|
||||
<source>Database settings have been changed.
|
||||
The server will be restarted.</source>
|
||||
<translation>Настройки Базы Данных были изменены.
|
||||
Сервер будет перезапущен.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../serverlmswidget.cpp" line="243"/>
|
||||
<location filename="../serverlmswidget.cpp" line="245"/>
|
||||
<source>The file could not be opened </source>
|
||||
<translation>Файл не может быть открыт </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../serverlmswidget.cpp" line="312"/>
|
||||
<location filename="../serverlmswidget.cpp" line="316"/>
|
||||
<location filename="../serverlmswidget.cpp" line="314"/>
|
||||
<location filename="../serverlmswidget.cpp" line="318"/>
|
||||
<source>Database connection error!</source>
|
||||
<translation>Ошибка подключения Базы данных!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../serverlmswidget.cpp" line="316"/>
|
||||
<location filename="../serverlmswidget.cpp" line="318"/>
|
||||
<source>Error!</source>
|
||||
<translation>Ошибка!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../serverlmswidget.cpp" line="329"/>
|
||||
<location filename="../serverlmswidget.cpp" line="333"/>
|
||||
<source>Database connection OK!</source>
|
||||
<translation>База данных подключена!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../serverlmswidget.cpp" line="343"/>
|
||||
<location filename="../serverlmswidget.cpp" line="347"/>
|
||||
<source>started</source>
|
||||
<translation>запущен</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../serverlmswidget.cpp" line="348"/>
|
||||
<location filename="../serverlmswidget.cpp" line="352"/>
|
||||
<source>stoped</source>
|
||||
<translation>остановлен</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../serverlmswidget.cpp" line="368"/>
|
||||
<location filename="../serverlmswidget.cpp" line="372"/>
|
||||
<source>connected</source>
|
||||
<translation>подключена</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../serverlmswidget.cpp" line="377"/>
|
||||
<location filename="../serverlmswidget.cpp" line="381"/>
|
||||
<source>not connected</source>
|
||||
<translation>не подключена</translation>
|
||||
</message>
|
||||
|
||||
@@ -66,10 +66,6 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
|
||||
slot_Tray_ShowMessage(tr("Starting the server..."));
|
||||
|
||||
serverLMSWidget->start();
|
||||
|
||||
errorCheck();
|
||||
|
||||
QTimer::singleShot(1000,this,&MainWindow::slot_Connect);
|
||||
}
|
||||
|
||||
@@ -181,6 +177,10 @@ void MainWindow::slot_Tray_ShowMessage(QString textMsg, QSystemTrayIcon::Message
|
||||
|
||||
void MainWindow::slot_Connect()
|
||||
{
|
||||
serverLMSWidget->start();
|
||||
|
||||
errorCheck();
|
||||
|
||||
/* Также подключаем сигнал нажатия на иконку к обработчику
|
||||
* данного нажатия
|
||||
* */
|
||||
|
||||
@@ -9,58 +9,47 @@
|
||||
<translation>Сервер Системы управления обучением (СУО)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="25"/>
|
||||
<location filename="../mainwindow.cpp" line="146"/>
|
||||
<location filename="../mainwindow.cpp" line="204"/>
|
||||
<location filename="../mainwindow.cpp" line="177"/>
|
||||
<location filename="../mainwindow.cpp" line="232"/>
|
||||
<source>Server LMS</source>
|
||||
<translation>Сервер СУО</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="29"/>
|
||||
<location filename="../mainwindow.cpp" line="147"/>
|
||||
<location filename="../mainwindow.cpp" line="233"/>
|
||||
<source>Expand window</source>
|
||||
<translation>Развернуть окно</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="30"/>
|
||||
<location filename="../mainwindow.cpp" line="148"/>
|
||||
<location filename="../mainwindow.cpp" line="234"/>
|
||||
<source>Minimize window</source>
|
||||
<translation>Свернуть окно</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="31"/>
|
||||
<location filename="../mainwindow.cpp" line="149"/>
|
||||
<location filename="../mainwindow.cpp" line="235"/>
|
||||
<source>Exit</source>
|
||||
<translation>Выход</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="55"/>
|
||||
<location filename="../mainwindow.cpp" line="67"/>
|
||||
<source>Starting the server...</source>
|
||||
<translation>Запуск сервера...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="161"/>
|
||||
<location filename="../mainwindow.cpp" line="213"/>
|
||||
<source>Error!</source>
|
||||
<translation>Ошибка!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="163"/>
|
||||
<location filename="../mainwindow.cpp" line="215"/>
|
||||
<source>No Client files found!</source>
|
||||
<translation>Файлы Клиента не найдены!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="164"/>
|
||||
<location filename="../mainwindow.cpp" line="216"/>
|
||||
<source>* check Application for the presence of a folder with a build
|
||||
* check SharedData for a folder with the base version and the name base</source>
|
||||
<translation>* проверьте Application на наличие папки со сборкой
|
||||
* проверьте SharedData на наличие папки с базовой версией и именем base</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="191"/>
|
||||
<source>The application is minimized to the tray.
|
||||
To maximize the application window, click the application icon in the tray.</source>
|
||||
<translation>Приложение свёрнуто в область уведомлений.
|
||||
Чтобы развернуть окно приложения, нажмите на значок приложения в области уведомлений.</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
||||
Reference in New Issue
Block a user