/** * @RDE_HEADER@ * Buildings - BuildingsConfigDialog * $Id$ * $HeadURL$ * $Author$ * Created by hjl, SLSE, 2017-04-20 */ #pragma once //Lts #include #include //Buildings #include //DDS #include #include namespace Ui { class BldConfigDialog; } namespace LtsSession { class LtsSession; } namespace Buildings { // -------------------------------------------------------- // BldConfigDialog // -------------------------------------------------------- class BldConfigDialog : public LtsWidgets::LtsDialog , protected Buildings::Interface::Ftc::SetBuildingStatesReplyHandler , protected CentralEffectSimulation::Interface::Ftc::SetOwnershipReplyHandler { Q_OBJECT public: explicit BldConfigDialog(int bldEntityId, const QString &displayName, QWidget *parent = nullptr); ~BldConfigDialog(); bool init(LtsSession::LtsSession *session); void onSetBuildingStatesReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); } void onSetOwnershipReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); } private slots: void slotCmbStatusCurrentIndexChanged(int index); private: void fillCbx(); private: void retranslate() override; bool apply() override final; int m_bldEntityId = 0; QString m_displayName; std::shared_ptr m_ftc; std::shared_ptr m_cesFtc; Buildings::BuildingState m_bldState; LtsUtils::RequestHelper *m_requestHelper = nullptr; Ui::BldConfigDialog *m_ui = nullptr; LOGGER_T m_logger; }; } // namespace Buildings