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:
@@ -64,11 +64,11 @@ bool ProviderDBLMS::authorizationTrainee(QString login, QString password, QStrin
|
||||
return false;
|
||||
}
|
||||
|
||||
Q_EMIT signal_BlockAutorization(true);
|
||||
//Q_EMIT signal_BlockAutorization(true);
|
||||
|
||||
bool res = dbLMS->authorizationTrainee(login, password, classroom_name, computer_name);
|
||||
|
||||
Q_EMIT signal_BlockAutorization(false);
|
||||
//Q_EMIT signal_BlockAutorization(false);
|
||||
|
||||
mtxAccess.unlock();
|
||||
return res;
|
||||
@@ -84,11 +84,11 @@ bool ProviderDBLMS::deAuthorizationTrainee(QString login)
|
||||
return false;
|
||||
}
|
||||
|
||||
Q_EMIT signal_BlockAutorization(true);
|
||||
//Q_EMIT signal_BlockAutorization(true);
|
||||
|
||||
bool res = dbLMS->deAuthorizationTrainee(login);
|
||||
|
||||
Q_EMIT signal_BlockAutorization(false);
|
||||
//Q_EMIT signal_BlockAutorization(false);
|
||||
|
||||
mtxAccess.unlock();
|
||||
return res;
|
||||
@@ -120,11 +120,11 @@ bool ProviderDBLMS::authorizationInstructor(QString login, QString password)
|
||||
return false;
|
||||
}
|
||||
|
||||
Q_EMIT signal_BlockAutorization(true);
|
||||
//Q_EMIT signal_BlockAutorization(true);
|
||||
|
||||
bool res = dbLMS->authorizationInstructor(login, password);
|
||||
|
||||
Q_EMIT signal_BlockAutorization(false);
|
||||
//Q_EMIT signal_BlockAutorization(false);
|
||||
|
||||
mtxAccess.unlock();
|
||||
return res;
|
||||
@@ -140,11 +140,11 @@ bool ProviderDBLMS::deAuthorizationInstructor(QString login)
|
||||
return false;
|
||||
}
|
||||
|
||||
Q_EMIT signal_BlockAutorization(true);
|
||||
//Q_EMIT signal_BlockAutorization(true);
|
||||
|
||||
bool res = dbLMS->deAuthorizationInstructor(login);
|
||||
|
||||
Q_EMIT signal_BlockAutorization(false);
|
||||
//Q_EMIT signal_BlockAutorization(false);
|
||||
|
||||
mtxAccess.unlock();
|
||||
return res;
|
||||
|
||||
@@ -7,5 +7,10 @@
|
||||
<file>resources/icons/switchOn.png</file>
|
||||
<file>resources/blankXML/ListTasksAMM.xml</file>
|
||||
<file>resources/blankXML/ListTasksFIM.xml</file>
|
||||
<file>resources/icons/circleGreen.png</file>
|
||||
<file>resources/icons/circleRed.png</file>
|
||||
<file>resources/icons/lock.png</file>
|
||||
<file>resources/icons/unlock.png</file>
|
||||
<file>resources/icons/open.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
BIN
ServerLMS/resources/icons/circleGreen.png
Normal file
BIN
ServerLMS/resources/icons/circleGreen.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
BIN
ServerLMS/resources/icons/circleRed.png
Normal file
BIN
ServerLMS/resources/icons/circleRed.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
BIN
ServerLMS/resources/icons/lock.png
Normal file
BIN
ServerLMS/resources/icons/lock.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
BIN
ServerLMS/resources/icons/open.png
Normal file
BIN
ServerLMS/resources/icons/open.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 29 KiB |
BIN
ServerLMS/resources/icons/unlock.png
Normal file
BIN
ServerLMS/resources/icons/unlock.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
@@ -122,9 +122,15 @@ void ServerLMSWidget::addToLog(QString message)
|
||||
void ServerLMSWidget::slot_BlockAutorization(bool block)
|
||||
{
|
||||
if(block)
|
||||
{
|
||||
server->blockAutorization();
|
||||
ui->lblBlockAuth->setPixmap(QPixmap(QStringLiteral(":/resources/icons/lock.png")));
|
||||
}
|
||||
else
|
||||
{
|
||||
server->unBlockAutorization();
|
||||
ui->lblBlockAuth->setPixmap(QPixmap(QStringLiteral(":/resources/icons/open.png")));
|
||||
}
|
||||
}
|
||||
|
||||
void ServerLMSWidget::slot_LanguageChanged(QString language)
|
||||
@@ -153,6 +159,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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -85,38 +85,6 @@
|
||||
</item>
|
||||
<item row="4" 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">:/resources/icons/switchOff.png</pixmap>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="btnStartServer">
|
||||
<property name="minimumSize">
|
||||
@@ -173,6 +141,80 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<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">:/resources/icons/switchOff.png</pixmap>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Block Authorization</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="lblBlockAuth">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="resources.qrc">:/resources/icons/open.png</pixmap>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
|
||||
Reference in New Issue
Block a user