mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
refact1
This commit is contained in:
100
LibInstructorsAndTrainees/tasks/fimtaskswidget.h
Normal file
100
LibInstructorsAndTrainees/tasks/fimtaskswidget.h
Normal file
@@ -0,0 +1,100 @@
|
||||
#ifndef FIMTASKSWIDGET_H
|
||||
#define FIMTASKSWIDGET_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QTreeWidget>
|
||||
#include "tasksAmmFim.h"
|
||||
#include "connectortoserver.h"
|
||||
#include "tasktreepreparation.h"
|
||||
#include "dialogchekertask.h"
|
||||
#include "waitanimationwidget.h"
|
||||
#include "specialmessagebox.h"
|
||||
|
||||
namespace Ui {
|
||||
class FIMtasksWidget;
|
||||
}
|
||||
|
||||
class FIMtasksWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
private:
|
||||
|
||||
|
||||
public:
|
||||
explicit FIMtasksWidget(ConnectorToServer* connectorToServer, TypeListTreeAMMFIM type, QWidget *parent = nullptr);
|
||||
~FIMtasksWidget();
|
||||
|
||||
public:
|
||||
void deactivate();
|
||||
void setOneTaskFim(TaskAmmFim* task); //FIM
|
||||
void waitAnimationWidgetShowWithPlay();
|
||||
|
||||
public:
|
||||
void resizeEvent(QResizeEvent *event) override;
|
||||
void closeEvent(QCloseEvent *event) override;
|
||||
|
||||
void closeChildDlg();
|
||||
|
||||
protected:
|
||||
void changeEvent(QEvent * event) override;
|
||||
|
||||
private Q_SLOTS:
|
||||
void on_treeWidgetItemClicked(QTreeWidgetItem *item, int column);
|
||||
void on_btnDelete_clicked();
|
||||
void on_btnCheck_clicked();
|
||||
void on_btnAssignTask_clicked();
|
||||
|
||||
public Q_SLOTS:
|
||||
//Слот обработки сигнала необходимости обновления интерфейса
|
||||
void slot_NeedUpdateUI();
|
||||
//слот обработки сигнала о выборе обучаемого
|
||||
void slot_traineeSelected(int id_trainee);
|
||||
|
||||
void slot_UpdateTasksFIMforTrainee(int trainee_id);
|
||||
|
||||
private:
|
||||
void preparationTreeWidget();
|
||||
void reSetHeadTreeWidget();
|
||||
void setWidthColumnsTree();
|
||||
int calculateWidth_0Column();
|
||||
|
||||
void loadTasksFIM();
|
||||
void assignTaskFIMtoTrainee();
|
||||
void updateTaskItem(QTreeWidgetItem *itemTask);
|
||||
|
||||
void setCurrentTask(int id);
|
||||
void setCurrentParentTask(QTreeWidgetItem *item);
|
||||
|
||||
Q_SIGNALS:
|
||||
void signal_prepareFIMListItems(QByteArray array);
|
||||
void signal_prepareFIMListItemsForTrainee(QList<TaskAmmFim> listTask);
|
||||
|
||||
void signal_stopParserPreparation();
|
||||
|
||||
void signal_countTasksFIMforTraineeChanged(int trainee_id, int count);
|
||||
|
||||
public Q_SLOTS:
|
||||
void slot_FIMlistItemsReady(QList<QTreeWidgetItem*> listItems);
|
||||
|
||||
private:
|
||||
Ui::FIMtasksWidget *ui;
|
||||
ConnectorToServer* connectorToServer;
|
||||
QTreeWidget* treeWidget;
|
||||
TypeListTreeAMMFIM type;
|
||||
QList<int> listWidthColumn;
|
||||
|
||||
int idTraineeSelected;
|
||||
|
||||
QThread* threadPreparation;
|
||||
TaskAMMFIMTreePreparation* taskTreePreparation;
|
||||
WaitAnimationWidget *waitAnimationWidget;
|
||||
|
||||
DialogChekerTask* dlgCheckerTask;
|
||||
|
||||
QString userName; //FIM
|
||||
|
||||
int lastCurrentID;
|
||||
};
|
||||
|
||||
#endif // FIMTASKSWIDGET_H
|
||||
Reference in New Issue
Block a user