110 lines
3.2 KiB
C++
Executable File
110 lines
3.2 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* ResourceManangement - Plan Dialog
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <LtsWidgets/lts_dialog.h>
|
|
#include <LtsUtilsGuiDds/request_helper.h>
|
|
#include <InfrastructureManagement/ism_dtc.h>
|
|
#include <InfrastructureManagement/ism_ftc.h>
|
|
#include <InfrastructureManagement/ism_resource_management_gui_plugin_interface.h>
|
|
#include <InfrastructureManagement/ism_combobox_gui_plugin_interface.h>
|
|
#include <Plugins/InfrastructureManagement/Data/ism_data_plugin.h>
|
|
|
|
namespace Ui
|
|
{
|
|
class PlanDialog;
|
|
}
|
|
namespace LtsSession
|
|
{
|
|
class LtsSession;
|
|
}
|
|
namespace NGL
|
|
{
|
|
class INGLLogger;
|
|
}
|
|
|
|
namespace InfrastructureManagement
|
|
{
|
|
|
|
class ForeignResourceManagementGuiInterface;
|
|
class PlanDialogModel;
|
|
|
|
class PlanDialog
|
|
: public LtsWidgets::LtsDialog
|
|
, protected Interface::Ftc::MainScheduleRemoveReplyHandler
|
|
, protected Interface::Ftc::MainScheduleModifyReplyHandler
|
|
, protected Interface::Ftc::MainScheduleCopyReplyHandler
|
|
, protected Interface::Ftc::InstrumentationAssetModifyReplyHandler
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit PlanDialog(const QString &menuGroup, LtsSession::LtsSession *session, QWidget *parent = nullptr);
|
|
~PlanDialog();
|
|
|
|
bool init(int scheduleId, const std::shared_ptr<Interface::Dtc> &dtc, const std::shared_ptr<Interface::Ftc> &ftc,
|
|
const std::shared_ptr<ForeignGuiComboboxInterface> &ismGuiCbx,
|
|
const std::shared_ptr<ForeignDataInterface> &dataInterface,
|
|
ForeignResourceManagementGuiInterface *ismGuiIfc);
|
|
void setScheduleId(const int scheduleId);
|
|
|
|
protected:
|
|
void onMainScheduleRemoveReply(const Core::FunctionReplyObject &replyObject) override final
|
|
{
|
|
m_requestHelper->requestReply(replyObject);
|
|
}
|
|
void onMainScheduleModifyReply(const Core::FunctionReplyObject &replyObject) override final
|
|
{
|
|
m_requestHelper->requestReply(replyObject);
|
|
}
|
|
void onMainScheduleCopyReply(const Core::FunctionReplyObject &replyObject) override final
|
|
{
|
|
m_requestHelper->requestReply(replyObject);
|
|
}
|
|
void onInstrumentationAssetModifyReply(const Core::FunctionReplyObject &replyObject) override final
|
|
{
|
|
m_requestHelper->requestReply(replyObject);
|
|
}
|
|
|
|
private slots:
|
|
void onPrint();
|
|
/**
|
|
* @brief onRemove removes all selected plans from the database.
|
|
*/
|
|
void onRemove();
|
|
void onLoad();
|
|
void enaDisa();
|
|
void onEdit();
|
|
void onAdd();
|
|
void onCopy();
|
|
void onCheck();
|
|
void onMainScheduleChanged(const MainSchedule &data, DataModification modType);
|
|
void onScheduleIdchanged(int32_t id);
|
|
|
|
private:
|
|
void retranslate() override;
|
|
void tableColumnOrganiserSetting() override;
|
|
|
|
LtsSession::LtsSession *m_session{nullptr};
|
|
PlanDialogModel *m_model{nullptr};
|
|
QString m_menuGroup;
|
|
std::shared_ptr<Interface::Dtc> m_dtc{nullptr};
|
|
std::shared_ptr<Interface::Ftc> m_ftc{nullptr};
|
|
std::shared_ptr<ForeignGuiComboboxInterface> m_ismGuiCbx{nullptr};
|
|
ForeignResourceManagementGuiInterface *m_ismGuiIfc{nullptr};
|
|
std::shared_ptr<ForeignDataInterface> m_dataIfc{nullptr};
|
|
|
|
LtsUtils::RequestHelper *m_requestHelper{nullptr};
|
|
int m_scheduleId{-1};
|
|
Ui::PlanDialog *m_ui{nullptr};
|
|
NGL::INGLLogger &m_logger;
|
|
};
|
|
|
|
} // namespace InfrastructureManagement
|