mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-29 20:05:38 +03:00
Улучшил индикацию
This commit is contained in:
BIN
ServerLMS/ServerLMS/icons/switchOff.png
Normal file
BIN
ServerLMS/ServerLMS/icons/switchOff.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.3 KiB |
BIN
ServerLMS/ServerLMS/icons/switchOn.png
Normal file
BIN
ServerLMS/ServerLMS/icons/switchOn.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.3 KiB |
@@ -3,5 +3,7 @@
|
||||
<file>icons/instructor.png</file>
|
||||
<file>icons/instructorAdmin.png</file>
|
||||
<file>icons/trainee.png</file>
|
||||
<file>icons/switchOff.png</file>
|
||||
<file>icons/switchOn.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
@@ -25,6 +25,9 @@ ServerLMSWidget::ServerLMSWidget(InstructorsAndTraineesWidget* instructorsAndTra
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
ui->btnStopServer->setEnabled(false);
|
||||
ui->btnStartServer->setEnabled(true);
|
||||
|
||||
// Сделаем первоначальную инициализацию перевода для окна виджета
|
||||
qtLanguageTranslator.load(QString("translations/ServerLMS_") + QString("ru_RU"), ".");
|
||||
qApp->installTranslator(&qtLanguageTranslator);
|
||||
@@ -67,7 +70,7 @@ ServerLMSWidget::ServerLMSWidget(InstructorsAndTraineesWidget* instructorsAndTra
|
||||
connect(processingSystem,&ProcessingSystem::sigAddToMessanger,this,&ServerLMSWidget::slotAddToMessanger,Qt::QueuedConnection);
|
||||
connect(this,&ServerLMSWidget::sigLog,logger,&Logger::addTextToLogger);
|
||||
|
||||
startServer();
|
||||
on_btnStartServer_clicked();
|
||||
|
||||
first = true;
|
||||
qDebug() << "WidgetThread: " << QThread::currentThreadId();
|
||||
@@ -250,13 +253,26 @@ void ServerLMSWidget::slotAddToLog(QString msg)
|
||||
|
||||
void ServerLMSWidget::on_btnStartServer_clicked()
|
||||
{
|
||||
startServer();
|
||||
updateController->calculateHash();
|
||||
if(startServer())
|
||||
{
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
updateController->calculateHash();
|
||||
QApplication::restoreOverrideCursor();
|
||||
|
||||
ui->btnStartServer->setEnabled(false);
|
||||
ui->btnStopServer->setEnabled(true);
|
||||
ui->lblOnOff->setPixmap(QPixmap(QStringLiteral(":/icons/switchOn.png")));
|
||||
}
|
||||
}
|
||||
|
||||
void ServerLMSWidget::on_btnStopServer_clicked()
|
||||
{
|
||||
stopServer();
|
||||
if(stopServer())
|
||||
{
|
||||
ui->btnStopServer->setEnabled(false);
|
||||
ui->btnStartServer->setEnabled(true);
|
||||
ui->lblOnOff->setPixmap(QPixmap(QStringLiteral(":/icons/switchOff.png")));
|
||||
}
|
||||
}
|
||||
|
||||
void ServerLMSWidget::on_btnTaskSet_clicked()
|
||||
|
||||
@@ -94,6 +94,25 @@
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="lblOnOff">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="resources.qrc">:/icons/switchOff.png</pixmap>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
@@ -199,6 +218,8 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<resources>
|
||||
<include location="resources.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
||||
Reference in New Issue
Block a user