Seamly2D
Code documentation
intersect_circles_visual.h
Go to the documentation of this file.
1 /**************************************************************************
2  **
3  ** @file intersect_circles_visual.h
4  ** @author Roman Telezhynskyi <dismine(at)gmail.com>
5  ** @date 29 5, 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_CIRCLES_VISUAL_H
33 #define INTERSECT_CIRCLES_VISUAL_H
34 
35 #include "visline.h"
36 
37 #include "../ifc/xml/vabstractpattern.h"
38 #include "../vmisc/def.h"
39 
40 #include <QColor>
41 #include <qcompilerdetection.h>
42 #include <QGraphicsItem>
43 #include <QMetaObject>
44 #include <QObject>
45 #include <QString>
46 #include <QtGlobal>
47 
49 {
50  Q_OBJECT
51 
52 public:
53  explicit IntersectCirclesVisual(const VContainer *data, QGraphicsItem *parent = nullptr);
54  virtual ~IntersectCirclesVisual() = default;
55 
56  virtual void RefreshGeometry() Q_DECL_OVERRIDE;
57  virtual void VisualMode(const quint32 &id) Q_DECL_OVERRIDE;
58 
59  void setObject2Id(const quint32 &value);
60  void setC1Radius(const QString &value);
61  void setC2Radius(const QString &value);
62  void setCrossPoint(const CrossCirclesPoint &value);
63 
64  virtual int type() const Q_DECL_OVERRIDE {return Type;}
65  enum {Type = UserType + static_cast<int>(Vis::ToolPointOfIntersectionCircles)};
66 
67 private:
68  Q_DISABLE_COPY(IntersectCirclesVisual)
69 
70  quint32 object2Id;
71  qreal c1Radius;
72  qreal c2Radius;
77  QGraphicsEllipseItem *c1Path;
78  QGraphicsEllipseItem *c2Path;
81 };
82 
83 #endif // INTERSECT_CIRCLES_VISUAL_H
void setC1Radius(const QString &value)
virtual void RefreshGeometry() Q_DECL_OVERRIDE
virtual ~IntersectCirclesVisual()=default
QGraphicsEllipseItem * c2Path
QGraphicsEllipseItem * c1Path
void setObject2Id(const quint32 &value)
void setCrossPoint(const CrossCirclesPoint &value)
virtual int type() const Q_DECL_OVERRIDE
virtual void VisualMode(const quint32 &id) Q_DECL_OVERRIDE
IntersectCirclesVisual(const VContainer *data, QGraphicsItem *parent=nullptr)
void setC2Radius(const QString &value)
The VContainer class container of all variables.
Definition: vcontainer.h:141
const VContainer * data
Definition: visualization.h:97
@ ToolPointOfIntersectionCircles
CrossCirclesPoint