Documentation for VArc class.
--HG-- branch : develop
This commit is contained in:
parent
d88ed1d6e0
commit
ca40008a97
|
@ -38,131 +38,146 @@ class QLineF;
|
||||||
class QPainterPath;
|
class QPainterPath;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief VArc клас, що реалізує дугу. Дуга розраховується за годиниковою стрілкою.
|
* @brief VArc class for anticlockwise arc.
|
||||||
*/
|
*/
|
||||||
class VArc: public VGObject
|
class VArc: public VGObject
|
||||||
{
|
{
|
||||||
Q_DECLARE_TR_FUNCTIONS(VArc)
|
Q_DECLARE_TR_FUNCTIONS(VArc)
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* @brief VArc конструктор по замовчуванню.
|
* @brief VArc default constructor.
|
||||||
*/
|
*/
|
||||||
VArc ();
|
VArc ();
|
||||||
/**
|
/**
|
||||||
* @brief VArc конструктор.
|
* @brief VArc constructor.
|
||||||
* @param center точка центру.
|
* @param center center point.
|
||||||
* @param radius радіус.
|
* @param radius arc radius.
|
||||||
* @param f1 початковий кут в градусах.
|
* @param f1 start angle (degree).
|
||||||
* @param f2 кінцевий кут в градусах.
|
* @param f2 end angle (degree).
|
||||||
*/
|
*/
|
||||||
VArc (VPointF center, qreal radius, QString formulaRadius, qreal f1, QString formulaF1, qreal f2,
|
VArc (VPointF center, qreal radius, QString formulaRadius, qreal f1, QString formulaF1, qreal f2,
|
||||||
QString formulaF2, qint64 idObject = 0, Draw::Draws mode = Draw::Calculation);
|
QString formulaF2, qint64 idObject = 0, Draw::Draws mode = Draw::Calculation);
|
||||||
/**
|
/**
|
||||||
* @brief VArc
|
* @brief VArc copy constructor
|
||||||
* @param arc
|
* @param arc arc
|
||||||
*/
|
*/
|
||||||
VArc(const VArc &arc);
|
VArc(const VArc &arc);
|
||||||
/**
|
/**
|
||||||
* @brief operator =
|
* @brief operator = assignment operator
|
||||||
* @param arc
|
* @param arc arc
|
||||||
* @return
|
* @return arc
|
||||||
*/
|
*/
|
||||||
VArc& operator= (const VArc &arc);
|
VArc& operator= (const VArc &arc);
|
||||||
/**
|
/**
|
||||||
* @brief GetF1 повертає початковий кут дуги.
|
* @brief GetF1 return start angle.
|
||||||
* @return повертає кут в градусах.
|
* @return angle in degree.
|
||||||
*/
|
*/
|
||||||
inline QString GetFormulaF1 () const {return formulaF1;}
|
inline QString GetFormulaF1 () const {return formulaF1;}
|
||||||
/**
|
/**
|
||||||
* @brief GetF1
|
* @brief GetF1 return formula for start angle.
|
||||||
* @return
|
* @return string with formula.
|
||||||
*/
|
*/
|
||||||
inline qreal GetF1 () const {return f1;}
|
inline qreal GetF1 () const {return f1;}
|
||||||
/**
|
/**
|
||||||
* @brief GetF2 повертає кінцевий кут дуги.
|
* @brief GetF2 return end angle.
|
||||||
* @return повертає кут в градусах.
|
* @return angle in degree.
|
||||||
*/
|
*/
|
||||||
inline QString GetFormulaF2 () const {return formulaF2;}
|
inline QString GetFormulaF2 () const {return formulaF2;}
|
||||||
/**
|
/**
|
||||||
* @brief GetF2
|
* @brief GetF2 return formula for end angle.
|
||||||
* @return
|
* @return string with formula.
|
||||||
*/
|
*/
|
||||||
inline qreal GetF2 () const {return f2;}
|
inline qreal GetF2 () const {return f2;}
|
||||||
/**
|
/**
|
||||||
* @brief GetLength повертає довжину дуги.
|
* @brief GetLength return arc length.
|
||||||
* @return повертає довжину дуги.
|
* @return length.
|
||||||
*/
|
*/
|
||||||
qreal GetLength () const;
|
qreal GetLength () const;
|
||||||
/**
|
/**
|
||||||
* @brief GetRadius повертає радіус дуги.
|
* @brief GetRadius return arc radius.
|
||||||
* @return повертає радіус дуги.
|
* @return radius.
|
||||||
*/
|
*/
|
||||||
inline QString GetFormulaRadius () const {return formulaRadius;}
|
inline QString GetFormulaRadius () const {return formulaRadius;}
|
||||||
/**
|
/**
|
||||||
* @brief GetRadius
|
* @brief GetRadius return formula for radius.
|
||||||
* @return
|
* @return string with formula.
|
||||||
*/
|
*/
|
||||||
inline qreal GetRadius () const {return radius;}
|
inline qreal GetRadius () const {return radius;}
|
||||||
/**
|
/**
|
||||||
* @brief GetCenter повертає точку центра дуги.
|
* @brief GetCenter return center point.
|
||||||
* @return повертає точку центра дуги.
|
* @return center point.
|
||||||
*/
|
*/
|
||||||
inline VPointF GetCenter () const {return center;}
|
inline VPointF GetCenter () const {return center;}
|
||||||
/**
|
/**
|
||||||
* @brief GetP1 повертає першу точку з якої починається дуга.
|
* @brief GetP1 return point associated with start angle.
|
||||||
* @return точку початку дуги.
|
* @return point.
|
||||||
*/
|
*/
|
||||||
QPointF GetP1() const;
|
QPointF GetP1() const;
|
||||||
/**
|
/**
|
||||||
* @brief GetP2 повертає другу точку в якій закінчується дуга.
|
* @brief GetP2 return point associated with end angle.
|
||||||
* @return точку кінця дуги.
|
* @return точку point.
|
||||||
*/
|
*/
|
||||||
QPointF GetP2 () const;
|
QPointF GetP2 () const;
|
||||||
/**
|
/**
|
||||||
* @brief GetPath будує шлях по даній дузі.
|
* @brief GetPath return QPainterPath for this arc.
|
||||||
* @return повертає шлях.
|
* @return path.
|
||||||
*/
|
*/
|
||||||
QPainterPath GetPath() const;
|
QPainterPath GetPath() const;
|
||||||
/**
|
/**
|
||||||
* @brief AngleArc
|
* @brief AngleArc calculate arc angle.
|
||||||
* @return
|
* @return angle in degree.
|
||||||
*/
|
*/
|
||||||
qreal AngleArc() const;
|
qreal AngleArc() const;
|
||||||
/**
|
/**
|
||||||
* @brief GetPoints
|
* @brief GetPoints return list of points needed for drawing arc.
|
||||||
* @return
|
* @return list of points
|
||||||
*/
|
*/
|
||||||
QVector<QPointF> GetPoints () const;
|
QVector<QPointF> GetPoints () const;
|
||||||
|
/**
|
||||||
|
* @brief name return arc name. This name used in variables.
|
||||||
|
* @return name
|
||||||
|
*/
|
||||||
virtual QString name() const;
|
virtual QString name() const;
|
||||||
|
/**
|
||||||
|
* @brief CutArc cut arc into two arcs.
|
||||||
|
* @param length length first arc.
|
||||||
|
* @param arc1 first arc.
|
||||||
|
* @param arc2 second arc.
|
||||||
|
* @return point cutting
|
||||||
|
*/
|
||||||
QPointF CutArc (const qreal &length, VArc &arc1, VArc &arc2) const;
|
QPointF CutArc (const qreal &length, VArc &arc1, VArc &arc2) const;
|
||||||
|
/**
|
||||||
|
* @brief setId keep id arc in data.
|
||||||
|
* @param id id arc in data.
|
||||||
|
*/
|
||||||
virtual void setId(const qint64 &id);
|
virtual void setId(const qint64 &id);
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
* @brief f1 початковий кут в градусах
|
* @brief f1 start angle in degree.
|
||||||
*/
|
*/
|
||||||
qreal f1; // початковий кут нахилу дуги (градуси)
|
qreal f1;
|
||||||
/**
|
/**
|
||||||
* @brief formulaF1
|
* @brief formulaF1 formula for start angle.
|
||||||
*/
|
*/
|
||||||
QString formulaF1;
|
QString formulaF1;
|
||||||
/**
|
/**
|
||||||
* @brief f2 кінцевий кут в градусах
|
* @brief f2 end angle in degree.
|
||||||
*/
|
*/
|
||||||
qreal f2; // кінцевий кут нахилу дуги (градуси)
|
qreal f2;
|
||||||
/**
|
/**
|
||||||
* @brief formulaF2
|
* @brief formulaF2 formula for end angle.
|
||||||
*/
|
*/
|
||||||
QString formulaF2;
|
QString formulaF2;
|
||||||
/**
|
/**
|
||||||
* @brief radius радіус дуги.
|
* @brief radius arc radius.
|
||||||
*/
|
*/
|
||||||
qreal radius;
|
qreal radius;
|
||||||
/**
|
/**
|
||||||
* @brief formulaRadius
|
* @brief formulaRadius formula for arc radius.
|
||||||
*/
|
*/
|
||||||
QString formulaRadius;
|
QString formulaRadius;
|
||||||
/**
|
/**
|
||||||
* @brief center центральна точка дуги.
|
* @brief center center point of arc.
|
||||||
*/
|
*/
|
||||||
VPointF center;
|
VPointF center;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user