mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
Начал реал-ть список подпроцедур ViewerTasksCommon
This commit is contained in:
@@ -114,6 +114,13 @@ add_library(InstructorsAndTrainees SHARED
|
||||
tasks/dialogchekertask.cpp
|
||||
tasks/dialogchekertask.h
|
||||
|
||||
tasks/dialogtaskscommon.cpp
|
||||
tasks/dialogtaskscommon.h
|
||||
|
||||
tasks/viewertaskscommon.cpp
|
||||
tasks/viewertaskscommon.h
|
||||
tasks/viewertaskscommon.ui
|
||||
|
||||
widgets/newversionwidget.cpp
|
||||
widgets/newversionwidget.h
|
||||
widgets/newversionwidget.ui
|
||||
|
||||
@@ -19,6 +19,7 @@ InstructorsAndTraineesWidget::InstructorsAndTraineesWidget(QWidget *parent) :
|
||||
viewerInstructors(nullptr),
|
||||
messangerWidget(nullptr),
|
||||
messangerController(nullptr),
|
||||
dlgTasksCommon(nullptr),
|
||||
adminMode(false),
|
||||
loginInstructorLoggedInLocal(QStringLiteral("")),
|
||||
nameInstructorLoggedInLocal(QStringLiteral("")),
|
||||
@@ -88,6 +89,9 @@ InstructorsAndTraineesWidget::~InstructorsAndTraineesWidget()
|
||||
if(authorizationIsCompleted())
|
||||
deAuthorizationInstructor(loginInstructorLoggedInLocal);
|
||||
|
||||
if(dlgTasksCommon)
|
||||
dlgTasksCommon->close();
|
||||
|
||||
delete messangerController;
|
||||
delete viewerInstructors;
|
||||
delete viewerTrainees;
|
||||
@@ -493,3 +497,24 @@ void InstructorsAndTraineesWidget::on_btnPersonalCard_clicked()
|
||||
{
|
||||
this->viewerTrainees->on_btnPersonalCard_clicked();
|
||||
}
|
||||
|
||||
void InstructorsAndTraineesWidget::on_btnTasksCommon_clicked()
|
||||
{
|
||||
AMMtasksWidget* ammTasksWidgetCommon = viewerTrainees->getAmmTasksWidgetCommon();
|
||||
FIMtasksWidget* fimTasksWidgetCommon = viewerTrainees->getFimTasksWidgetCommon();
|
||||
|
||||
if(!ammTasksWidgetCommon || !fimTasksWidgetCommon)
|
||||
return;
|
||||
|
||||
dlgTasksCommon = new DialogTasksCommon(connectorToServer, ammTasksWidgetCommon, fimTasksWidgetCommon, this);
|
||||
dlgTasksCommon->exec();
|
||||
|
||||
ammTasksWidgetCommon->setParent(this);
|
||||
fimTasksWidgetCommon->setParent(this);
|
||||
|
||||
if(dlgTasksCommon)
|
||||
{
|
||||
delete dlgTasksCommon;
|
||||
dlgTasksCommon = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "messangercontroller.h"
|
||||
#include "connectortoserver.h"
|
||||
#include "metatypes.h"
|
||||
#include "dialogtaskscommon.h"
|
||||
|
||||
|
||||
namespace Ui {
|
||||
@@ -69,6 +70,8 @@ private Q_SLOTS:
|
||||
|
||||
void on_btnPersonalCard_clicked();
|
||||
|
||||
void on_btnTasksCommon_clicked();
|
||||
|
||||
private:
|
||||
//Авторизация инструктора локальная (на ГУИ)
|
||||
bool authorizationInstructorDialog(QWidget* parent = nullptr);
|
||||
@@ -87,6 +90,8 @@ private:
|
||||
MessangerWidget* messangerWidget;
|
||||
MessangerController* messangerController;
|
||||
|
||||
DialogTasksCommon* dlgTasksCommon;
|
||||
|
||||
bool adminMode;
|
||||
QString loginInstructorLoggedInLocal;
|
||||
QString nameInstructorLoggedInLocal;
|
||||
|
||||
@@ -151,6 +151,32 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="btnTasksCommon">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>130</width>
|
||||
<height>58</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Tasks</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="InstructorsAndTrainees.qrc">
|
||||
<normaloff>:/resources/icons/procedure.png</normaloff>:/resources/icons/procedure.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="btnPersonalCard">
|
||||
<property name="minimumSize">
|
||||
|
||||
31
InstructorsAndTrainees/tasks/dialogtaskscommon.cpp
Normal file
31
InstructorsAndTrainees/tasks/dialogtaskscommon.cpp
Normal file
@@ -0,0 +1,31 @@
|
||||
#include <QHBoxLayout>
|
||||
#include "dialogtaskscommon.h"
|
||||
|
||||
DialogTasksCommon::DialogTasksCommon(ConnectorToServer* connectorToServer, AMMtasksWidget* ammTasksWidget_common, FIMtasksWidget* fimTasksWidget_common,
|
||||
QWidget *parent) :
|
||||
QDialog(parent,
|
||||
Qt::WindowSystemMenuHint
|
||||
| Qt::WindowMaximizeButtonHint
|
||||
| Qt::WindowMinimizeButtonHint
|
||||
| Qt::WindowCloseButtonHint),
|
||||
viewerTasks(nullptr)
|
||||
{
|
||||
viewerTasks = new ViewerTasksCommon(connectorToServer, ammTasksWidget_common, fimTasksWidget_common, this);
|
||||
|
||||
QHBoxLayout *layout = new QHBoxLayout(this);
|
||||
layout->addWidget(viewerTasks);
|
||||
this->setWindowTitle(tr("Viewer tasks common"));
|
||||
this->setMinimumSize(1400, 700);
|
||||
this->setWindowState(Qt::WindowMaximized);
|
||||
this->setModal(true);
|
||||
}
|
||||
|
||||
DialogTasksCommon::~DialogTasksCommon()
|
||||
{
|
||||
delete viewerTasks;
|
||||
}
|
||||
|
||||
void DialogTasksCommon::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
viewerTasks->close();
|
||||
}
|
||||
24
InstructorsAndTrainees/tasks/dialogtaskscommon.h
Normal file
24
InstructorsAndTrainees/tasks/dialogtaskscommon.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#ifndef DIALOGTASKSCOMMON_H
|
||||
#define DIALOGTASKSCOMMON_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QDialog>
|
||||
|
||||
#include "viewertaskscommon.h"
|
||||
|
||||
|
||||
class DialogTasksCommon : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
DialogTasksCommon(ConnectorToServer* connectorToServer, AMMtasksWidget* ammTasksWidget_common, FIMtasksWidget* fimTasksWidget_common,
|
||||
QWidget *parent = nullptr);
|
||||
~DialogTasksCommon();
|
||||
|
||||
void closeEvent(QCloseEvent *event) override;
|
||||
|
||||
private:
|
||||
ViewerTasksCommon* viewerTasks;
|
||||
};
|
||||
|
||||
#endif // DIALOGTASKSCOMMON_H
|
||||
25
InstructorsAndTrainees/tasks/viewertaskscommon.cpp
Normal file
25
InstructorsAndTrainees/tasks/viewertaskscommon.cpp
Normal file
@@ -0,0 +1,25 @@
|
||||
#include "viewertaskscommon.h"
|
||||
#include "ui_viewertaskscommon.h"
|
||||
|
||||
ViewerTasksCommon::ViewerTasksCommon(ConnectorToServer* connectorToServer, AMMtasksWidget* ammTasksWidgetIn, FIMtasksWidget* fimTasksWidgetIn, QWidget *parent) :
|
||||
QWidget(parent),
|
||||
connectorToServer(connectorToServer),
|
||||
ammTasksWidget_common(ammTasksWidgetIn),
|
||||
fimTasksWidget_common(fimTasksWidgetIn),
|
||||
ui(new Ui::ViewerTasksCommon)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
ui->verticalLayout_AMMcommon->addWidget(ammTasksWidget_common);
|
||||
ui->verticalLayout_FIMcommon->addWidget(fimTasksWidget_common);
|
||||
}
|
||||
|
||||
ViewerTasksCommon::~ViewerTasksCommon()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void ViewerTasksCommon::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
|
||||
}
|
||||
33
InstructorsAndTrainees/tasks/viewertaskscommon.h
Normal file
33
InstructorsAndTrainees/tasks/viewertaskscommon.h
Normal file
@@ -0,0 +1,33 @@
|
||||
#ifndef VIEWERTASKSCOMMON_H
|
||||
#define VIEWERTASKSCOMMON_H
|
||||
|
||||
#include <QWidget>
|
||||
#include"connectortoserver.h"
|
||||
#include "ammtaskswidget.h"
|
||||
#include "fimtaskswidget.h"
|
||||
|
||||
namespace Ui {
|
||||
class ViewerTasksCommon;
|
||||
}
|
||||
|
||||
class ViewerTasksCommon : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ViewerTasksCommon(ConnectorToServer* connectorToServer, AMMtasksWidget* ammTasksWidget_common, FIMtasksWidget* fimTasksWidget_common, QWidget *parent = nullptr);
|
||||
~ViewerTasksCommon();
|
||||
|
||||
void closeEvent(QCloseEvent *event) override;
|
||||
|
||||
private:
|
||||
ConnectorToServer* connectorToServer;
|
||||
|
||||
AMMtasksWidget* ammTasksWidget_common;
|
||||
FIMtasksWidget* fimTasksWidget_common;
|
||||
|
||||
private:
|
||||
Ui::ViewerTasksCommon *ui;
|
||||
};
|
||||
|
||||
#endif // VIEWERTASKSCOMMON_H
|
||||
52
InstructorsAndTrainees/tasks/viewertaskscommon.ui
Normal file
52
InstructorsAndTrainees/tasks/viewertaskscommon.ui
Normal file
@@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>ViewerTasksCommon</class>
|
||||
<widget class="QWidget" name="ViewerTasksCommon">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_Main">
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab_AMM">
|
||||
<attribute name="title">
|
||||
<string>AMM</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_AMMcommon"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_FIM">
|
||||
<attribute name="title">
|
||||
<string>FIM</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_FIMcommon"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -44,7 +44,7 @@ PersonalCardTrainee::PersonalCardTrainee(ConnectorToServer* connectorToServer, M
|
||||
ui->groupBox_Messenger->setMaximumWidth(500);
|
||||
ui->groupBox_Messenger->setMinimumWidth(500);
|
||||
|
||||
ui->groupBox_Messenger->setMinimumHeight(500);
|
||||
ui->groupBox_Messenger->setMinimumHeight(400);
|
||||
|
||||
ammTasksWidget_personal->setMinimumWidth(700);
|
||||
fimTasksWidget_personal->setMinimumWidth(700);
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../resources.qrc">:/resources/icons/circleGray.png</pixmap>
|
||||
<pixmap resource="../InstructorsAndTrainees.qrc">:/resources/icons/circleGray.png</pixmap>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
@@ -211,7 +211,7 @@
|
||||
<item row="0" column="0">
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab_AMM">
|
||||
<attribute name="title">
|
||||
@@ -297,7 +297,7 @@
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../resources.qrc"/>
|
||||
<include location="../InstructorsAndTrainees.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
||||
@@ -27,6 +27,9 @@ public:
|
||||
|
||||
void deactivate();
|
||||
|
||||
AMMtasksWidget* getAmmTasksWidgetCommon(){return ammTasksWidgetCommon;};
|
||||
FIMtasksWidget* getFimTasksWidgetCommon(){return fimTasksWidgetCommon;};
|
||||
|
||||
protected:
|
||||
void changeEvent(QEvent * event) override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user