#ifndef TITAN_PCBCAM_SYMBOL_H
#define TITAN_PCBCAM_SYMBOL_H
#include "../titanpcbcamglobal.h"
#include <QSharedDataPointer>
#include "./feature.h"
#include "./common.h"


class PcbCamSymbolPrivate;
class TITAN_PCBCAM_EXPORT PcbCamSymbol
{
public:
    PcbCamSymbol();
    virtual ~PcbCamSymbol();

    virtual QString name() const;
    virtual QPainterPath shape() const = 0;
    virtual QRectF boundingRect() const;
    virtual PcbCam::SymbolType type() const ;

protected:
    PcbCamSymbol(PcbCamSymbolPrivate &dd);
    QScopedPointer<PcbCamSymbolPrivate> d_ptr;

private:
    Q_DECLARE_PRIVATE(PcbCamSymbol)
    Q_DISABLE_COPY(PcbCamSymbol)
};

class PcbCamSymbolRPrivate;
class TITAN_PCBCAM_EXPORT PcbCamSymbolR : public PcbCamSymbol
{
public:
    PcbCamSymbolR(const QString iName);
    ~PcbCamSymbolR();

    QPainterPath shape() const;

    qreal size() const;

private:
    Q_DECLARE_PRIVATE(PcbCamSymbolR)
    Q_DISABLE_COPY(PcbCamSymbolR)
};

class PcbCamSymbolSPrivate;
class TITAN_PCBCAM_EXPORT PcbCamSymbolS : public PcbCamSymbol
{
public:
    PcbCamSymbolS(const QString iName);
    ~PcbCamSymbolS();

    QPainterPath shape() const;

    qreal size() const;

private:
    Q_DECLARE_PRIVATE(PcbCamSymbolS)
    Q_DISABLE_COPY(PcbCamSymbolS)
};

class PcbCamSymbolRectPrivate;
class TITAN_PCBCAM_EXPORT PcbCamSymbolRect : public PcbCamSymbol
{
public:
    PcbCamSymbolRect(const QString iName);
    ~PcbCamSymbolRect();

    QPainterPath shape() const;

    QSizeF size() const;

private:
    Q_DECLARE_PRIVATE(PcbCamSymbolRect)
    Q_DISABLE_COPY(PcbCamSymbolRect)
};

class PcbCamSymbolRectRPrivate;
class TITAN_PCBCAM_EXPORT PcbCamSymbolRectR : public PcbCamSymbol
{
public:
    PcbCamSymbolRectR(const QString iName);
    ~PcbCamSymbolRectR();

    QPainterPath shape() const;

    qreal width() const;
    qreal height() const;
    qreal radius() const;
    QString corners() const;

private:
    Q_DECLARE_PRIVATE(PcbCamSymbolRectR)
    Q_DISABLE_COPY(PcbCamSymbolRectR)
};

class PcbCamSymbolRectCPrivate;
class TITAN_PCBCAM_EXPORT PcbCamSymbolRectC : public PcbCamSymbol
{
public:
    PcbCamSymbolRectC(const QString iName);
    ~PcbCamSymbolRectC();

    QPainterPath shape() const;

    qreal width() const;
    qreal height() const;
    qreal radius() const;
    QString corners() const;

private:
    Q_DECLARE_PRIVATE(PcbCamSymbolRectC)
    Q_DISABLE_COPY(PcbCamSymbolRectC)
};

class PcbCamSymbolOvalPrivate;
class TITAN_PCBCAM_EXPORT PcbCamSymbolOval : public PcbCamSymbol
{
public:
    PcbCamSymbolOval(const QString iName);
    ~PcbCamSymbolOval();

    QPainterPath shape() const;

    QSizeF size() const;

private:
    Q_DECLARE_PRIVATE(PcbCamSymbolOval)
    Q_DISABLE_COPY(PcbCamSymbolOval)
};

class PcbCamSymbolDiPrivate;
class TITAN_PCBCAM_EXPORT PcbCamSymbolDi : public PcbCamSymbol
{
public:
    PcbCamSymbolDi(const QString iName);
    ~PcbCamSymbolDi();

    QPainterPath shape() const;

    QSizeF size() const;

private:
    Q_DECLARE_PRIVATE(PcbCamSymbolDi)
    Q_DISABLE_COPY(PcbCamSymbolDi)
};

class PcbCamSymbolOctPrivate;
class TITAN_PCBCAM_EXPORT PcbCamSymbolOct : public PcbCamSymbol
{
public:
    PcbCamSymbolOct(const QString iName);
    ~PcbCamSymbolOct();

    QPainterPath shape() const;

    qreal width() const;
    qreal height() const;
    qreal radius() const;

private:
    Q_DECLARE_PRIVATE(PcbCamSymbolOct)
    Q_DISABLE_COPY(PcbCamSymbolOct)
};

class PcbCamSymbolDonutRPrivate;
class TITAN_PCBCAM_EXPORT PcbCamSymbolDonutR : public PcbCamSymbol
{
public:
    PcbCamSymbolDonutR(const QString iName);
    ~PcbCamSymbolDonutR();

