src/editmodes/lineLoopMode.h

Wed, 03 Sep 2014 01:28:58 +0300

author
Teemu Piippo <crimsondusk64@gmail.com>
date
Wed, 03 Sep 2014 01:28:58 +0300
changeset 875
ce8e9b37d44f
parent 874
ba75c789667e
permissions
-rw-r--r--

- finished line loop mode
- enter and backspace keys may now be used with the draw modes

874
ba75c789667e - added line loop mode (doesn't actually create anything yet)
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
1 #pragma once
ba75c789667e - added line loop mode (doesn't actually create anything yet)
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
2 #include "abstractEditMode.h"
ba75c789667e - added line loop mode (doesn't actually create anything yet)
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
3
ba75c789667e - added line loop mode (doesn't actually create anything yet)
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
4 class LineLoopMode : public AbstractDrawMode
ba75c789667e - added line loop mode (doesn't actually create anything yet)
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
5 {
ba75c789667e - added line loop mode (doesn't actually create anything yet)
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
6 DEFINE_CLASS (LineLoopMode, AbstractDrawMode)
ba75c789667e - added line loop mode (doesn't actually create anything yet)
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
7
ba75c789667e - added line loop mode (doesn't actually create anything yet)
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
8 public:
ba75c789667e - added line loop mode (doesn't actually create anything yet)
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
9 LineLoopMode (GLRenderer* renderer);
ba75c789667e - added line loop mode (doesn't actually create anything yet)
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
10
ba75c789667e - added line loop mode (doesn't actually create anything yet)
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
11 void render (QPainter& painter) const override;
ba75c789667e - added line loop mode (doesn't actually create anything yet)
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
12 EditModeType type() const override { return EditModeType::LineLoop; }
ba75c789667e - added line loop mode (doesn't actually create anything yet)
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
13 bool mouseReleased (MouseEventData const& data) override;
875
ce8e9b37d44f - finished line loop mode
Teemu Piippo <crimsondusk64@gmail.com>
parents: 874
diff changeset
14 bool preAddVertex (Vertex const& pos) override;
ce8e9b37d44f - finished line loop mode
Teemu Piippo <crimsondusk64@gmail.com>
parents: 874
diff changeset
15 bool keyReleased (QKeyEvent*) override;
ce8e9b37d44f - finished line loop mode
Teemu Piippo <crimsondusk64@gmail.com>
parents: 874
diff changeset
16 void endDraw();
874
ba75c789667e - added line loop mode (doesn't actually create anything yet)
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
17 };
ba75c789667e - added line loop mode (doesn't actually create anything yet)
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
18

mercurial