Seamly2D
Code documentation
intersect_circletangent_visual.h
Go to the documentation of this file.
1 /**************************************************************************
2  **
3  ** @file intersect_circletangent_visual.h
4  ** @author Roman Telezhynskyi <dismine(at)gmail.com>
5  ** @date 5 6, 2015
6  **
7  ** @author Douglas S. Caskey
8  ** @date 7.16.2022
9  **
10  ** @copyright
11  ** Copyright (C) 2013-2022 Seamly2D project.
12  ** This source code is part of the Seamly2D project, a pattern making
13  ** program, whose allow create and modeling patterns of clothing.
14  **
15  ** <https://github.com/fashionfreedom/seamly2d> All Rights Reserved.
16  **
17  ** Seamly2D is free software: you can redistribute it and/or modify
18  ** it under the terms of the GNU General Public License as published
19  ** by the Free Software Foundation, either version 3 of the License,
20  ** or (at your option) any later version.
21  **
22  ** Seamly2D is distributed in the hope that it will be useful,
23  ** but WITHOUT ANY WARRANTY; without even the implied warranty of
24  ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25  ** GNU General Public License for more details.
26  **
27  ** You should have received a copy of the GNU General Public License
28  ** along with Seamly2D. If not, see <http://www.gnu.org/licenses/>.
29  **
30  *************************************************************************/
31 
32 #ifndef INTERSECT_CIRCLETANGENT_VISUAL_H
33 #define INTERSECT_CIRCLETANGENT_VISUAL_H
34 
35 #include "visline.h"
36 #include "../ifc/xml/vabstractpattern.h"
37 #include "../vmisc/def.h"
38 
39 #include <qcompilerdetection.h>
40 #include <QGraphicsItem>
41 #include <QMetaObject>
42 #include <QObject>
43 #include <QPointF>
44 #include <QString>
45 #include <QtGlobal>
46 
48 {
49  Q_OBJECT
50 public:
51  explicit IntersectCircleTangentVisual(const VContainer *data, QGraphicsItem *parent = nullptr);
52  virtual ~IntersectCircleTangentVisual() = default;
53 
54  virtual void RefreshGeometry() Q_DECL_OVERRIDE;
55 
56  void setObject2Id(const quint32 &value);
57  void setCRadius(const QString &value);
58  void setCrossPoint(const CrossCirclesPoint &value);
59 
60  virtual int type() const Q_DECL_OVERRIDE {return Type;}
61  enum {Type = UserType + static_cast<int>(Vis::ToolPointFromCircleAndTangent)};
62 
63 private:
64  Q_DISABLE_COPY(IntersectCircleTangentVisual)
65  quint32 object2Id;
66  qreal cRadius;
71  QGraphicsEllipseItem *cPath;
74 
75  void FindRays(const QPointF &p, const QPointF &center, qreal radius);
76 };
77 
78 #endif // INTERSECT_CIRCLETANGENT_VISUAL_H
virtual ~IntersectCircleTangentVisual()=default
virtual void RefreshGeometry() Q_DECL_OVERRIDE
void setCrossPoint(const CrossCirclesPoint &value)
virtual int type() const Q_DECL_OVERRIDE
IntersectCircleTangentVisual(const VContainer *data, QGraphicsItem *parent=nullptr)
void FindRays(const QPointF &p, const QPointF &center, qreal radius)
The VContainer class container of all variables.
Definition: vcontainer.h:141
const VContainer * data
Definition: visualization.h:97
@ ToolPointFromCircleAndTangent
CrossCirclesPoint