/** * @RDE_HEADER@ * TargetManagement - Target Edit Dialog * $Id$ * $HeadURL$ * $Author$ * Created by Norbert Thoden, NLE, 2020-05-29 */ #pragma once #include #include #include #include #include namespace Ui { class ShootbackTargetEdit; } namespace TargetManagement { class TargetParticipantModel; class ShootbackTargetEdit : public LtsWidgets::LtsDialog, protected TargetManagement::Interface::Ftc::ShootbackTargetModifyReplyHandler { Q_OBJECT public: explicit ShootbackTargetEdit(QWidget *parent = nullptr); ~ShootbackTargetEdit(); bool init(const std::shared_ptr &dtc, const std::shared_ptr &ftc, TargetParticipantModel *targetParticipantModel, const ShootbackTarget &target = ShootbackTarget()); //virtual functions from TargetManagement::Interface::Ftc::.. void onShootbackTargetModifyReply(const Core::FunctionReplyObject &replyObject) override { m_requestHelper->requestReply(replyObject); } private Q_SLOTS: void initCmbParticipants(); void onCmbParticipantsChanged(); private: void setData(const ShootbackTarget &target); bool apply() override; void retranslate() override; ShootbackTarget m_target; TargetParticipantModel *m_targetParticipantModel{nullptr}; std::shared_ptr m_dtc; std::shared_ptr m_ftc; LtsUtils::RequestHelper *m_requestHelper{nullptr}; Ui::ShootbackTargetEdit *m_ui{nullptr}; LOGGER_T m_logger; }; } //namespace TargetManagement