From 9e7b304351872f0d1c1fb7cc5af7e8bc3c7df678 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 25 Feb 2012 18:45:02 +0000 Subject: Added support for entity templates. --- src/entityproperties.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'src/entityproperties.h') diff --git a/src/entityproperties.h b/src/entityproperties.h index 9a276cb..6fc3d5b 100644 --- a/src/entityproperties.h +++ b/src/entityproperties.h @@ -63,6 +63,22 @@ public: inline const QString & subsections() const { return properties_subsections; } + + /** + * @brief returns the template type of this object + * 0 = normal template from templates.ini + * 1 = ship templatefrom ships.ini + * */ + inline const int template_type() const { + return properties_template_type; + } + + /** + * @brief returns the template label of this object + * */ + inline const QString &template_label() const { + return properties_template_label; + } /* ---- mutators ---- */ @@ -132,6 +148,24 @@ public: properties_angles.assign(yaw, pitch, roll); } + /** + * @brief set the object template + * @param template_type 0 = template, 1 = ship + * @param template_label label of the template to be used + * */ + inline void set_template(const int template_type, const QString &template_label) { + properties_template_type = template_type; + properties_template_label = template_label; + } + + inline void set_template_type(const int template_type) { + properties_template_type = template_type; + } + + inline void set_template_label(const QString &template_label) { + properties_template_label = template_label; + } + private: float properties_radius; @@ -139,6 +173,9 @@ private: QString properties_type; Vector3f properties_angles; + + int properties_template_type; + QString properties_template_label; }; } // namespace editor -- cgit v1.2.3