mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-29 20:05:38 +03:00
Индикация и возм обновл docs из ГУИ
This commit is contained in:
@@ -59,6 +59,8 @@ AMMtasksWidget::AMMtasksWidget(ConnectorToServer* connectorToServer, TypeListTre
|
||||
ui->btnOnlyActive->setEnabled(false);
|
||||
ui->btnAssignTask->setObjectName("btnAssignTask");
|
||||
ui->btnAssignTask->setEnabled(false);
|
||||
ui->btnDocsUpdating->setObjectName("btnDocsUpdating");
|
||||
ui->btnDocsUpdating->setEnabled(false);
|
||||
|
||||
if(type == TypeListTreeAMMFIM::listCommon)
|
||||
{
|
||||
@@ -76,6 +78,10 @@ AMMtasksWidget::AMMtasksWidget(ConnectorToServer* connectorToServer, TypeListTre
|
||||
ui->btnOnlyActive->setVisible(false);
|
||||
ui->btnAssignTask->setVisible(false);
|
||||
|
||||
ui->label_DocsActualed->setVisible(false);
|
||||
ui->label_Actual->setVisible(false);
|
||||
ui->btnDocsUpdating->setVisible(false);
|
||||
|
||||
//ui->verticalLayout->setAlignment(Qt::AlignmentFlag::AlignBottom);
|
||||
//ui->horizontalLayout_3->setAlignment(Qt::AlignmentFlag::AlignLeft);
|
||||
}
|
||||
@@ -113,6 +119,22 @@ void AMMtasksWidget::waitAnimationWidgetShowWithPlay()
|
||||
waitAnimationWidget->showWithPlay();
|
||||
}
|
||||
|
||||
void AMMtasksWidget::setDocsActualed(bool flActualed)
|
||||
{
|
||||
if(flActualed)
|
||||
{
|
||||
ui->label_DocsActualed->setPixmap(QPixmap(QStringLiteral(":/resources/icons/circleGreen.png")));
|
||||
ui->label_Actual->setText(tr("actual"));
|
||||
ui->btnDocsUpdating->setEnabled(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->label_DocsActualed->setPixmap(QPixmap(QStringLiteral(":/resources/icons/warning.png")));
|
||||
ui->label_Actual->setText(tr("update required"));
|
||||
ui->btnDocsUpdating->setEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
void AMMtasksWidget::resizeEvent(QResizeEvent *event)
|
||||
{
|
||||
setWidthColumnsTree();
|
||||
@@ -179,6 +201,7 @@ void AMMtasksWidget::slot_NeedUpdateUI()
|
||||
{
|
||||
qDebug() << "AMMtasksWidget::slot_NeedUpdateUI thread ID " << QThread::currentThreadId();
|
||||
loadTasksAMM();
|
||||
setDocsActualed(true);
|
||||
}
|
||||
|
||||
void AMMtasksWidget::slot_traineeSelected(int id_trainee)
|
||||
@@ -418,3 +441,8 @@ void AMMtasksWidget::on_btnOnlyActive_clicked()
|
||||
}
|
||||
loadTasksAMM(false);
|
||||
}
|
||||
|
||||
void AMMtasksWidget::on_btnDocsUpdating_clicked()
|
||||
{
|
||||
connectorToServer->sendQueryTasksXML("amm");
|
||||
}
|
||||
|
||||
@@ -25,6 +25,8 @@ public:
|
||||
void deactivate();
|
||||
void waitAnimationWidgetShowWithPlay();
|
||||
|
||||
void setDocsActualed(bool flActualed);
|
||||
|
||||
public:
|
||||
void resizeEvent(QResizeEvent *event) override;
|
||||
void closeDlgCheckTask();
|
||||
@@ -39,6 +41,8 @@ private Q_SLOTS:
|
||||
void on_btnOnlyActive_clicked(); //AMM
|
||||
|
||||
|
||||
void on_btnDocsUpdating_clicked();
|
||||
|
||||
public Q_SLOTS:
|
||||
//Слот обработки сигнала необходимости обновления интерфейса
|
||||
void slot_NeedUpdateUI();
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
<height>448</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@@ -35,6 +35,86 @@
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_Btn">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_Actual">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_DocsActualed">
|
||||
<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="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../InstructorsAndTrainees.qrc">:/resources/icons/warning.png</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_Actual">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>48</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="btnDocsUpdating">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Update</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../InstructorsAndTrainees.qrc">
|
||||
<normaloff>:/resources/icons/exchange.png</normaloff>:/resources/icons/exchange.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>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
@@ -60,7 +140,7 @@
|
||||
<string>Status</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../resources.qrc">
|
||||
<iconset resource="../InstructorsAndTrainees.qrc">
|
||||
<normaloff>:/resources/icons/check.png</normaloff>:/resources/icons/check.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
@@ -86,7 +166,7 @@
|
||||
<string>Delete</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../resources.qrc">
|
||||
<iconset resource="../InstructorsAndTrainees.qrc">
|
||||
<normaloff>:/resources/icons/delete.png</normaloff>:/resources/icons/delete.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
@@ -112,7 +192,7 @@
|
||||
<string>Аvailable</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../resources.qrc">
|
||||
<iconset resource="../InstructorsAndTrainees.qrc">
|
||||
<normaloff>:/resources/icons/filter.png</normaloff>:/resources/icons/filter.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
@@ -141,7 +221,7 @@
|
||||
<string>Assign</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../resources.qrc">
|
||||
<iconset resource="../InstructorsAndTrainees.qrc">
|
||||
<normaloff>:/resources/icons/assignTask.png</normaloff>:/resources/icons/assignTask.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
@@ -164,7 +244,7 @@
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../resources.qrc"/>
|
||||
<include location="../InstructorsAndTrainees.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
||||
Reference in New Issue
Block a user