    QPainterPath shape() const;

    qreal outerDiam() const;
    qreal innerDiam() const;

private:
    Q_DECLARE_PRIVATE(PcbCamSymbolDonutR)
    Q_DISABLE_COPY(PcbCamSymbolDonutR)
};

class PcbCamSymbolDonutSPrivate;
class TITAN_PCBCAM_EXPORT PcbCamSymbolDonutS : public PcbCamSymbol
{
public:
    PcbCamSymbolDonutS(const QString iName);
    ~PcbCamSymbolDonutS();

    QPainterPath shape() const;

    qreal outerDiam() const;
    qreal innerDiam() const;

private:
    Q_DECLARE_PRIVATE(PcbCamSymbolDonutS)
    Q_DISABLE_COPY(PcbCamSymbolDonutS)
};

class PcbCamSymbolHexLPrivate;
class TITAN_PCBCAM_EXPORT PcbCamSymbolHexL : public PcbCamSymbol
{
public:
    PcbCamSymbolHexL(const QString iName);
    ~PcbCamSymbolHexL();

    QPainterPath shape() const;

    qreal width() const;
    qreal height() const;
    qreal radius() const;

private:
    Q_DECLARE_PRIVATE(PcbCamSymbolHexL)
    Q_DISABLE_COPY(PcbCamSymbolHexL)
};

class PcbCamSymbolHexSPrivate;
class TITAN_PCBCAM_EXPORT PcbCamSymbolHexS : public PcbCamSymbol
{
public:
    PcbCamSymbolHexS(const QString iName);
    ~PcbCamSymbolHexS();

    QPainterPath shape() const;

    qreal width() const;
    qreal height() const;
    qreal radius() const;

private:
    Q_DECLARE_PRIVATE(PcbCamSymbolHexS)
    Q_DISABLE_COPY(PcbCamSymbolHexS)
};

class PcbCamSymbolBfrPrivate;
class TITAN_PCBCAM_EXPORT PcbCamSymbolBfr : public PcbCamSymbol
{
public:
    PcbCamSymbolBfr(const QString iName);
    ~PcbCamSymbolBfr();

    QPainterPath shape() const;

    qreal size() const;

private:
    Q_DECLARE_PRIVATE(PcbCamSymbolBfr)
    Q_DISABLE_COPY(PcbCamSymbolBfr)
};

class PcbCamSymbolBfsPrivate;
class TITAN_PCBCAM_EXPORT PcbCamSymbolBfs : public PcbCamSymbol
{
public:
    PcbCamSymbolBfs(const QString iName);
    ~PcbCamSymbolBfs();

    QPainterPath shape() const;

    qreal size() const;

private:
    Q_DECLARE_PRIVATE(PcbCamSymbolBfs)
    Q_DISABLE_COPY(PcbCamSymbolBfs)
};

class PcbCamSymbolTriPrivate;
class TITAN_PCBCAM_EXPORT PcbCamSymbolTri : public PcbCamSymbol
{
public:
    PcbCamSymbolTri(const QString iName);
    ~PcbCamSymbolTri();

    QPainterPath shape() const;

    QSizeF size() const;

private:
    Q_DECLARE_PRIVATE(PcbCamSymbolTri)
    Q_DISABLE_COPY(PcbCamSymbolTri)
};

class PcbCamSymbolOvalHPrivate;
class TITAN_PCBCAM_EXPORT PcbCamSymbolOvalH : public PcbCamSymbol
{
public:
    PcbCamSymbolOvalH(const QString iName);
    ~PcbCamSymbolOvalH();

    QPainterPath shape() const;

    QSizeF size() const;

private:
    Q_DECLARE_PRIVATE(PcbCamSymbolOvalH)
    Q_DISABLE_COPY(PcbCamSymbolOvalH)
};

class PcbCamSymbolThrPrivate;
class TITAN_PCBCAM_EXPORT PcbCamSymbolThr : public PcbCamSymbol
{
public:
    PcbCamSymbolThr(const QString iName);
    ~PcbCamSymbolThr();

    QPainterPath shape() const;

    qreal outerDiam() const;
    qreal innerDiam() const;
    qreal startAngle() const;
    int numSpokes() const;
    qreal spokesGap() const;


private:
    Q_DECLARE_PRIVATE(PcbCamSymbolThr)
    Q_DISABLE_COPY(PcbCamSymbolThr)
};

class PcbCamSymbolThsPrivate;
class TITAN_PCBCAM_EXPORT PcbCamSymbolThs : public PcbCamSymbol
{
public:
    PcbCamSymbolThs(const QString iName);
    ~PcbCamSymbolThs();

    QPainterPath shape() const;

    qreal outerDiam() const;
    qreal innerDiam() const;
    qreal startAngle() const;
    int numSpokes() const;
    qreal spokesGap() const;


private:
    Q_DECLARE_PRIVATE(PcbCamSymbolThs)
    Q_DISABLE_COPY(PcbCamSymbolThs)
};

