Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
+122
@@ -0,0 +1,122 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* GUI Plugin for ResourceManangement
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*
|
||||
* Created by Mike Wille, SLSE, 2016-11-02
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <PluginInterfaces/gui_plugin_interface.h>
|
||||
|
||||
// TODO: forward decls ?
|
||||
#include <Plugins/AudioVideoManagement/avm_data_plugin_interface.h>
|
||||
#include <Plugins/InfrastructureManagement/Data/ism_data_plugin.h>
|
||||
#include <Plugins/InfrastructureManagement/ism_resource_management_gui_plugin_interface.h>
|
||||
#include <Plugins/SituationMapPlugin/situation_map_gui_plugin_interface.h>
|
||||
|
||||
/*
|
||||
// TODO: forward decls ?
|
||||
#include <Plugins/AssetManagement/asm_data_plugin_interface.h>
|
||||
#include <Plugins/ProjectDataManagement/pdm_data_plugin_interface.h>
|
||||
*/
|
||||
|
||||
namespace LtsUtils
|
||||
{
|
||||
class RequestHelper;
|
||||
}
|
||||
|
||||
namespace LtsNotification { class LtsNotification; }
|
||||
|
||||
|
||||
namespace InfrastructureManagement
|
||||
{
|
||||
|
||||
class GuiPlugin final : public QObject, public GuiPluginBase::Plugin
|
||||
{
|
||||
Q_PLUGIN_METADATA(IID "gui:3:ism.res")
|
||||
Q_INTERFACES(GuiPluginBase::Plugin)
|
||||
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit GuiPlugin() = default;
|
||||
~GuiPlugin() = default;
|
||||
|
||||
QString pluginName() override { return ForeignResourceManagementGuiInterface::pluginName(); }
|
||||
std::shared_ptr<GuiPluginBase::Interface> createGuiInterface(LtsSession::LtsSession *session) override;
|
||||
bool availableInPartition(IDL::PartitionType partition) const override
|
||||
{
|
||||
return partition == IDL::PartitionType::Exercise ||
|
||||
partition == IDL::PartitionType::Global ||
|
||||
partition == IDL::PartitionType::Replay;
|
||||
}
|
||||
};
|
||||
|
||||
class MountingPointSelector;
|
||||
|
||||
class InterfaceImpl final
|
||||
: public QObject
|
||||
, public ForeignResourceManagementGuiInterface
|
||||
, public GuiPluginBase::Interface
|
||||
, protected InfrastructureManagement::Interface::Ftc::MainScheduleModifyReplyHandler
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit InterfaceImpl(LtsSession::LtsSession *session);
|
||||
|
||||
QString menuGroup() const override { return tr("Resource Management"); }
|
||||
bool fetchInterfaces() override;
|
||||
void clearInterfaces() override;
|
||||
QVector<LtsWidgets::PluginData> getActions() override;
|
||||
|
||||
// be able to show plan chooser
|
||||
int executionPriority() const override { return 9999; }
|
||||
void executePayload(LtsWidgets::LtsBackgroundWidget *mainBackground) override;
|
||||
|
||||
void setPlanId(const int planId) override final;
|
||||
int getPlanId() const override final;
|
||||
|
||||
bool isInSelectionMode() const override final;
|
||||
void setSelector(MountingPointSelector *selector) override final;
|
||||
void addToSelection(int32_t mountingPointId) override final;
|
||||
void addToSelection(const QVector<int32_t> &simIds) override final;
|
||||
void showMountingPointInfoWindows(const QVector<int32_t> &entityIds, bool force = false) override final;
|
||||
|
||||
private: // methods
|
||||
LtsWidgets::LtsDialog *slotShowPlanDialog(QWidget *parent);
|
||||
LtsWidgets::LtsDialog *slotShowOverviewDialog(QWidget *parent);
|
||||
LtsWidgets::LtsDialog *slotShowAssetListDialog(QWidget *parent);
|
||||
LtsWidgets::LtsDialog *slotShowMountingPointListDialog(QWidget *parent);
|
||||
LtsWidgets::LtsDialog *slotShowApproachingPointsDialog(QWidget *parent);
|
||||
// LtsWidgets::LtsDialog *slotShowPlanTimeLineDialog(QWidget *parent);
|
||||
LtsWidgets::LtsDialog *slotAddPlanDialog(QWidget *parent);
|
||||
LtsWidgets::LtsDialog *slotShowMntpCompletenessCheckDialog(QWidget *parent);
|
||||
|
||||
void onMainScheduleModifyReply(const Core::FunctionReplyObject &replyObject) override final;
|
||||
|
||||
private: // attributes
|
||||
// std::shared_ptr<InfrastructureManagement::Interface::Dtc> m_dtc;
|
||||
// std::shared_ptr<InfrastructureManagement::Interface::Ftc> m_ftc;
|
||||
// std::shared_ptr<InfrastructureManagement::ForeignDataInterface> m_ismIfc;
|
||||
std::shared_ptr<AudioVideoManagement::ForeignDataInterface> m_avmIfc;
|
||||
std::shared_ptr<SituationMap::ForeignGuiInterface> m_sitmapGuiIfc;
|
||||
int m_planId;
|
||||
LtsUtils::RequestHelper *m_requestHelper{nullptr};
|
||||
MountingPointSelector *m_mountingPointSelector{nullptr};
|
||||
LtsNotification::LtsNotification *m_notiResourceManagerMode{nullptr};
|
||||
|
||||
signals:
|
||||
void signalSuccess();
|
||||
|
||||
private slots:
|
||||
void slotOnSessionReady();
|
||||
void slotOnMapReady();
|
||||
void slotSelectPlan(int planId);
|
||||
void slotNewPlan();
|
||||
void onResourceManagerModeChanged(SituationMap::ResourceManagerMode newMode);
|
||||
};
|
||||
|
||||
} // namespace InfrastructureManagement
|
||||
Reference in new issue
Block a user