Seamly2D
Code documentation
point_intersectxy_visual.h
Go to the documentation of this file.
1 /**************************************************************************
2  **
3  ** @file point_intersectxy_visual.h
4  ** @author Roman Telezhynskyi <dismine(at)gmail.com>
5  ** @date 13 8, 2014
6  **
7  ** @author Douglas S Caskey
8  ** @date 7.21.2022
9  **
10  ** @brief
11  ** @copyright
12  ** This source code is part of the Valentine project, a pattern making
13  ** program, whose allow create and modeling patterns of clothing.
14  ** Copyright (C) 2013-2022 Seamly2D project
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 by
19  ** the Free Software Foundation, either version 3 of the License, or
20  ** (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 POINT_INTERSECTXY_VISUAL_H
33 #define POINT_INTERSECTXY_VISUAL_H
34 
35 #include "visline.h"
36 #include "../vmisc/def.h"
37 
38 #include <qcompilerdetection.h>
39 #include <QColor>
40 #include <QGraphicsItem>
41 #include <QLineF>
42 #include <QMetaObject>
43 #include <QObject>
44 #include <QString>
45 #include <QtGlobal>
46 
48 {
49  Q_OBJECT
50 
51 public:
52  explicit PointIntersectXYVisual(const VContainer *data, QGraphicsItem *parent = nullptr);
53  virtual ~PointIntersectXYVisual() = default;
54 
55  virtual void RefreshGeometry() Q_DECL_OVERRIDE;
56 
57  void setPoint2Id(const quint32 &value);
58  void setPoint1Id(const quint32 &value);
59  virtual int type() const Q_DECL_OVERRIDE {return Type;}
60  enum {Type = UserType + static_cast<int>(Vis::ToolPointOfIntersection)};
61 
62 private:
63  Q_DISABLE_COPY(PointIntersectXYVisual)
64  quint32 point2Id;
69 
70  void showIntersection(const QLineF &axis1, const QLineF &axis2, const QColor &color);
71 };
72 
73 #endif // POINT_INTERSECTXY_VISUAL_H
virtual void RefreshGeometry() Q_DECL_OVERRIDE
void setPoint1Id(const quint32 &value)
void showIntersection(const QLineF &axis1, const QLineF &axis2, const QColor &color)
PointIntersectXYVisual(const VContainer *data, QGraphicsItem *parent=nullptr)
virtual ~PointIntersectXYVisual()=default
void setPoint2Id(const quint32 &value)
virtual int type() const Q_DECL_OVERRIDE
The VContainer class container of all variables.
Definition: vcontainer.h:141
const VContainer * data
Definition: visualization.h:97
@ ToolPointOfIntersection