#ifndef TITAN_PCBCAM_STEP_H
#define TITAN_PCBCAM_STEP_H
#include "../titanpcbcamglobal.h"
#include <QSharedDataPointer>
#include <QString>
#include <QVariantMap>
#include <QPointF>
#include <QMarginsF>
#include <QPainterPath>
#include "./steprepeat.h"
#include "./symbol.h"


class PcbCamStepData;

class TITAN_PCBCAM_EXPORT PcbCamStep
{
public:
    PcbCamStep();
    PcbCamStep(const PcbCamStep &);
    PcbCamStep &operator=(const PcbCamStep &);
    ~PcbCamStep();

    QString name() const;
    void setName(const QString &iName);

    QVariant attr(const QString &iName) const;
    bool hasAttr(const QString &iName) const;
    void initAttr(const QVariantMap &iAttrMap);
    void setAttr(const QString &iName, const QVariant &iValue);

    QPointF origin() const;
    void setOrigin(const QPointF &iOrigin);

    QPointF datum() const;
    void setDatum(const QPointF &iDatum);

    QMarginsF activeMargin() const;
    void setActiveMargin(const QMarginsF &iMargin);

    QPainterPath profile() const;
    void setProfile(const QPainterPath &iProfile);

    QList<PcbCamStepRepeat> repeats() const;
    PcbCamStepRepeat repeat(int iIndex) const;
    void addRepeat(const PcbCamStepRepeat &iRepeat);
    void clearRepeats();

    QList<PcbCamStepRepeat> getBreakedRepeats() const;

    void setEdaPackageSymbols(const QList<PcbCamSymbolUser *> iPkgSymbols);
    QList<PcbCamSymbolUser *> edaPackageSymbols() const;

private:
    QSharedDataPointer<PcbCamStepData> d;
};

#endif // TITAN_PCBCAM_STEP_H
