Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/mapentity.cc')
-rw-r--r--src/mapentity.cc51
1 files changed, 51 insertions, 0 deletions
diff --git a/src/mapentity.cc b/src/mapentity.cc
new file mode 100644
index 0000000..516b0b6
--- /dev/null
+++ b/src/mapentity.cc
@@ -0,0 +1,51 @@
+/*
+ mapentity.cc
+ This file is part of the Project::OSiRiON world editor
+ and is distributed under the terms and conditions of
+ the GNU General Public License version 2
+*/
+
+#include <mapentity.h>
+
+#include <QPainter>
+
+namespace editor
+{
+
+MapEntity::MapEntity(QWidget *parent) : QWidget(parent)
+{
+}
+
+void MapEntity::set_label(const QString &label)
+{
+ entity_label = label;
+}
+
+void MapEntity::set_name(const QString &name)
+{
+ entity_name = name;
+}
+
+void MapEntity::set_radius(const float radius)
+{
+ entity_radius = radius;
+
+}
+
+void MapEntity::set_location(const float x, const float y, const float z)
+{
+ entity_location[0] = x;
+ entity_location[1] = y;
+ entity_location[2] = z;
+}
+
+void MapEntity::paintEvent(QPaintEvent *event)
+{
+ QPen pen(Qt::black, 1, Qt::SolidLine);
+ QPainter painter(this);
+
+ painter.setPen(pen);
+ painter.drawRect(0, 0, width() - 1 , height() - 1);
+}
+
+}