Copy constructor for VIncrement class.

--HG--
branch : feature
This commit is contained in:
dismine 2014-06-04 14:50:13 +03:00
parent 0196db77d7
commit c25f6d5dd5
2 changed files with 19 additions and 0 deletions

View File

@ -49,6 +49,23 @@ VIncrement::VIncrement(quint32 id, qreal base, qreal ksize, qreal kheight, QStri
:id(id), base(base), ksize(ksize), kheight(kheight), description(description) :id(id), base(base), ksize(ksize), kheight(kheight), description(description)
{} {}
//---------------------------------------------------------------------------------------------------------------------
VIncrement::VIncrement(const VIncrement &incr)
:id(incr.getId()), base(incr.getBase()), ksize(incr.getKsize()), kheight(incr.getKheight()),
description(incr.getDescription())
{}
//---------------------------------------------------------------------------------------------------------------------
VIncrement &VIncrement::operator=(const VIncrement &incr)
{
this->id = incr.getId();
this->base = incr.getBase();
this->ksize = incr.getKsize();
this->kheight = incr.getKheight();
this->description = incr.getDescription();
return *this;
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
qreal VIncrement::GetValue() const qreal VIncrement::GetValue() const
{ {

View File

@ -39,6 +39,8 @@ class VIncrement
public: public:
VIncrement(); VIncrement();
VIncrement(quint32 id, qreal base, qreal ksize, qreal kheight, QString description = QString()); VIncrement(quint32 id, qreal base, qreal ksize, qreal kheight, QString description = QString());
VIncrement(const VIncrement &incr);
VIncrement &operator=(const VIncrement &incr);
quint32 getId() const; quint32 getId() const;
void setId(const quint32 &value); void setId(const quint32 &value);
qreal getBase() const; qreal getBase() const;