valentina/container/vpointf.cpp

72 lines
1 KiB
C++
Raw Normal View History

2013-07-13 12:51:31 +02:00
#include "vpointf.h"
VPointF::VPointF(){
2013-07-13 12:51:31 +02:00
_mx = 0;
_my = 0;
this->_x = 0;
this->_y = 0;
2013-07-13 12:51:31 +02:00
}
VPointF::VPointF ( const VPointF & point ){
2013-07-13 12:51:31 +02:00
_name = point.name();
_mx = point.mx();
_my = point.my();
this->_x = point.x();
this->_y = point.y();
2013-07-13 12:51:31 +02:00
}
VPointF::VPointF (qreal x, qreal y , QString name, qreal mx, qreal my){
2013-07-13 12:51:31 +02:00
_name = name;
_mx = mx;
_my = my;
this->_x = x;
this->_y = y;
}
VPointF::~VPointF(){
2013-07-13 12:51:31 +02:00
}
QString VPointF::name() const{
return _name;
}
qreal VPointF::mx() const{
return _mx;
}
qreal VPointF::my() const{
return _my;
}
void VPointF::setName(const QString& name){
_name = name;
}
void VPointF::setMx(qreal mx){
_mx = mx;
}
void VPointF::setMy(qreal my){
_my = my;
}
QPointF VPointF::toQPointF()const{
return QPointF(_x, _y);
}
qreal VPointF::y() const{
return _y;
}
void VPointF::setY(const qreal &value){
_y = value;
}
qreal VPointF::x() const{
return _x;
}
void VPointF::setX(const qreal &value){
_x = value;
2013-07-13 12:51:31 +02:00
}