mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-27 19:45:43 +03:00
Перевод Сервера работает
This commit is contained in:
@@ -111,6 +111,11 @@ ServerLMSWidget::~ServerLMSWidget()
|
||||
delete ui;
|
||||
}
|
||||
|
||||
QString ServerLMSWidget::getLanguage()
|
||||
{
|
||||
return language;
|
||||
}
|
||||
|
||||
|
||||
void ServerLMSWidget::slotUpdateListClients()
|
||||
{
|
||||
|
||||
@@ -53,6 +53,9 @@ public:
|
||||
static const QString languageENG;
|
||||
static const QString languageRUS;
|
||||
|
||||
public:
|
||||
QString getLanguage();
|
||||
|
||||
void setError(int code);
|
||||
|
||||
protected:
|
||||
|
||||
@@ -21,6 +21,9 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
|
||||
connect(serverLMSWidget, &ServerLMSWidget::signal_LanguageChanged, this, &MainWindow::slot_LanguageChanged);
|
||||
|
||||
qtLanguageTranslator.load(QString("translations/TrayServerLMS_") + serverLMSWidget->getLanguage(), ".");
|
||||
qApp->installTranslator(&qtLanguageTranslator);
|
||||
|
||||
//this->move(0, 0);
|
||||
//this->showNormal();
|
||||
//this->showMaximized();
|
||||
@@ -64,6 +67,8 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
this, SLOT(slot_IconActivated(QSystemTrayIcon::ActivationReason)));
|
||||
|
||||
slot_Menu_HideWindow();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* Метод, который обрабатывает событие закрытия окна приложения
|
||||
@@ -123,6 +128,10 @@ void MainWindow::changeEvent(QEvent *event)
|
||||
if (event->type() == QEvent::LanguageChange)
|
||||
{// переведём окно заново
|
||||
ui->retranslateUi(this);
|
||||
|
||||
action_ShowWindow->setText(tr("Expand window"));
|
||||
action_HideWindow->setText(tr("Minimize window"));
|
||||
action_Exit->setText(tr("Exit"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user