Seamly2D
Code documentation
vistoolellipticalarc.h
Go to the documentation of this file.
1 /************************************************************************
2  **
3  ** @file vistoolellipticalarc.h
4  ** @author Valentina Zhuravska <zhuravska19(at)gmail.com>
5  ** @date 24 10, 2016
6  **
7  ** @brief
8  ** @copyright
9  ** This source code is part of the Valentine project, a pattern making
10  ** program, whose allow create and modeling patterns of clothing.
11  ** Copyright (C) 2016 Seamly2D project
12  ** <https://github.com/fashionfreedom/seamly2d> All Rights Reserved.
13  **
14  ** Seamly2D is free software: you can redistribute it and/or modify
15  ** it under the terms of the GNU General Public License as published by
16  ** the Free Software Foundation, either version 3 of the License, or
17  ** (at your option) any later version.
18  **
19  ** Seamly2D is distributed in the hope that it will be useful,
20  ** but WITHOUT ANY WARRANTY; without even the implied warranty of
21  ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22  ** GNU General Public License for more details.
23  **
24  ** You should have received a copy of the GNU General Public License
25  ** along with Seamly2D. If not, see <http://www.gnu.org/licenses/>.
26  **
27  *************************************************************************/
28 #ifndef VISTOOLELLIPTICALARC_H
29 #define VISTOOLELLIPTICALARC_H
30 
31 #include <qcompilerdetection.h>
32 #include <QGraphicsItem>
33 #include <QMetaObject>
34 #include <QObject>
35 #include <QString>
36 #include <QtGlobal>
37 
38 #include "../vmisc/def.h"
39 #include "vispath.h"
40 
42 {
43  Q_OBJECT
44 public:
45  explicit VisToolEllipticalArc(const VContainer *data, QGraphicsItem *parent = nullptr);
46  virtual ~VisToolEllipticalArc() Q_DECL_EQ_DEFAULT;
47 
48  virtual void RefreshGeometry() Q_DECL_OVERRIDE;
49  void setRadius1(const QString &expression);
50  void setRadius2(const QString &expression);
51  void setF1(const QString &expression);
52  void setF2(const QString &expression);
53  void setRotationAngle(const QString &expression);
54 
55  virtual int type() const Q_DECL_OVERRIDE {return Type;}
56  enum { Type = UserType + static_cast<int>(Vis::ToolEllipticalArc)};
57 private:
58  Q_DISABLE_COPY(VisToolEllipticalArc)
60  qreal radius1;
61  qreal radius2;
62  qreal f1;
63  qreal f2;
65 };
66 
67 #endif // VISTOOLELLIPTICALARC_H
The VContainer class container of all variables.
Definition: vcontainer.h:141
void setF1(const QString &expression)
virtual ~VisToolEllipticalArc() Q_DECL_EQ_DEFAULT
void setRadius2(const QString &expression)
VScaledEllipse * arcCenter
VisToolEllipticalArc(const VContainer *data, QGraphicsItem *parent=nullptr)
virtual void RefreshGeometry() Q_DECL_OVERRIDE
void setF2(const QString &expression)
virtual int type() const Q_DECL_OVERRIDE
void setRadius1(const QString &expression)
void setRotationAngle(const QString &expression)
const VContainer * data
Definition: visualization.h:97
@ ToolEllipticalArc