This commit is contained in:
2025-05-29 18:15:48 +03:00
parent f8a69c6f22
commit 0ff72cf6c1
8 changed files with 272 additions and 244 deletions

View File

@@ -17,6 +17,18 @@
<iconset resource="testDBpgSQL.qrc"> <iconset resource="testDBpgSQL.qrc">
<normaloff>:/resources/lms.png</normaloff>:/resources/lms.png</iconset> <normaloff>:/resources/lms.png</normaloff>:/resources/lms.png</iconset>
</property> </property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonIconOnly</enum>
</property>
<property name="documentMode">
<bool>false</bool>
</property>
<property name="dockNestingEnabled">
<bool>false</bool>
</property>
<property name="dockOptions">
<set>QMainWindow::AllowTabbedDocks|QMainWindow::AnimatedDocks</set>
</property>
<widget class="QWidget" name="centralwidget"> <widget class="QWidget" name="centralwidget">
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="1" column="1"> <item row="1" column="1">

View File

@@ -15,7 +15,7 @@ DialogSettings::DialogSettings(ConnectorToServer* connectorToServer, bool instru
ui->btnUpdateStyle->setObjectName("btnUpdateStyle"); ui->btnUpdateStyle->setObjectName("btnUpdateStyle");
ui->btnSetVersion->setObjectName("btnSetVersion"); ui->btnSetVersion->setObjectName("btnSetVersion");
ui->btnSave->setObjectName("btnSave"); ui->btnSave->setObjectName("btnSave");
ui->btnSave->setObjectName("checkAutoStart"); ui->checkAutoStart->setObjectName("checkAutoStart");
this->connectorToServer = connectorToServer; this->connectorToServer = connectorToServer;

View File

@@ -21,6 +21,7 @@ InstructorsAndTraineesWidget::InstructorsAndTraineesWidget(QWidget *parent) :
ui->setupUi(this); ui->setupUi(this);
ui->btnSettings->setObjectName("btnSettings"); ui->btnSettings->setObjectName("btnSettings");
ui->tabWidgetTasks->setObjectName("tabWidgetTasks");
#ifndef PROJECT_TYPE_DEBUG #ifndef PROJECT_TYPE_DEBUG
ui->btnUpdateStyleSheet->setVisible(false); ui->btnUpdateStyleSheet->setVisible(false);
#endif #endif

View File

@@ -67,6 +67,35 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QToolButton" name="btnAuthorizationInstructor">
<property name="minimumSize">
<size>
<width>170</width>
<height>58</height>
</size>
</property>
<property name="text">
<string>Authorization Instructor</string>
</property>
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/resources/icons/login-user.png</normaloff>:/resources/icons/login-user.png</iconset>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
</widget>
</item>
<item> <item>
<widget class="QLabel" name="lblDBisConnected"> <widget class="QLabel" name="lblDBisConnected">
<property name="minimumSize"> <property name="minimumSize">
@@ -106,35 +135,6 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QToolButton" name="btnAuthorizationInstructor">
<property name="minimumSize">
<size>
<width>170</width>
<height>58</height>
</size>
</property>
<property name="text">
<string>Authorization Instructor</string>
</property>
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/resources/icons/login-user.png</normaloff>:/resources/icons/login-user.png</iconset>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
</widget>
</item>
<item> <item>
<widget class="QLabel" name="lblLoggedIn"> <widget class="QLabel" name="lblLoggedIn">
<property name="minimumSize"> <property name="minimumSize">
@@ -328,7 +328,7 @@
<item row="2" column="0"> <item row="2" column="0">
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<widget class="QTabWidget" name="tabWidget"> <widget class="QTabWidget" name="tabWidgetTasks">
<property name="currentIndex"> <property name="currentIndex">
<number>1</number> <number>1</number>
</property> </property>

View File

@@ -57,11 +57,22 @@ AMMtasksWidget::AMMtasksWidget(ConnectorToServer* connectorToServer, TypeList ty
ui->btnAssignTask->setObjectName("btnAssignTask"); ui->btnAssignTask->setObjectName("btnAssignTask");
ui->btnAssignTask->setEnabled(false); ui->btnAssignTask->setEnabled(false);
if(type == TypeList::listCommon) if(type == TypeList::listCommon)
{
ui->horizontalLayout_3->addWidget(ui->btnAssignTask);
ui->horizontalLayout_3->addWidget(ui->btnOnlyActive);
ui->horizontalLayout_3->addWidget(ui->btnCheck);
ui->horizontalLayout_3->addWidget(ui->btnDelete);
ui->horizontalLayout_3->setAlignment(Qt::AlignmentFlag::AlignLeft);
ui->btnDelete->setVisible(false); ui->btnDelete->setVisible(false);
}
else else
{ {
ui->btnOnlyActive->setVisible(false); ui->btnOnlyActive->setVisible(false);
ui->btnAssignTask->setVisible(false); ui->btnAssignTask->setVisible(false);
ui->verticalLayout->setAlignment(Qt::AlignmentFlag::AlignBottom);
} }
ui->btnCheck->setVisible(false); ui->btnCheck->setVisible(false);

View File

@@ -21,131 +21,129 @@
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="0" column="0"> <item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QVBoxLayout" name="verticalLayout_2">
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_1"/> <layout class="QHBoxLayout" name="horizontalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_1"/>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QToolButton" name="btnAssignTask">
<property name="minimumSize">
<size>
<width>50</width>
<height>50</height>
</size>
</property>
<property name="text">
<string>Assign</string>
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/resources/icons/assignTask.png</normaloff>:/resources/icons/assignTask.png</iconset>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="btnOnlyActive">
<property name="minimumSize">
<size>
<width>50</width>
<height>50</height>
</size>
</property>
<property name="text">
<string>Аvailable</string>
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/resources/icons/filter.png</normaloff>:/resources/icons/filter.png</iconset>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="btnCheck">
<property name="minimumSize">
<size>
<width>50</width>
<height>50</height>
</size>
</property>
<property name="text">
<string>Check</string>
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/resources/icons/check.png</normaloff>:/resources/icons/check.png</iconset>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="btnDelete">
<property name="minimumSize">
<size>
<width>50</width>
<height>50</height>
</size>
</property>
<property name="text">
<string>Delete</string>
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/resources/icons/delete.png</normaloff>:/resources/icons/delete.png</iconset>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item> </item>
<item> <item>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<item> <item>
<spacer name="verticalSpacer"> <layout class="QHBoxLayout" name="horizontalLayout_3"/>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QToolButton" name="btnOnlyActive">
<property name="minimumSize">
<size>
<width>50</width>
<height>50</height>
</size>
</property>
<property name="text">
<string>Аvailable</string>
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/resources/icons/filter.png</normaloff>:/resources/icons/filter.png</iconset>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="btnAssignTask">
<property name="minimumSize">
<size>
<width>50</width>
<height>50</height>
</size>
</property>
<property name="text">
<string>Assign</string>
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/resources/icons/assignTask.png</normaloff>:/resources/icons/assignTask.png</iconset>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="btnCheck">
<property name="minimumSize">
<size>
<width>50</width>
<height>50</height>
</size>
</property>
<property name="text">
<string>Check</string>
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/resources/icons/check.png</normaloff>:/resources/icons/check.png</iconset>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="btnDelete">
<property name="minimumSize">
<size>
<width>50</width>
<height>50</height>
</size>
</property>
<property name="text">
<string>Delete</string>
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/resources/icons/delete.png</normaloff>:/resources/icons/delete.png</iconset>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
</widget>
</item> </item>
</layout> </layout>
</item> </item>

View File

@@ -50,6 +50,12 @@ FIMtasksWidget::FIMtasksWidget(ConnectorToServer* connectorToServer, TypeList ty
if(type == TypeList::listCommon) if(type == TypeList::listCommon)
{ {
ui->horizontalLayout_3->addWidget(ui->btnAssignTask);
ui->horizontalLayout_3->addWidget(ui->btnCheck);
ui->horizontalLayout_3->addWidget(ui->btnDelete);
ui->horizontalLayout_3->setAlignment(Qt::AlignmentFlag::AlignLeft);
ui->btnDelete->setVisible(false); ui->btnDelete->setVisible(false);
ui->btnCheck->setVisible(false); ui->btnCheck->setVisible(false);
} }
@@ -64,6 +70,8 @@ FIMtasksWidget::FIMtasksWidget(ConnectorToServer* connectorToServer, TypeList ty
else else
{ {
ui->btnAssignTask->setVisible(false); ui->btnAssignTask->setVisible(false);
ui->verticalLayout->setAlignment(Qt::AlignmentFlag::AlignBottom);
} }
} }

View File

@@ -15,102 +15,100 @@
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="0" column="0"> <item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QVBoxLayout" name="verticalLayout_2">
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_1"/> <layout class="QHBoxLayout" name="horizontalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_1"/>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QToolButton" name="btnAssignTask">
<property name="minimumSize">
<size>
<width>50</width>
<height>50</height>
</size>
</property>
<property name="text">
<string>Assign</string>
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/resources/icons/assignTask.png</normaloff>:/resources/icons/assignTask.png</iconset>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="btnCheck">
<property name="minimumSize">
<size>
<width>50</width>
<height>50</height>
</size>
</property>
<property name="text">
<string>Check</string>
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/resources/icons/check.png</normaloff>:/resources/icons/check.png</iconset>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="btnDelete">
<property name="minimumSize">
<size>
<width>50</width>
<height>50</height>
</size>
</property>
<property name="text">
<string>Delete</string>
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/resources/icons/delete.png</normaloff>:/resources/icons/delete.png</iconset>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item> </item>
<item> <item>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<item> <item>
<spacer name="verticalSpacer"> <layout class="QHBoxLayout" name="horizontalLayout_3"/>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QToolButton" name="btnAssignTask">
<property name="minimumSize">
<size>
<width>50</width>
<height>50</height>
</size>
</property>
<property name="text">
<string>Assign</string>
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/resources/icons/assignTask.png</normaloff>:/resources/icons/assignTask.png</iconset>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="btnCheck">
<property name="minimumSize">
<size>
<width>50</width>
<height>50</height>
</size>
</property>
<property name="text">
<string>Check</string>
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/resources/icons/check.png</normaloff>:/resources/icons/check.png</iconset>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="btnDelete">
<property name="minimumSize">
<size>
<width>50</width>
<height>50</height>
</size>
</property>
<property name="text">
<string>Delete</string>
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/resources/icons/delete.png</normaloff>:/resources/icons/delete.png</iconset>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
</widget>
</item> </item>
</layout> </layout>
</item> </item>