#ifndef TRAINEESWIDGET_H
#define TRAINEESWIDGET_H

#include "traineesview.h"
#include "ammtaskswidget.h"
#include "fimtaskswidget.h"
#include "messangercontroller.h"

namespace Ui {
class ViewerTrainees;
}

//Виджет только для просмотра БД Обучаемых

class ViewerTrainees : public TraineesView
{
    Q_OBJECT

public:
    explicit ViewerTrainees(ConnectorToServer* connectorToServer, MessangerController* messangerController, QWidget *parent = nullptr);
    ~ViewerTrainees();

public:
    void setAuthComplited(bool authComplited);

    void deactivate();

protected:
    void changeEvent(QEvent * event) override;

Q_SIGNALS:
    //сигнал о блокировке авторизации
    void signal_BlockAutorization(bool block);

public Q_SLOTS:
    //void on_treeWidget_itemClicked(QTreeWidgetItem *item, int column);
    void on_btnEditorTrainees_clicked();
private Q_SLOTS:
    void on_itemDoubleClicked(QTreeWidgetItem *item, int column);
    void on_treeWidget_itemClicked(QTreeWidgetItem *item, int column);

Q_SIGNALS:
    //сигнал о выборе обучаемого
    void signal_traineeSelected(int id_trainee);

private:
    void updateButtons() override;

private:
    //AMMtasksWidget* ammTasksWidget_pers0;
    //FIMtasksWidget* fimTasksWidget_pers0;

    AMMtasksWidget* ammTasksWidgetCommon;
    FIMtasksWidget* fimTasksWidgetCommon;

    MessangerController* messangerController;

private:
    Ui::ViewerTrainees *ui;
};

#endif // TRAINEESWIDGET_H
