Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
@@ -0,0 +1,91 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Gui Plugin for ExerciseManangement
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Christian Ehrlicher, SLSE, 2016-02-29
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <ExerciseManagement/logger.h>
|
||||
|
||||
#include <PluginInterfaces/gui_plugin_interface.h>
|
||||
#include <Common/ProjectConfig/project_defines.h>
|
||||
#include <Plugins/ExerciseManagement/exm_data_plugin_interface.h>
|
||||
#include <Plugins/ExerciseManagement/exm_gui_plugin_interface.h>
|
||||
#include <Plugins/AssetManagement/asm_data_plugin_interface.h>
|
||||
#include <Plugins/ProjectDataManagement/pdm_data_plugin_interface.h>
|
||||
#include <Plugins/SituationReplayManagement/srm_data_plugin_interface.h>
|
||||
|
||||
|
||||
namespace ExerciseManagement
|
||||
{
|
||||
|
||||
class GuiPlugin final : public QObject, public GuiPluginBase::Plugin
|
||||
{
|
||||
Q_PLUGIN_METADATA(IID "gui:3:exm")
|
||||
Q_INTERFACES(GuiPluginBase::Plugin)
|
||||
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit GuiPlugin() = default;
|
||||
~GuiPlugin() = default;
|
||||
|
||||
QString pluginName() override { return QLatin1String("ExerciseManagementGuiPlugin"); }
|
||||
std::shared_ptr<GuiPluginBase::Interface> createGuiInterface(LtsSession::LtsSession *session) override;
|
||||
bool availableInPartition(IDL::PartitionType partition) const override
|
||||
{
|
||||
return partition == IDL::PartitionType::Global ||
|
||||
partition == IDL::PartitionType::Exercise;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class InterfaceImpl final : public QObject, public GuiPluginBase::Interface // TODO: ExerciseChooser to own plugin! Not everyone needs to edit the Exercise !
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit InterfaceImpl(LtsSession::LtsSession *session);
|
||||
|
||||
QVector<LtsWidgets::PluginData> getActions() override;
|
||||
QString menuGroup() const override { return tr("Exercises"); }
|
||||
// LtsUtils::LtsTranslatableIdentifier menuGroupIdentifier() const override
|
||||
// { return LtsUtils::LtsTranslatableIdentifier(QStringLiteral("Exercises"), this, "Exercises"); }
|
||||
bool fetchInterfaces() override;
|
||||
void clearInterfaces() override;
|
||||
bool availableInPartition(IDL::PartitionType partition) const override
|
||||
{
|
||||
return partition == IDL::PartitionType::Global ||
|
||||
partition == IDL::PartitionType::Exercise;
|
||||
}
|
||||
|
||||
// be able to show exercise chooser
|
||||
int executionPriority() const override { return 2; /* after opm settings (1) */ }
|
||||
void executePayload(LtsWidgets::LtsBackgroundWidget *mainBackground) override;
|
||||
|
||||
private:
|
||||
LtsWidgets::LtsDialog *onShowExerciseManagementDialog(QWidget *parent);
|
||||
LtsWidgets::LtsDialog *onShowExerciseManagementExercisePurpose(QWidget *parent);
|
||||
LtsWidgets::LtsDialog *onShowExerciseManagementStateEdit(QWidget *parent);
|
||||
LtsWidgets::LtsDialog *onShowExerciseManagementPhaseEdit(QWidget *parent);
|
||||
LtsWidgets::LtsDialog *onShowExerciseManagementOperatorEdit(QWidget *parent);
|
||||
void selectExerciseStep2(const Exercise &exc);
|
||||
void checkNeedRecalcMgrsSquares(int exerciseId);
|
||||
void checkNeedRecalcMgrsSquares(const Exercise &exc);
|
||||
|
||||
std::shared_ptr<ExerciseManagement::Interface::Dtc> m_dtc;
|
||||
std::shared_ptr<AssetManagement::Interface::Dtc> m_asmDtc;
|
||||
LtsWidgets::LtsBackgroundWidget *m_mainBackground;
|
||||
|
||||
signals:
|
||||
void signalSuccess();
|
||||
|
||||
private slots:
|
||||
void slotSelectExercise(int partitionId);
|
||||
void executePayloadStep2();
|
||||
|
||||
};
|
||||
|
||||
} // namespace ExerciseManagement
|
||||
Reference in new issue
Block a user