-
Notifications
You must be signed in to change notification settings - Fork 0
/
qttesttrianglemaindialog.h
92 lines (75 loc) · 3.16 KB
/
qttesttrianglemaindialog.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
//---------------------------------------------------------------------------
/*
TestTriangle, compare Triangle to its C++ equivalent
Copyright (C) 2014-2015 Richel Bilderbeek
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
//---------------------------------------------------------------------------
//From http://www.richelbilderbeek.nl/ToolTestTriangle.htm
//---------------------------------------------------------------------------
#ifndef QTTRIANGLEMESHCREATORMAINDIALOG_H
#define QTTRIANGLEMESHCREATORMAINDIALOG_H
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#pragma GCC diagnostic ignored "-Wunused-local-typedefs"
#pragma GCC diagnostic ignored "-Wunused-but-set-parameter"
#include <boost/geometry/geometries/linestring.hpp>
#include <boost/geometry/geometries/point_xy.hpp>
#include <boost/geometry/geometries/polygon.hpp>
#include <boost/units/quantity.hpp>
#include <boost/units/systems/si/area.hpp>
#include <boost/units/systems/si/length.hpp>
#include <boost/units/systems/si/plane_angle.hpp>
#include "qthideandshowdialog.h"
#include "trianglemeshcreateverticalfacesstrategy.h"
#include "trianglemeshfwd.h"
#pragma GCC diagnostic pop
struct QPlainTextEdit;
namespace Ui {
class QtTestTriangleMainDialog;
}
namespace ribi {
class QtTestTriangleMainDialog : public QtHideAndShowDialog
{
Q_OBJECT
public:
typedef boost::units::quantity<boost::units::si::plane_angle> Angle;
typedef boost::units::quantity<boost::units::si::area> Area;
typedef boost::geometry::model::d2::point_xy<double> Coordinat2D;
typedef boost::geometry::model::linestring<Coordinat2D> Linestring;
typedef boost::geometry::model::polygon<Coordinat2D> Polygon;
typedef std::vector<Linestring> Linestrings;
typedef std::vector<Polygon> Polygons;
typedef std::pair<Polygons,Linestrings> Shapes;
explicit QtTestTriangleMainDialog(QWidget *parent = 0) noexcept;
QtTestTriangleMainDialog(const QtTestTriangleMainDialog&) = delete;
QtTestTriangleMainDialog& operator=(const QtTestTriangleMainDialog&) = delete;
~QtTestTriangleMainDialog() noexcept;
Shapes GetShapes() const noexcept;
Area GetTriangleMaxArea() const noexcept;
Angle GetTriangleMinAngle() const noexcept;
bool GetVerbose() const noexcept;
void SetWkt(const std::string& wkt) noexcept;
protected:
void keyPressEvent(QKeyEvent *) noexcept;
private:
Ui::QtTestTriangleMainDialog *ui;
boost::shared_ptr<ribi::trim::Dialog> m_dialog;
#ifndef NDEBUG
static void Test() noexcept;
#endif
private slots:
void DisplayTriangleMesh() noexcept;
void DisplayPolygons() noexcept;
};
} //~namespace ribi
#endif // QTTRIANGLEMESHCREATORMAINDIALOG_H