Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/mapwidget.h')
-rw-r--r--src/mapwidget.h25
1 files changed, 20 insertions, 5 deletions
diff --git a/src/mapwidget.h b/src/mapwidget.h
index 5bc3cb2..531eb4d 100644
--- a/src/mapwidget.h
+++ b/src/mapwidget.h
@@ -14,7 +14,7 @@
namespace editor
{
-class MapEntity;
+class EntityWidget;
/**
* @brief MapWidget shows the zone map with the blue grid line
@@ -29,7 +29,7 @@ public:
/**
* @brief add an entity to the map
* */
- MapEntity *addEntity();
+ EntityWidget *addEntity();
protected:
@@ -62,12 +62,17 @@ protected:
* @brief handle mousewheel events
* */
virtual void wheelEvent(QWheelEvent *event);
+
+ /**
+ * @brief handle keypress events
+ * */
+ virtual void keyPressEvent(QKeyEvent *event);
signals:
/**
* @brief the selected() signal is emitted if an entity on the map is selected
* */
- void selected(MapEntity *entity);
+ void selected(EntityWidget *entity);
public slots:
/**
@@ -80,7 +85,17 @@ private slots:
/**
* @brief called when an entity on the map has been clicked
* */
- void select(MapEntity *entity);
+ void select(EntityWidget *entity);
+
+ /**
+ * @brief clear current selection
+ * */
+ void deselect();
+
+ /**
+ * @brief entity is dragged
+ * */
+ void dragEntity(EntityWidget *entity, int x, int y);
private:
int mapwidget_zoom;
@@ -92,7 +107,7 @@ private:
bool is_dragging;
- QList<MapEntity *> mapwidget_enties;
+ QList<EntityWidget *> mapwidget_enties;
};
}