#pragma once #include #include namespace Slic3r { class MachineObject; class DevChamber { public: static std::shared_ptr Create(MachineObject *obj) { return std::shared_ptr( new DevChamber(obj)); } public: // getter bool HasChamber() const; bool SupportChamberTempDisplay() const; bool SupportChamberEdit() const; int GetChamberTempEditMin() const; int GetChamberTempEditMax() const; int GetChamberTempSwitchHeat() const; float GetChamberTemp() const { return m_temp; }; float GetChamberTempTarget() const { return m_temp_target; }; public: // setter void ParseChamber(const nlohmann::json &print_json); void ParseChamberV1_0(const nlohmann::json& print_json); void ParseChamberV2_0(const nlohmann::json& print_json); // control int CtrlSetChamberTemp(int temp); protected: DevChamber(MachineObject *obj) : m_owner(obj) {} private: float m_temp = 0.0f; float m_temp_target = 0.0f; MachineObject* m_owner = nullptr; }; } // namespace Slic3r