/** * @RDE_HEADER@ * ParticipantManagement - ParticipantSearchDialog * $Id$ * $HeadURL$ * $Author$ * Created by Christian Ehrlicher, SLSE, 2016-06-13 */ #pragma once //Lts #include #include //#include #include //ParticipantManagement #include #include #include #include // SituationMap #include //DDS #include #include #include //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 &dtc, const std::shared_ptr &ppmGuiIfc, const std::shared_ptr &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 m_participantMap; std::shared_ptr m_dtc; std::shared_ptr m_ppmCbxIfc; std::shared_ptr m_ppmGuiIfc; std::shared_ptr m_ocParticipantInfoIfc; std::shared_ptr m_sitMapGuiIfc; static int s_preselectedParty; static bool s_preselectedAllParticipants; Ui::ParticipantSearchDialog *m_ui; LOGGER_T m_logger; }; } // namespace ParticipantInfo