/** * @RDE_HEADER@ * ParticipantManagement - ParticipantFollowDialog * $Id$ * $HeadURL$ * $Author$ * Created by Christian Ehrlicher, SLSE, 2016-06-13 */ #pragma once //Lts #include #include //#include #include //ParticipantManagement #include #include #include // SituationMap #include //DDS #include #include #include //Qt namespace Ui { class ParticipantFollowDialog; } namespace ParticipantManagement { // -------------------------------------------------------- // ParticipantFollowDialog // -------------------------------------------------------- class ParticipantFollowDialog : public LtsWidgets::LtsDialog { Q_OBJECT using BaseClass = LtsWidgets::LtsDialog; public: explicit ParticipantFollowDialog(QWidget *parent = nullptr); ~ParticipantFollowDialog(); bool init(LtsSession::LtsSession *session, const std::shared_ptr &dtc, const std::shared_ptr &ppmGuiIfc); void setFollower(const int equipmentNumber, const int participantId); Q_SIGNALS: void newFollowEquipment(const int equipmentNumber, const int participantId); 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 onStartFollowClicked(); void onStopFollowClicked(); void changeParty(); void fillMapFromDtc(); void changeSliderPosition(int equipNo); int onSelectionChanged(); void onDoubleClicked(); void clearSelections(); void fillParticipantMapFromTree(); void fillParticipantMapFromTree(const QModelIndex &parent); void enadisa(); int getEquipmentNumber(const int participantId); 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 m_participantMap; std::shared_ptr m_dtc; std::shared_ptr m_ppmCbxIfc; std::shared_ptr m_ppmGuiIfc; std::shared_ptr m_sitMapGuiIfc; static int s_preselectedParty; static bool s_preselectedAllParticipants; Ui::ParticipantFollowDialog *m_ui; int m_followParticipantId; // 0 = Follow Participant = false int m_followEquipmentNo; LOGGER_T m_logger; }; } // namespace ParticipantInfo