src/editmodes/selectmode.h

Sat, 05 Jul 2014 01:45:32 +0300

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Sat, 05 Jul 2014 01:45:32 +0300
changeset 829
bb903e89e23c
parent 827
82469b40567e
permissions
-rw-r--r--

- now with license headers

829
bb903e89e23c - now with license headers
Santeri Piippo <crimsondusk64@gmail.com>
parents: 827
diff changeset
1 /*
bb903e89e23c - now with license headers
Santeri Piippo <crimsondusk64@gmail.com>
parents: 827
diff changeset
2 * LDForge: LDraw parts authoring CAD
bb903e89e23c - now with license headers
Santeri Piippo <crimsondusk64@gmail.com>
parents: 827
diff changeset
3 * Copyright (C) 2013, 2014 Santeri Piippo
bb903e89e23c - now with license headers
Santeri Piippo <crimsondusk64@gmail.com>
parents: 827
diff changeset
4 *
bb903e89e23c - now with license headers
Santeri Piippo <crimsondusk64@gmail.com>
parents: 827
diff changeset
5 * This program is free software: you can redistribute it and/or modify
bb903e89e23c - now with license headers
Santeri Piippo <crimsondusk64@gmail.com>
parents: 827
diff changeset
6 * it under the terms of the GNU General Public License as published by
bb903e89e23c - now with license headers
Santeri Piippo <crimsondusk64@gmail.com>
parents: 827
diff changeset
7 * the Free Software Foundation, either version 3 of the License, or
bb903e89e23c - now with license headers
Santeri Piippo <crimsondusk64@gmail.com>
parents: 827
diff changeset
8 * (at your option) any later version.
bb903e89e23c - now with license headers
Santeri Piippo <crimsondusk64@gmail.com>
parents: 827
diff changeset
9 *
bb903e89e23c - now with license headers
Santeri Piippo <crimsondusk64@gmail.com>
parents: 827
diff changeset
10 * This program is distributed in the hope that it will be useful,
bb903e89e23c - now with license headers
Santeri Piippo <crimsondusk64@gmail.com>
parents: 827
diff changeset
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
bb903e89e23c - now with license headers
Santeri Piippo <crimsondusk64@gmail.com>
parents: 827
diff changeset
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
bb903e89e23c - now with license headers
Santeri Piippo <crimsondusk64@gmail.com>
parents: 827
diff changeset
13 * GNU General Public License for more details.
bb903e89e23c - now with license headers
Santeri Piippo <crimsondusk64@gmail.com>
parents: 827
diff changeset
14 *
bb903e89e23c - now with license headers
Santeri Piippo <crimsondusk64@gmail.com>
parents: 827
diff changeset
15 * You should have received a copy of the GNU General Public License
bb903e89e23c - now with license headers
Santeri Piippo <crimsondusk64@gmail.com>
parents: 827
diff changeset
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
bb903e89e23c - now with license headers
Santeri Piippo <crimsondusk64@gmail.com>
parents: 827
diff changeset
17 */
bb903e89e23c - now with license headers
Santeri Piippo <crimsondusk64@gmail.com>
parents: 827
diff changeset
18
823
1a2f593f0c02 - saving work done on edit mode revamp
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
19 #include "abstracteditmode.h"
1a2f593f0c02 - saving work done on edit mode revamp
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
20
1a2f593f0c02 - saving work done on edit mode revamp
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
21 class SelectMode : public AbstractSelectMode
1a2f593f0c02 - saving work done on edit mode revamp
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
22 {
1a2f593f0c02 - saving work done on edit mode revamp
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
23 QPoint _rangeStart;
1a2f593f0c02 - saving work done on edit mode revamp
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
24 bool _rangepick;
1a2f593f0c02 - saving work done on edit mode revamp
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
25 bool _addpick;
1a2f593f0c02 - saving work done on edit mode revamp
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
26
1a2f593f0c02 - saving work done on edit mode revamp
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
27 DEFINE_CLASS (SelectMode, AbstractSelectMode)
1a2f593f0c02 - saving work done on edit mode revamp
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
28
1a2f593f0c02 - saving work done on edit mode revamp
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
29 public:
1a2f593f0c02 - saving work done on edit mode revamp
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
30 SelectMode (GLRenderer* renderer);
1a2f593f0c02 - saving work done on edit mode revamp
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
31
827
82469b40567e - now compiles
Santeri Piippo <crimsondusk64@gmail.com>
parents: 825
diff changeset
32 virtual void render (QPainter& painter) const override;
82469b40567e - now compiles
Santeri Piippo <crimsondusk64@gmail.com>
parents: 825
diff changeset
33 virtual bool mousePressed (QMouseEvent* ev);
824
6add2126e7ff - more work on edit modes
Santeri Piippo <crimsondusk64@gmail.com>
parents: 823
diff changeset
34 virtual bool mouseReleased (MouseEventData const& data) override;
825
f7649c9bfd9a - more work on edit modes
Santeri Piippo <crimsondusk64@gmail.com>
parents: 824
diff changeset
35 virtual bool mouseDoubleClicked (QMouseEvent* ev);
827
82469b40567e - now compiles
Santeri Piippo <crimsondusk64@gmail.com>
parents: 825
diff changeset
36 virtual bool mouseMoved (QMouseEvent*) override;
823
1a2f593f0c02 - saving work done on edit mode revamp
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
37 virtual EditModeType type() const override;
1a2f593f0c02 - saving work done on edit mode revamp
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
38 };

mercurial