#include "steprepeat.h"


class PcbCamStepRepeatData : public QSharedData
{
public:
    PcbCamStepRepeatData() { }
    PcbCamStepRepeatData(const PcbCamStepRepeatData &other): QSharedData(other),
        id(other.id),
        step(other.step),
        x(other.x),
        y(other.y),
        dx(other.dx),
        dy(other.dy),
        nx(other.nx),
        ny(other.ny),
        angle(other.angle),
        mirror(other.mirror),
        selected(other.selected){ }

    ~PcbCamStepRepeatData() { }

    QString id;
    QString step;
    qreal x {0.0};
    qreal y {0.0};
    qreal dx {0.0};
    qreal dy {0.0};
    uint nx {1};
    uint ny {1};
    qreal angle {0};
    bool mirror {false};
    bool selected {false};
};

PcbCamStepRepeat::PcbCamStepRepeat() : d(new PcbCamStepRepeatData)
{

}

PcbCamStepRepeat::PcbCamStepRepeat(const PcbCamStepRepeat &rhs) : d(rhs.d)
{

}

PcbCamStepRepeat &PcbCamStepRepeat::operator=(const PcbCamStepRepeat &rhs)
{
    if (this != &rhs)
        d.operator=(rhs.d);
    return *this;
}

PcbCamStepRepeat::~PcbCamStepRepeat()
{

}

QString PcbCamStepRepeat::id() const
{
    return d->id;
}

void PcbCamStepRepeat::setId(const QString &iId)
{
    d->id = iId;
}

QString PcbCamStepRepeat::step() const
{
    return d->step;
}

void PcbCamStepRepeat::setStep(const QString &iStep)
{
    d->step = iStep;
}

qreal PcbCamStepRepeat::x() const
{
    return d->x;
}

void PcbCamStepRepeat::setX(qreal iX)
{
    d->x = iX;
}

qreal PcbCamStepRepeat::y() const
{
    return d->y;
}

void PcbCamStepRepeat::setY(qreal iY)
{
    d->y = iY;
}

qreal PcbCamStepRepeat::dx() const
{
    return d->dx;
}

void PcbCamStepRepeat::setDx(qreal iDx)
{
    d->dx = iDx;
}

qreal PcbCamStepRepeat::dy() const
{
    return d->dy;
}

void PcbCamStepRepeat::setDy(qreal iDy)
{
    d->dy = iDy;
}

uint PcbCamStepRepeat::nx() const
{
    return d->nx;
}

void PcbCamStepRepeat::setNx(uint iNx)
{
    d->nx = iNx;
}

uint PcbCamStepRepeat::ny() const
{
    return d->ny;
}

void PcbCamStepRepeat::setNy(uint iNy)
{
    d->ny = iNy;
}

qreal PcbCamStepRepeat::angle() const
{
    return d->angle;
}

void PcbCamStepRepeat::setAngle(qreal iAngle)
{
    d->angle = iAngle;
}

bool PcbCamStepRepeat::mirror() const
{
    return d->mirror;
}

void PcbCamStepRepeat::setMirror(bool iMirror)
{
    d->mirror = iMirror;
}

bool PcbCamStepRepeat::isSelected() const
{
    return d->selected;
}

void PcbCamStepRepeat::setSelected(bool iSelected)
{
    d->selected = iSelected;
}

