101 lines
3.0 KiB
C++
Executable File
101 lines
3.0 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* ParticipantManagement - ParticipantSearchDialog
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Christian Ehrlicher, SLSE, 2016-06-13
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
//Lts
|
|
#include <LtsWidgets/lts_dialog.h>
|
|
#include <LtsWidgets/lts_frameless_dialog.h>
|
|
//#include <LtsUtilsGuiDds/request_helper.h>
|
|
#include <LtsSession/lts_session.h>
|
|
|
|
//ParticipantManagement
|
|
#include <ParticipantManagement/logger.h>
|
|
#include <Plugins/ParticipantManagement/Gui/Common/participant_edit_model.h>
|
|
#include <ParticipantManagement/ppm_participant_info_gui_plugin_interface.h>
|
|
#include <Plugins/OcSituationClient/osc_participant_info_gui_plugin_interface.h>
|
|
// SituationMap
|
|
#include <Plugins/SituationMapPlugin/situation_map_gui_plugin_interface.h>
|
|
|
|
//DDS
|
|
#include <PluginInterfaces/gui_plugin_interface.h>
|
|
#include <ParticipantManagement/ppm_dtc.h>
|
|
#include <Plugins/ParticipantManagement/ppm_gui_combobox_plugin_interface.h>
|
|
|
|
//Qt
|
|
|
|
namespace Ui
|
|
{
|
|
class ParticipantSearchDialog;
|
|
}
|
|
|
|
namespace ParticipantManagement
|
|
{
|
|
// --------------------------------------------------------
|
|
// ParticipantSearchDialog
|
|
// --------------------------------------------------------
|
|
class ParticipantSearchDialog : public LtsWidgets::LtsDialog
|
|
{
|
|
Q_OBJECT
|
|
|
|
using BaseClass = LtsWidgets::LtsDialog;
|
|
|
|
public:
|
|
explicit ParticipantSearchDialog(QWidget *parent = nullptr);
|
|
~ParticipantSearchDialog();
|
|
|
|
bool init(LtsSession::LtsSession *session,
|
|
const std::shared_ptr<Interface::Dtc> &dtc,
|
|
const std::shared_ptr<ForeignParticipantInfoGuiInterface> &ppmGuiIfc,
|
|
const std::shared_ptr<OcSituationClient::ForeignParticipantInfoGuiInterface> &ppmOcGuiIfc);
|
|
|
|
private slots:
|
|
void slotLookup();
|
|
void updateObjectIndicator();
|
|
void enterEvent(QEvent *e) override;
|
|
void leaveEvent(QEvent *e) override;
|
|
|
|
private:
|
|
void retranslate() override;
|
|
int changeLabelText(int value);
|
|
void onClicked();
|
|
void changeParty();
|
|
void fillMapFromDtc();
|
|
void changeSliderPosition(int equipNo);
|
|
int onSelectionChanged();
|
|
void onDoubleClicked();
|
|
void clearSelections();
|
|
|
|
void fillParticipantMapFromTree();
|
|
void fillParticipantMapFromTree(const QModelIndex &parent);
|
|
|
|
ParticipantEditModel *m_model;
|
|
int m_equipNo;
|
|
|
|
// ObjectIndicator: (ObjectIndicator schould not be updated to much, don`t know why...)
|
|
QTimer *m_updateObjectIndicator = nullptr;
|
|
|
|
|
|
// EquipNo, ParticipantId, QMap as it must be sorted, see changeSliderPosition()
|
|
QMap<int, int> m_participantMap;
|
|
|
|
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_dtc;
|
|
std::shared_ptr<ParticipantManagement::ForeignGuiComboboxInterface> m_ppmCbxIfc;
|
|
std::shared_ptr<ForeignParticipantInfoGuiInterface> m_ppmGuiIfc;
|
|
std::shared_ptr<OcSituationClient::ForeignParticipantInfoGuiInterface> m_ocParticipantInfoIfc;
|
|
|
|
std::shared_ptr<SituationMap::ForeignGuiInterface> m_sitMapGuiIfc;
|
|
|
|
static int s_preselectedParty;
|
|
static bool s_preselectedAllParticipants;
|
|
Ui::ParticipantSearchDialog *m_ui;
|
|
LOGGER_T m_logger;
|
|
};
|
|
} // namespace ParticipantInfo
|