class PcbCamSymbolSThsPrivate;
class TITAN_PCBCAM_EXPORT PcbCamSymbolSThs : public PcbCamSymbol
{
public:
    PcbCamSymbolSThs(const QString iName);
    ~PcbCamSymbolSThs();

    QPainterPath shape() const;

    qreal outerDiam() const;
    qreal innerDiam() const;
    qreal startAngle() const;
    int numSpokes() const;
    qreal spokesGap() const;


private:
    Q_DECLARE_PRIVATE(PcbCamSymbolSThs)
    Q_DISABLE_COPY(PcbCamSymbolSThs)
};

class PcbCamSymbolSThoPrivate;
class TITAN_PCBCAM_EXPORT PcbCamSymbolSTho : public PcbCamSymbol
{
public:
    PcbCamSymbolSTho(const QString iName);
    ~PcbCamSymbolSTho();

    QPainterPath shape() const;

    qreal outerDiam() const;
    qreal innerDiam() const;
    qreal startAngle() const;
    int numSpokes() const;
    qreal spokesGap() const;


private:
    Q_DECLARE_PRIVATE(PcbCamSymbolSTho)
    Q_DISABLE_COPY(PcbCamSymbolSTho)
};

class PcbCamSymbolSrThsPrivate;
class TITAN_PCBCAM_EXPORT PcbCamSymbolSrThs : public PcbCamSymbol
{
public:
    PcbCamSymbolSrThs(const QString iName);
    ~PcbCamSymbolSrThs();

    QPainterPath shape() const;

    qreal outerDiam() const;
    qreal innerDiam() const;
    qreal startAngle() const;
    int numSpokes() const;
    qreal spokesGap() const;


private:
    Q_DECLARE_PRIVATE(PcbCamSymbolSrThs)
    Q_DISABLE_COPY(PcbCamSymbolSrThs)
};

class PcbCamSymbolRcThsPrivate;
class TITAN_PCBCAM_EXPORT PcbCamSymbolRcThs : public PcbCamSymbol
{
public:
    PcbCamSymbolRcThs(const QString iName);
    ~PcbCamSymbolRcThs();

    QPainterPath shape() const;

    qreal width() const;
    qreal height() const;
    qreal startAngle() const;
    int numSpokes() const;
    qreal spokesGap() const;
    qreal airGap() const;


private:
    Q_DECLARE_PRIVATE(PcbCamSymbolRcThs)
    Q_DISABLE_COPY(PcbCamSymbolRcThs)
};

class PcbCamSymbolRcThoPrivate;
class TITAN_PCBCAM_EXPORT PcbCamSymbolRcTho : public PcbCamSymbol
{
public:
    PcbCamSymbolRcTho(const QString iName);
    ~PcbCamSymbolRcTho();

    QPainterPath shape() const;

    qreal width() const;
    qreal height() const;
    qreal startAngle() const;
    int numSpokes() const;
    qreal spokesGap() const;
    qreal airGap() const;


private:
    Q_DECLARE_PRIVATE(PcbCamSymbolRcTho)
    Q_DISABLE_COPY(PcbCamSymbolRcTho)
};

class PcbCamSymbolElPrivate;
class TITAN_PCBCAM_EXPORT PcbCamSymbolEl : public PcbCamSymbol
{
public:
    PcbCamSymbolEl(const QString iName);
    ~PcbCamSymbolEl();

    QPainterPath shape() const;

    QSizeF size() const;

private:
    Q_DECLARE_PRIVATE(PcbCamSymbolEl)
    Q_DISABLE_COPY(PcbCamSymbolEl)
};

class PcbCamSymbolMoirePrivate;
class TITAN_PCBCAM_EXPORT PcbCamSymbolMoire : public PcbCamSymbol
{
public:
    PcbCamSymbolMoire(const QString iName);
    ~PcbCamSymbolMoire();

    QPainterPath shape() const;

    qreal ringWidth() const;
    qreal ringGap() const;
    int numRings() const;
    qreal lineWidth() const;
    qreal lineLength() const;
    qreal lineAngle() const;

private:
    Q_DECLARE_PRIVATE(PcbCamSymbolMoire)
    Q_DISABLE_COPY(PcbCamSymbolMoire)
};

class PcbCamSymbolUserPrivate;
class TITAN_PCBCAM_EXPORT PcbCamSymbolUser : public PcbCamSymbol {
public:
    PcbCamSymbolUser(const QString iName);
    ~PcbCamSymbolUser();

    QPainterPath shape() const;

    QList<PcbCamFeature *> features() const;
    void clearFeatures();
    void addFeature(PcbCamFeature *iFeature);
    void addFeatures(const QList<PcbCamFeature *> &iFeatures);
    void deleteFeature(int iIndex);

private:
    Q_DECLARE_PRIVATE(PcbCamSymbolUser)
    Q_DISABLE_COPY(PcbCamSymbolUser)
};


#endif // TITAN_PCBCAM_SYMBOL_H
