src/grid.h

Thu, 09 Mar 2017 12:50:14 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Thu, 09 Mar 2017 12:50:14 +0200
changeset 1209
c2723022b173
parent 1199
613a981223a6
permissions
-rw-r--r--

Laid groundwork for library collection support.

1023
9450ac3cd930 Split grid stuff into a new class Grid in grid.cpp/grid.h
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
1 /*
9450ac3cd930 Split grid stuff into a new class Grid in grid.cpp/grid.h
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
2 * LDForge: LDraw parts authoring CAD
1072
9ce9496427f2 Happy new year 2017!
Teemu Piippo <teemu@hecknology.net>
parents: 1023
diff changeset
3 * Copyright (C) 2013 - 2017 Teemu Piippo
1023
9450ac3cd930 Split grid stuff into a new class Grid in grid.cpp/grid.h
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
4 *
9450ac3cd930 Split grid stuff into a new class Grid in grid.cpp/grid.h
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
5 * This program is free software: you can redistribute it and/or modify
9450ac3cd930 Split grid stuff into a new class Grid in grid.cpp/grid.h
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
6 * it under the terms of the GNU General Public License as published by
9450ac3cd930 Split grid stuff into a new class Grid in grid.cpp/grid.h
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
7 * the Free Software Foundation, either version 3 of the License, or
9450ac3cd930 Split grid stuff into a new class Grid in grid.cpp/grid.h
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
8 * (at your option) any later version.
9450ac3cd930 Split grid stuff into a new class Grid in grid.cpp/grid.h
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
9 *
9450ac3cd930 Split grid stuff into a new class Grid in grid.cpp/grid.h
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
10 * This program is distributed in the hope that it will be useful,
9450ac3cd930 Split grid stuff into a new class Grid in grid.cpp/grid.h
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9450ac3cd930 Split grid stuff into a new class Grid in grid.cpp/grid.h
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9450ac3cd930 Split grid stuff into a new class Grid in grid.cpp/grid.h
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
13 * GNU General Public License for more details.
9450ac3cd930 Split grid stuff into a new class Grid in grid.cpp/grid.h
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
14 *
9450ac3cd930 Split grid stuff into a new class Grid in grid.cpp/grid.h
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License
9450ac3cd930 Split grid stuff into a new class Grid in grid.cpp/grid.h
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
9450ac3cd930 Split grid stuff into a new class Grid in grid.cpp/grid.h
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
17 */
9450ac3cd930 Split grid stuff into a new class Grid in grid.cpp/grid.h
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
18
9450ac3cd930 Split grid stuff into a new class Grid in grid.cpp/grid.h
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
19 #pragma once
1193
b78b6cf02213 The Grid class is no longer a hierarchy element or a QObject.
Teemu Piippo <teemu@hecknology.net>
parents: 1184
diff changeset
20 #include "main.h"
1023
9450ac3cd930 Split grid stuff into a new class Grid in grid.cpp/grid.h
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
21
1199
613a981223a6 Grid is now a namespace.
Teemu Piippo <teemu@hecknology.net>
parents: 1193
diff changeset
22 namespace Grid
1023
9450ac3cd930 Split grid stuff into a new class Grid in grid.cpp/grid.h
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
23 {
1184
393babf1319d Polar grid is now togglable.
Teemu Piippo <teemu@hecknology.net>
parents: 1181
diff changeset
24 enum Size
1023
9450ac3cd930 Split grid stuff into a new class Grid in grid.cpp/grid.h
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
25 {
9450ac3cd930 Split grid stuff into a new class Grid in grid.cpp/grid.h
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
26 Coarse,
9450ac3cd930 Split grid stuff into a new class Grid in grid.cpp/grid.h
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
27 Medium,
9450ac3cd930 Split grid stuff into a new class Grid in grid.cpp/grid.h
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
28 Fine
9450ac3cd930 Split grid stuff into a new class Grid in grid.cpp/grid.h
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
29 };
9450ac3cd930 Split grid stuff into a new class Grid in grid.cpp/grid.h
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
30
9450ac3cd930 Split grid stuff into a new class Grid in grid.cpp/grid.h
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
31 enum Config
9450ac3cd930 Split grid stuff into a new class Grid in grid.cpp/grid.h
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
32 {
9450ac3cd930 Split grid stuff into a new class Grid in grid.cpp/grid.h
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
33 Coordinate,
9450ac3cd930 Split grid stuff into a new class Grid in grid.cpp/grid.h
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
34 Angle
9450ac3cd930 Split grid stuff into a new class Grid in grid.cpp/grid.h
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
35 };
9450ac3cd930 Split grid stuff into a new class Grid in grid.cpp/grid.h
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
36
1184
393babf1319d Polar grid is now togglable.
Teemu Piippo <teemu@hecknology.net>
parents: 1181
diff changeset
37 enum Type
393babf1319d Polar grid is now togglable.
Teemu Piippo <teemu@hecknology.net>
parents: 1181
diff changeset
38 {
393babf1319d Polar grid is now togglable.
Teemu Piippo <teemu@hecknology.net>
parents: 1181
diff changeset
39 Cartesian,
393babf1319d Polar grid is now togglable.
Teemu Piippo <teemu@hecknology.net>
parents: 1181
diff changeset
40 Polar
393babf1319d Polar grid is now togglable.
Teemu Piippo <teemu@hecknology.net>
parents: 1181
diff changeset
41 };
393babf1319d Polar grid is now togglable.
Teemu Piippo <teemu@hecknology.net>
parents: 1181
diff changeset
42
1199
613a981223a6 Grid is now a namespace.
Teemu Piippo <teemu@hecknology.net>
parents: 1193
diff changeset
43 qreal angleSnap();
613a981223a6 Grid is now a namespace.
Teemu Piippo <teemu@hecknology.net>
parents: 1193
diff changeset
44 qreal angleAsRadians();
613a981223a6 Grid is now a namespace.
Teemu Piippo <teemu@hecknology.net>
parents: 1193
diff changeset
45 int bezierCurveSegments();
613a981223a6 Grid is now a namespace.
Teemu Piippo <teemu@hecknology.net>
parents: 1193
diff changeset
46 qreal coordinateSnap();
613a981223a6 Grid is now a namespace.
Teemu Piippo <teemu@hecknology.net>
parents: 1193
diff changeset
47 QPointF pole();
613a981223a6 Grid is now a namespace.
Teemu Piippo <teemu@hecknology.net>
parents: 1193
diff changeset
48 int polarDivisions();
613a981223a6 Grid is now a namespace.
Teemu Piippo <teemu@hecknology.net>
parents: 1193
diff changeset
49 QPointF snap(QPointF point);
613a981223a6 Grid is now a namespace.
Teemu Piippo <teemu@hecknology.net>
parents: 1193
diff changeset
50 Type type();
613a981223a6 Grid is now a namespace.
Teemu Piippo <teemu@hecknology.net>
parents: 1193
diff changeset
51 }

mercurial