Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
Executable
+73
@@ -0,0 +1,73 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* GUI Plugin for SAA
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Steve Kemayou, ESZS, 2025-10-15
|
||||
*/
|
||||
|
||||
#include "saa_gui_plugin.h"
|
||||
#include <LtsWidgets/lts_dialog.h>
|
||||
#include <AreaEffectSimulation/aes_operator_rights.h>
|
||||
#include <LtsSession/lts_session.h>
|
||||
#include <LtsSession/lts_session_data.h>
|
||||
#include <LtsUtilsSettings/settings.h>
|
||||
#include <ParticipantManagement/ppm_data_plugin_interface.h>
|
||||
#include <Plugins/AssetManagement/asm_data_plugin_interface.h>
|
||||
#include <SAAChooser/saa_chooser.h>
|
||||
#include <SAAs/Common/logger.h>
|
||||
#include <QProcess>
|
||||
|
||||
namespace SAAInterfaceAdapterAdler
|
||||
{
|
||||
|
||||
std::shared_ptr<GuiPluginBase::Interface> GuiPlugin::createGuiInterface(LtsSession::LtsSession *session)
|
||||
{
|
||||
return std::make_shared<InterfaceImpl>(session);
|
||||
}
|
||||
|
||||
InterfaceImpl::InterfaceImpl(LtsSession::LtsSession *session)
|
||||
: GuiPluginBase::Interface(session, getLogger("SAAInterfaceGuiPlugin"))
|
||||
{
|
||||
}
|
||||
|
||||
QVector<LtsWidgets::PluginData> InterfaceImpl::getActions()
|
||||
{
|
||||
QVector<LtsWidgets::PluginData> ret;
|
||||
LtsWidgets::PluginData plData;
|
||||
plData.menuText = tr("SAAs");
|
||||
plData.menuIcon = QIcon(QLatin1String("icon:saa_remote_desktop.svg"));
|
||||
plData.identifier = QLatin1String("SaaList");
|
||||
plData.layoutArea = LtsWidgets::LayoutArea::eDialogTab;
|
||||
plData.operatorRight = OperatorRights::AdlerAdministration::AdlerAdministrationShow;
|
||||
plData.exercisePart = LtsWidgets::ExercisePart::eSpecial;
|
||||
plData.menuGroup = tr("SAA");
|
||||
plData.createWidgetFunc = [this](QWidget * parent)
|
||||
{
|
||||
return onShowSaaChooser(parent);
|
||||
};
|
||||
ret.append(plData);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool InterfaceImpl::fetchInterfaces()
|
||||
{
|
||||
return m_session->getDtc<AssetManagement::DataInterface>(m_asmDtc);
|
||||
}
|
||||
|
||||
void InterfaceImpl::clearInterfaces()
|
||||
{
|
||||
m_asmDtc = nullptr;
|
||||
}
|
||||
|
||||
LtsWidgets::LtsDialog *InterfaceImpl::onShowSaaChooser(QWidget *parent)
|
||||
{
|
||||
SaaChooser *dialog = new SaaChooser(parent);
|
||||
dialog->init(m_session);
|
||||
return dialog;
|
||||
}
|
||||
|
||||
}
|
||||
// namespace SAAInterfaceAdapterAdler
|
||||
Reference in new issue
Block a user