Улучшил индикацию

This commit is contained in:
krivoshein
2024-11-28 12:03:36 +03:00
parent f98b2e2beb
commit 7011ed1fe8
30 changed files with 639 additions and 317 deletions

View File

@@ -400,10 +400,15 @@ void InstructorsAndTraineesWidget::updateLabelLoggedInInstructor()
QString nameLoggedInInstructor = QString("%1 (%2)").arg(
dbLMS->getNameInstructorByLogin(loginInstructorLoggedInLocal), loginInstructorLoggedInLocal);
ui->lblLoggedInInstructor->setText(nameLoggedInInstructor);
if(loginInstructorLoggedInLocal == QStringLiteral("admin"))
ui->lblLoggedIn->setPixmap(QPixmap(QStringLiteral(":/icons/admin.png")));
else
ui->lblLoggedIn->setPixmap(QPixmap(QStringLiteral(":/icons/instructor.png")));
}
else
{
ui->lblLoggedInInstructor->setText(tr("none"));
ui->lblLoggedIn->setPixmap(QPixmap(QStringLiteral(":/icons/circleGray.png")));
}
mtxAccess.unlock();

View File

@@ -99,6 +99,63 @@
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lblLoggedIn">
<property name="minimumSize">
<size>
<width>40</width>
<height>40</height>
</size>
</property>
<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/circleGray.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lblLoggedInPrefix">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>40</height>
</size>
</property>
<property name="text">
<string>Logged in Instructor: </string>
</property>
<property name="textFormat">
<enum>Qt::AutoText</enum>
</property>
<property name="scaledContents">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lblLoggedInInstructor">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>40</height>
</size>
</property>
<property name="text">
<string>none</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
@@ -112,20 +169,6 @@
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Logged in instructor:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lblLoggedInInstructor">
<property name="text">
<string>none</string>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="btnDocTasks">
<property name="minimumSize">