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:
@@ -3,6 +3,7 @@
|
||||
#include "instructorsandtraineeswidget.h"
|
||||
#include "ui_instructorsandtraineeswidget.h"
|
||||
#include "dialogauthorizationinstructor.h"
|
||||
#include "dialogsettings.h"
|
||||
|
||||
InstructorsAndTraineesWidget::InstructorsAndTraineesWidget(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
@@ -19,7 +20,7 @@ InstructorsAndTraineesWidget::InstructorsAndTraineesWidget(QWidget *parent) :
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
ui->btnUpdateStyleSheet->setObjectName("btnUpdateStyleSheet");
|
||||
ui->btnSettings->setObjectName("btnSettings");
|
||||
#ifndef PROJECT_TYPE_DEBUG
|
||||
ui->btnUpdateStyleSheet->setVisible(false);
|
||||
#endif
|
||||
@@ -182,7 +183,12 @@ void InstructorsAndTraineesWidget::slot_LanguageChanged(QString language)
|
||||
qtLanguageTranslator.load(QString(QStringLiteral("translations/InstructorsAndTraineesWidget_")) + language, QStringLiteral("."));
|
||||
qApp->installTranslator(&qtLanguageTranslator);
|
||||
|
||||
Q_EMIT signal_LanguageChanged(language);
|
||||
emit signal_LanguageChanged(language);
|
||||
}
|
||||
|
||||
void InstructorsAndTraineesWidget::slot_UpdateStyleSheet()
|
||||
{
|
||||
updateMyStyleSheet();
|
||||
}
|
||||
|
||||
void InstructorsAndTraineesWidget::checkLoginResult(ServerAuthorization *serverAuth)
|
||||
@@ -408,11 +414,6 @@ void InstructorsAndTraineesWidget::updateLabelLoggedInInstructor(QString login,
|
||||
}
|
||||
}
|
||||
|
||||
void InstructorsAndTraineesWidget::on_btnUpdateStyleSheet_clicked()
|
||||
{
|
||||
updateMyStyleSheet();
|
||||
}
|
||||
|
||||
void InstructorsAndTraineesWidget::on_btnSetVersion_clicked()
|
||||
{
|
||||
connectorToServer->showVersionSelect();
|
||||
@@ -445,3 +446,24 @@ void InstructorsAndTraineesWidget::on_tabWidget_currentChanged(int index)
|
||||
ui->btnAssignTask->setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
void InstructorsAndTraineesWidget::on_btnSettings_clicked()
|
||||
{
|
||||
DialogSettings dlg(this);
|
||||
|
||||
connect(&dlg, &DialogSettings::signal_LanguageChanged, this, &InstructorsAndTraineesWidget::slot_LanguageChanged);
|
||||
connect(&dlg, &DialogSettings::signal_UpdateStyleSheet, this, &InstructorsAndTraineesWidget::slot_UpdateStyleSheet);
|
||||
|
||||
|
||||
switch( dlg.exec() )
|
||||
{
|
||||
case QDialog::Accepted:
|
||||
{
|
||||
break;
|
||||
}
|
||||
case QDialog::Rejected:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user