80 lines
2.2 KiB
C++
Executable File
80 lines
2.2 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* GUI Plugin for IED- Info
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Philipp Dassow, SLEA, 2017-08-23
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
// Lts
|
|
#include <LtsWidgets/lts_dialog.h>
|
|
#include <LtsSession/lts_session.h>
|
|
|
|
// Logger
|
|
#include <GuezIedManagement/logger.h>
|
|
|
|
// Plugins
|
|
#include <Plugins/AdvancedSymbology/asb_data_plugin_interface.h>
|
|
#include <Plugins/GuezIedManagement/gim_data_plugin_interface.h>
|
|
#include <Plugins/SituationMapPlugin/situation_map_gui_plugin_interface.h>
|
|
#include <Plugins/ParticipantManagement/ppm_data_plugin_interface.h>
|
|
|
|
namespace Ui {
|
|
class InfoDialog;
|
|
}
|
|
class QTableWidgetItem;
|
|
|
|
|
|
|
|
namespace GuezIedManagement
|
|
{
|
|
|
|
// --------------------------------------------------------
|
|
// BuildingInfoDialog
|
|
// --------------------------------------------------------
|
|
class InfoDialog : public LtsWidgets::LtsDialog
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit InfoDialog(int iedEntityId, QWidget *parent = nullptr);
|
|
~InfoDialog();
|
|
|
|
bool init(LtsSession::LtsSession *session,
|
|
const std::shared_ptr<GuezIedManagement::Interface::Dtc> &dtc,
|
|
const std::shared_ptr<ParticipantManagement::Interface::Dtc> &ppmDtc,
|
|
const std::shared_ptr<SituationMap::ForeignGuiInterface> &situationIfc,
|
|
const std::shared_ptr<AdvancedSymbology::ForeignDataInterface> &asbIfc);
|
|
|
|
private:
|
|
void retranslate() override;
|
|
void showIedInfos();
|
|
void setPosition(const IedPosition &pos);
|
|
void updateIcon(const QColor &color, AdvancedSymbology::Role role,
|
|
const IedTacticalState &state, const QString &sidc);
|
|
|
|
private Q_SLOTS:
|
|
void onFindOnMap();
|
|
void onIedChanged(const Ied &data, DataModification modType);
|
|
void onIedPositionChanged(const IedPosition &data, DataModification modType);
|
|
|
|
private:
|
|
void addTbwBitEntry(QTableWidgetItem* device, QTableWidgetItem* error);
|
|
|
|
int m_iedEntityId;
|
|
|
|
LtsSession::LtsSession *m_session;
|
|
std::shared_ptr<GuezIedManagement::Interface::Dtc> m_dtc;
|
|
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_ppmDtc;
|
|
std::shared_ptr<SituationMap::ForeignGuiInterface> m_situationIfc;
|
|
std::shared_ptr<AdvancedSymbology::ForeignDataInterface> m_asbIfc;
|
|
AdvancedSymbology::SymbolResultWatcherLabel *m_symbolWatcher;
|
|
|
|
Ui::InfoDialog* m_ui;
|
|
LOGGER_T m_logger;
|
|
};
|
|
} // namespace Buildings
|