Seamly2D
Code documentation
intersect_circles_dialog.h
Go to the documentation of this file.
1 /**************************************************************************
2  **
3  ** @file intersect_circles_dialog.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_DIALOG_H
33 #define INTERSECT_CIRCLES_DIALOG_H
34 
35 #include "dialogtool.h"
36 #include "../ifc/xml/vabstractpattern.h"
37 #include "../vmisc/def.h"
38 
39 #include <qcompilerdetection.h>
40 #include <QMetaObject>
41 #include <QObject>
42 #include <QString>
43 #include <QtGlobal>
44 
45 namespace Ui
46 {
48 }
49 
51 {
52  Q_OBJECT
53 
54 public:
55  IntersectCirclesDialog(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr);
56  virtual ~IntersectCirclesDialog() Q_DECL_OVERRIDE;
57 
58  void SetPointName(const QString &value);
59 
60  quint32 GetFirstCircleCenterId() const;
61  void SetFirstCircleCenterId(const quint32 &value);
62 
63  quint32 GetSecondCircleCenterId() const;
64  void SetSecondCircleCenterId(const quint32 &value);
65 
66  QString GetFirstCircleRadius() const;
67  void SetFirstCircleRadius(const QString &value);
68 
69  QString GetSecondCircleRadius() const;
70  void SetSecondCircleRadius(const QString &value);
71 
74 
75 public slots:
76  virtual void ChosenObject(quint32 id, const SceneObject &type) Q_DECL_OVERRIDE;
77  void PointChanged();
78 
81 
82  void Circle1RadiusChanged();
83  void Circle2RadiusChanged();
84 
85  void FXCircle1Radius();
86  void FXCircle2Radius();
87 
88  void EvalCircle1Radius();
89  void EvalCircle2Radius();
90 
91 protected:
92  virtual void ShowVisualization() Q_DECL_OVERRIDE;
93  /**
94  * @brief SaveData Put dialog data in local variables
95  */
96  virtual void SaveData() Q_DECL_OVERRIDE;
97  virtual void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE;
98  virtual void CheckState() Q_DECL_FINAL;
99 
100 private:
101  Q_DISABLE_COPY(IntersectCirclesDialog)
102 
104 
107 
110 
111  QString circle1Radius;
112  QString circle2Radius;
113 
116 };
117 
118 #endif // INTERSECT_CIRCLES_DIALOG_H
The DialogTool class parent for all dialog of tools.
Definition: dialogtool.h:107
quint32 toolId
Definition: dialogtool.h:225
const VContainer * data
data container with data
Definition: dialogtool.h:177
void SetFirstCircleRadius(const QString &value)
void SetSecondCircleRadius(const QString &value)
virtual void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE
closeEvent handle when dialog cloded
virtual ~IntersectCirclesDialog() Q_DECL_OVERRIDE
void SetPointName(const QString &value)
virtual void ChosenObject(quint32 id, const SceneObject &type) Q_DECL_OVERRIDE
virtual void ShowVisualization() Q_DECL_OVERRIDE
Ui::IntersectCirclesDialog * ui
virtual void SaveData() Q_DECL_OVERRIDE
SaveData Put dialog data in local variables.
CrossCirclesPoint GetCrossCirclesPoint() const
void SetFirstCircleCenterId(const quint32 &value)
void SetSecondCircleCenterId(const quint32 &value)
void setCirclesCrossPoint(const CrossCirclesPoint &p)
virtual void CheckState() Q_DECL_FINAL
CheckState enable, when all is correct, or disable, when something wrong, button ok.
IntersectCirclesDialog(const VContainer *data, const quint32 &toolId, QWidget *parent=nullptr)
The VContainer class container of all variables.
Definition: vcontainer.h:141
SceneObject
Definition: def.h:103
CrossCirclesPoint