summaryrefslogtreecommitdiffstats
path: root/line.h
diff options
context:
space:
mode:
authorStefan Suhren <suhren.stefan@fh-swf.de>2015-05-16 23:41:43 +0200
committerStefan Suhren <suhren.stefan@fh-swf.de>2015-05-16 23:41:43 +0200
commit1faecafbc6cc74daa8d0a781c0b54f2c778b04b0 (patch)
tree75e3915d245ead47b0e03ef6b544c714b4145cef /line.h
parent1f1550f77e33bf32eb715eb62dd68751c07f9c0e (diff)
downloadGUI_SS2015-1faecafbc6cc74daa8d0a781c0b54f2c778b04b0.tar.gz
GUI_SS2015-1faecafbc6cc74daa8d0a781c0b54f2c778b04b0.zip
Add 2d drawing for lines.
Diffstat (limited to 'line.h')
-rw-r--r--line.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/line.h b/line.h
new file mode 100644
index 0000000..745f653
--- /dev/null
+++ b/line.h
@@ -0,0 +1,22 @@
+#ifndef LINE_H
+#define LINE_H
+
+#include <QLine>
+#include <QPainter>
+#include <QVector3D>
+
+class Line : public QLine
+{
+public:
+ Line();
+ Line(const Line &other);
+
+ bool isHit(const QPoint & clickPoint);
+ void setSelected(bool selected);
+ void draw(QPainter * painter);
+
+private:
+ bool m_selected;
+};
+
+#endif // LINE_H