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:
@@ -107,6 +107,9 @@ add_library(InstructorsAndTrainees SHARED
|
|||||||
specialmessagebox.h
|
specialmessagebox.h
|
||||||
specialmessagebox.ui
|
specialmessagebox.ui
|
||||||
|
|
||||||
|
trainees/dialogcardtrainee.cpp
|
||||||
|
trainees/dialogcardtrainee.h
|
||||||
|
|
||||||
resources.qrc
|
resources.qrc
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
36
InstructorsAndTrainees/trainees/dialogcardtrainee.cpp
Normal file
36
InstructorsAndTrainees/trainees/dialogcardtrainee.cpp
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
#include "dialogcardtrainee.h"
|
||||||
|
|
||||||
|
DialogCardTrainee::DialogCardTrainee(ConnectorToServer* connectorToServer, MessangerController* messangerController,
|
||||||
|
int id_trainee, AMMtasksWidget* ammTasksWidget_common, FIMtasksWidget* fimTasksWidget_common,
|
||||||
|
QWidget *parent) :
|
||||||
|
QDialog(parent,
|
||||||
|
Qt::WindowSystemMenuHint
|
||||||
|
| Qt::WindowMaximizeButtonHint
|
||||||
|
| Qt::WindowMinimizeButtonHint
|
||||||
|
| Qt::WindowCloseButtonHint),
|
||||||
|
cardTrainee(nullptr)
|
||||||
|
{
|
||||||
|
cardTrainee = new PersonalCardTrainee(connectorToServer, messangerController,
|
||||||
|
id_trainee, ammTasksWidget_common, fimTasksWidget_common, this);
|
||||||
|
|
||||||
|
QHBoxLayout *layout = new QHBoxLayout(this);
|
||||||
|
layout->addWidget(cardTrainee);
|
||||||
|
this->setWindowTitle(tr("Personal card trainee"));
|
||||||
|
this->setMinimumSize(1400, 700);
|
||||||
|
this->setWindowState(Qt::WindowMaximized);
|
||||||
|
/*this->setWindowFlags(Qt::WindowSystemMenuHint
|
||||||
|
| Qt::WindowMaximizeButtonHint
|
||||||
|
| Qt::WindowMinimizeButtonHint
|
||||||
|
| Qt::WindowCloseButtonHint);*/
|
||||||
|
this->setModal(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
DialogCardTrainee::~DialogCardTrainee()
|
||||||
|
{
|
||||||
|
delete cardTrainee;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DialogCardTrainee::closeEvent(QCloseEvent *event)
|
||||||
|
{
|
||||||
|
cardTrainee->close();
|
||||||
|
}
|
||||||
23
InstructorsAndTrainees/trainees/dialogcardtrainee.h
Normal file
23
InstructorsAndTrainees/trainees/dialogcardtrainee.h
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
#ifndef DIALOGCARDTRAINEE_H
|
||||||
|
#define DIALOGCARDTRAINEE_H
|
||||||
|
|
||||||
|
#include <QDialog>
|
||||||
|
#include <QObject>
|
||||||
|
#include "personalcardtrainee.h"
|
||||||
|
|
||||||
|
class DialogCardTrainee : public QDialog
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
DialogCardTrainee(ConnectorToServer* connectorToServer, MessangerController* messangerController,
|
||||||
|
int id_trainee, AMMtasksWidget* ammTasksWidget_common, FIMtasksWidget* fimTasksWidget_common,
|
||||||
|
QWidget *parent = nullptr);
|
||||||
|
~DialogCardTrainee();
|
||||||
|
|
||||||
|
void closeEvent(QCloseEvent *event) override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
PersonalCardTrainee* cardTrainee;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // DIALOGCARDTRAINEE_H
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
#include "editortrainees.h"
|
#include "editortrainees.h"
|
||||||
#include "viewertrainees.h"
|
#include "viewertrainees.h"
|
||||||
#include "personalcardtrainee.h"
|
#include "personalcardtrainee.h"
|
||||||
|
#include "dialogcardtrainee.h"
|
||||||
#include "ui_viewertrainees.h"
|
#include "ui_viewertrainees.h"
|
||||||
|
|
||||||
ViewerTrainees::ViewerTrainees(ConnectorToServer* connectorToServer, MessangerController* messangerController, QWidget *parent) :
|
ViewerTrainees::ViewerTrainees(ConnectorToServer* connectorToServer, MessangerController* messangerController, QWidget *parent) :
|
||||||
@@ -134,6 +135,7 @@ void ViewerTrainees::on_itemDoubleClicked(QTreeWidgetItem *item, int column)
|
|||||||
int id_trainee = connectorToServer->getIdTraineeByLogin(login);
|
int id_trainee = connectorToServer->getIdTraineeByLogin(login);
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
PersonalCardTrainee* cardTrainee = new PersonalCardTrainee(connectorToServer, messangerController, id_trainee, ammTasksWidgetCommon, fimTasksWidgetCommon, this);
|
PersonalCardTrainee* cardTrainee = new PersonalCardTrainee(connectorToServer, messangerController, id_trainee, ammTasksWidgetCommon, fimTasksWidgetCommon, this);
|
||||||
|
|
||||||
dlgCardTrainee = new QDialog(this,
|
dlgCardTrainee = new QDialog(this,
|
||||||
@@ -149,6 +151,10 @@ void ViewerTrainees::on_itemDoubleClicked(QTreeWidgetItem *item, int column)
|
|||||||
dlgCardTrainee->setWindowState(Qt::WindowMaximized);
|
dlgCardTrainee->setWindowState(Qt::WindowMaximized);
|
||||||
dlgCardTrainee->setModal(true);
|
dlgCardTrainee->setModal(true);
|
||||||
dlgCardTrainee->exec();
|
dlgCardTrainee->exec();
|
||||||
|
*/
|
||||||
|
|
||||||
|
dlgCardTrainee = new DialogCardTrainee(connectorToServer, messangerController, id_trainee, ammTasksWidgetCommon, fimTasksWidgetCommon, this);
|
||||||
|
dlgCardTrainee->exec();
|
||||||
|
|
||||||
ammTasksWidgetCommon->setParent(this);
|
ammTasksWidgetCommon->setParent(this);
|
||||||
fimTasksWidgetCommon->setParent(this);
|
fimTasksWidgetCommon->setParent(this);
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
#include "ammtaskswidget.h"
|
#include "ammtaskswidget.h"
|
||||||
#include "fimtaskswidget.h"
|
#include "fimtaskswidget.h"
|
||||||
#include "messangercontroller.h"
|
#include "messangercontroller.h"
|
||||||
|
#include "dialogcardtrainee.h"
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class ViewerTrainees;
|
class ViewerTrainees;
|
||||||
@@ -53,7 +54,7 @@ private:
|
|||||||
MessangerController* messangerController;
|
MessangerController* messangerController;
|
||||||
|
|
||||||
QDialog* dlgEditor;
|
QDialog* dlgEditor;
|
||||||
QDialog* dlgCardTrainee;
|
DialogCardTrainee* dlgCardTrainee;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::ViewerTrainees *ui;
|
Ui::ViewerTrainees *ui;
|
||||||
|
|||||||
Reference in New Issue
Block a user