Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
@@ -0,0 +1,74 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Buildings - BuildingsConfigDialog
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by hjl, SLSE, 2017-04-20
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
//Lts
|
||||
#include <LtsWidgets/lts_dialog.h>
|
||||
#include <LtsUtilsGuiDds/request_helper.h>
|
||||
|
||||
//Buildings
|
||||
#include <Buildings/logger.h>
|
||||
|
||||
//DDS
|
||||
#include <Plugins/Buildings/bld_data_plugin_interface.h>
|
||||
#include <Plugins/CentralEffectSimulation/ces_data_plugin_interface.h>
|
||||
|
||||
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<Buildings::Interface::Ftc> m_ftc;
|
||||
std::shared_ptr<CentralEffectSimulation::Interface::Ftc> m_cesFtc;
|
||||
|
||||
Buildings::BuildingState m_bldState;
|
||||
LtsUtils::RequestHelper *m_requestHelper = nullptr;
|
||||
|
||||
Ui::BldConfigDialog *m_ui = nullptr;
|
||||
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
} // namespace Buildings
|
||||
Reference in new issue
Block a user