Files
qt5-legatus-legacy/Lts/Plugins/ParticipantManagement/Gui/PpmComboBox/ppm_combobox_gui_plugin.cpp
T
2026-08-13 18:33:10 +02:00

47 lines
1.2 KiB
C++
Executable File

/**
* @RDE_HEADER@
* GUI Plugin for ParticipantManagement - PpmComboBox
* $Id$
* $HeadURL$
* $Author$
* Created by Patric Karwat, SLSE, 2016-09-12
*/
#include "ppm_combobox_gui_plugin.h"
#include "ppm_party_selector.h"
#include <ParticipantManagement/logger.h>
#include <ParticipantManagement/ppm_translation.h>
#include <LtsSession/lts_session_data.h>
namespace ParticipantManagement
{
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("Plugins.Gui.Ppm.PpmCombobox"))
{}
bool InterfaceImpl::fetchInterfaces()
{
std::shared_ptr<ParticipantManagement::Interface::Dtc> dtc;
if (!m_session->getDtc<ParticipantManagement::DataInterface>(dtc))
return false;
return ForeignGuiComboboxInterfaceImpl::init(dtc);
}
void InterfaceImpl::clearInterfaces()
{
ForeignGuiComboboxInterfaceImpl::uninit();
}
QVector<int> InterfaceImpl::visibleParties() const
{
return LtsSessionData::LtsSessionData::getInstance()->getVisibleParties(m_session->exerciseId());
}
} // namespace ProjectDataManagement