Refactoring.
This commit is contained in:
parent
bd10a78f55
commit
6c0863ca62
File diff suppressed because it is too large
Load Diff
|
@ -68,74 +68,74 @@ public:
|
||||||
VLayoutPiece();
|
VLayoutPiece();
|
||||||
VLayoutPiece(const VLayoutPiece &detail);
|
VLayoutPiece(const VLayoutPiece &detail);
|
||||||
|
|
||||||
virtual ~VLayoutPiece() override;
|
~VLayoutPiece() override;
|
||||||
|
|
||||||
VLayoutPiece &operator=(const VLayoutPiece &detail);
|
auto operator=(const VLayoutPiece &detail) -> VLayoutPiece &;
|
||||||
#ifdef Q_COMPILER_RVALUE_REFS
|
#ifdef Q_COMPILER_RVALUE_REFS
|
||||||
VLayoutPiece(VLayoutPiece &&detail) Q_DECL_NOTHROW;
|
VLayoutPiece(VLayoutPiece &&detail) Q_DECL_NOTHROW;
|
||||||
VLayoutPiece &operator=(VLayoutPiece &&detail) Q_DECL_NOTHROW;
|
auto operator=(VLayoutPiece &&detail) Q_DECL_NOTHROW -> VLayoutPiece &;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static VLayoutPiece Create(const VPiece &piece, vidtype id, const VContainer *pattern);
|
static auto Create(const VPiece &piece, vidtype id, const VContainer *pattern) -> VLayoutPiece;
|
||||||
|
|
||||||
virtual auto GetUniqueID() const -> QString override;
|
auto GetUniqueID() const -> QString override;
|
||||||
|
|
||||||
QVector<VLayoutPoint> GetMappedContourPoints() const;
|
auto GetMappedContourPoints() const -> QVector<VLayoutPoint>;
|
||||||
QVector<VLayoutPoint> GetContourPoints() const;
|
auto GetContourPoints() const -> QVector<VLayoutPoint>;
|
||||||
void SetCountourPoints(const QVector<VLayoutPoint> &points, bool hideMainPath = false);
|
void SetCountourPoints(const QVector<VLayoutPoint> &points, bool hideMainPath = false);
|
||||||
|
|
||||||
QVector<VLayoutPoint> GetMappedSeamAllowancePoints() const;
|
auto GetMappedSeamAllowancePoints() const -> QVector<VLayoutPoint>;
|
||||||
QVector<VLayoutPoint> GetSeamAllowancePoints() const;
|
auto GetSeamAllowancePoints() const -> QVector<VLayoutPoint>;
|
||||||
void SetSeamAllowancePoints(const QVector<VLayoutPoint> &points, bool seamAllowance = true,
|
void SetSeamAllowancePoints(const QVector<VLayoutPoint> &points, bool seamAllowance = true,
|
||||||
bool seamAllowanceBuiltIn = false);
|
bool seamAllowanceBuiltIn = false);
|
||||||
|
|
||||||
QVector<QPointF> GetMappedLayoutAllowancePoints() const;
|
auto GetMappedLayoutAllowancePoints() const -> QVector<QPointF>;
|
||||||
QVector<QPointF> GetLayoutAllowancePoints() const;
|
auto GetLayoutAllowancePoints() const -> QVector<QPointF>;
|
||||||
void SetLayoutAllowancePoints();
|
void SetLayoutAllowancePoints();
|
||||||
|
|
||||||
QVector<VLayoutPoint> GetMappedExternalContourPoints() const;
|
auto GetMappedExternalContourPoints() const -> QVector<VLayoutPoint>;
|
||||||
QVector<VLayoutPoint> GetExternalContourPoints() const;
|
auto GetExternalContourPoints() const -> QVector<VLayoutPoint>;
|
||||||
|
|
||||||
QVector<VLayoutPassmark> GetMappedPassmarks() const;
|
auto GetMappedPassmarks() const -> QVector<VLayoutPassmark>;
|
||||||
QVector<VLayoutPassmark> GetPassmarks() const;
|
auto GetPassmarks() const -> QVector<VLayoutPassmark>;
|
||||||
void SetPassmarks(const QVector<VLayoutPassmark> &passmarks);
|
void SetPassmarks(const QVector<VLayoutPassmark> &passmarks);
|
||||||
|
|
||||||
QVector<VLayoutPlaceLabel> GetPlaceLabels() const;
|
auto GetPlaceLabels() const -> QVector<VLayoutPlaceLabel>;
|
||||||
void SetPlaceLabels(const QVector<VLayoutPlaceLabel> &labels);
|
void SetPlaceLabels(const QVector<VLayoutPlaceLabel> &labels);
|
||||||
|
|
||||||
QVector<QVector<VLayoutPoint> > MappedInternalPathsForCut(bool cut) const;
|
auto MappedInternalPathsForCut(bool cut) const -> QVector<QVector<VLayoutPoint> >;
|
||||||
QVector<VLayoutPiecePath> GetInternalPaths() const;
|
auto GetInternalPaths() const -> QVector<VLayoutPiecePath>;
|
||||||
void SetInternalPaths(const QVector<VLayoutPiecePath> &internalPaths);
|
void SetInternalPaths(const QVector<VLayoutPiecePath> &internalPaths);
|
||||||
|
|
||||||
QPointF GetPieceTextPosition() const;
|
auto GetPieceTextPosition() const -> QPointF;
|
||||||
QStringList GetPieceText() const;
|
auto GetPieceText() const -> QStringList;
|
||||||
void SetPieceText(const QString &qsName, const VPieceLabelData& data, const QFont& font, const VContainer *pattern);
|
void SetPieceText(const QString &qsName, const VPieceLabelData& data, const QFont& font, const VContainer *pattern);
|
||||||
|
|
||||||
QPointF GetPatternTextPosition() const;
|
auto GetPatternTextPosition() const -> QPointF;
|
||||||
QStringList GetPatternText() const;
|
auto GetPatternText() const -> QStringList;
|
||||||
void SetPatternInfo(VAbstractPattern *pDoc, const VPatternLabelData& geom, const QFont& font,
|
void SetPatternInfo(VAbstractPattern *pDoc, const VPatternLabelData& geom, const QFont& font,
|
||||||
const VContainer *pattern);
|
const VContainer *pattern);
|
||||||
|
|
||||||
void SetGrainline(const VGrainlineData& geom, const VContainer *pattern);
|
void SetGrainline(const VGrainlineData& geom, const VContainer *pattern);
|
||||||
QVector<QPointF> GetMappedGrainline() const;
|
auto GetMappedGrainline() const -> QVector<QPointF>;
|
||||||
QVector<QPointF> GetGrainline() const;
|
auto GetGrainline() const -> QVector<QPointF>;
|
||||||
bool IsGrainlineEnabled() const;
|
auto IsGrainlineEnabled() const -> bool;
|
||||||
qreal GrainlineAngle() const;
|
auto GrainlineAngle() const -> qreal;
|
||||||
GrainlineArrowDirection GrainlineArrowType() const;
|
auto GrainlineArrowType() const -> GrainlineArrowDirection;
|
||||||
|
|
||||||
QTransform GetMatrix() const;
|
auto GetMatrix() const -> QTransform;
|
||||||
void SetMatrix(const QTransform &matrix);
|
void SetMatrix(const QTransform &matrix);
|
||||||
|
|
||||||
qreal GetLayoutWidth() const;
|
auto GetLayoutWidth() const -> qreal;
|
||||||
void SetLayoutWidth(qreal value);
|
void SetLayoutWidth(qreal value);
|
||||||
|
|
||||||
quint16 GetQuantity() const;
|
auto GetQuantity() const -> quint16;
|
||||||
void SetQuantity(quint16 value);
|
void SetQuantity(quint16 value);
|
||||||
|
|
||||||
vidtype GetId() const;
|
auto GetId() const -> vidtype;
|
||||||
void SetId(vidtype id);
|
void SetId(vidtype id);
|
||||||
|
|
||||||
bool IsMirror() const;
|
auto IsMirror() const -> bool;
|
||||||
void SetMirror(bool value);
|
void SetMirror(bool value);
|
||||||
|
|
||||||
void SetGradationId(const QString &id);
|
void SetGradationId(const QString &id);
|
||||||
|
@ -154,36 +154,36 @@ public:
|
||||||
void Mirror(const QLineF &edge);
|
void Mirror(const QLineF &edge);
|
||||||
void Mirror();
|
void Mirror();
|
||||||
|
|
||||||
int DetailEdgesCount() const;
|
auto DetailEdgesCount() const -> int;
|
||||||
int LayoutEdgesCount() const;
|
auto LayoutEdgesCount() const -> int;
|
||||||
|
|
||||||
QLineF LayoutEdge(int i) const;
|
auto LayoutEdge(int i) const -> QLineF;
|
||||||
int LayoutEdgeByPoint(const QPointF &p1) const;
|
auto LayoutEdgeByPoint(const QPointF &p1) const -> int;
|
||||||
|
|
||||||
QRectF MappedDetailBoundingRect() const;
|
auto MappedDetailBoundingRect() const -> QRectF;
|
||||||
QRectF DetailBoundingRect() const;
|
auto DetailBoundingRect() const -> QRectF;
|
||||||
QRectF MappedLayoutBoundingRect() const;
|
auto MappedLayoutBoundingRect() const -> QRectF;
|
||||||
qreal Diagonal() const;
|
auto Diagonal() const -> qreal;
|
||||||
|
|
||||||
static QRectF BoundingRect(QVector<QPointF> points);
|
static auto BoundingRect(QVector<QPointF> points) -> QRectF;
|
||||||
|
|
||||||
bool isNull() const;
|
auto isNull() const -> bool;
|
||||||
qint64 Square() const;
|
auto Square() const -> qint64;
|
||||||
|
|
||||||
QPainterPath MappedContourPath() const;
|
auto MappedContourPath() const -> QPainterPath;
|
||||||
QPainterPath ContourPath() const;
|
auto ContourPath() const -> QPainterPath;
|
||||||
QPainterPath MappedLayoutAllowancePath() const;
|
auto MappedLayoutAllowancePath() const -> QPainterPath;
|
||||||
|
|
||||||
void DrawMiniature(QPainter &painter) const;
|
void DrawMiniature(QPainter &painter) const;
|
||||||
|
|
||||||
Q_REQUIRED_RESULT QGraphicsItem *GetItem(bool textAsPaths) const;
|
Q_REQUIRED_RESULT auto GetItem(bool textAsPaths) const -> QGraphicsItem *;
|
||||||
|
|
||||||
bool IsLayoutAllowanceValid() const;
|
auto IsLayoutAllowanceValid() const -> bool;
|
||||||
|
|
||||||
qreal BiggestEdge() const;
|
auto BiggestEdge() const -> qreal;
|
||||||
|
|
||||||
friend QDataStream& operator<< (QDataStream& dataStream, const VLayoutPiece& piece);
|
friend auto operator<< (QDataStream& dataStream, const VLayoutPiece& piece) -> QDataStream&;
|
||||||
friend QDataStream& operator>> (QDataStream& dataStream, VLayoutPiece& piece);
|
friend auto operator>> (QDataStream& dataStream, VLayoutPiece& piece) -> QDataStream&;
|
||||||
|
|
||||||
auto MapPlaceLabelShape(PlaceLabelImg shape) const -> PlaceLabelImg;
|
auto MapPlaceLabelShape(PlaceLabelImg shape) const -> PlaceLabelImg;
|
||||||
|
|
||||||
|
@ -208,20 +208,20 @@ protected:
|
||||||
private:
|
private:
|
||||||
QSharedDataPointer<VLayoutPieceData> d;
|
QSharedDataPointer<VLayoutPieceData> d;
|
||||||
|
|
||||||
QVector<VLayoutPoint> DetailPath() const;
|
auto DetailPath() const -> QVector<VLayoutPoint>;
|
||||||
|
|
||||||
Q_REQUIRED_RESULT QGraphicsPathItem *GetMainItem() const;
|
Q_REQUIRED_RESULT auto GetMainItem() const -> QGraphicsPathItem *;
|
||||||
Q_REQUIRED_RESULT QGraphicsPathItem *GetMainPathItem() const;
|
Q_REQUIRED_RESULT auto GetMainPathItem() const -> QGraphicsPathItem *;
|
||||||
|
|
||||||
void CreateLabelStrings(QGraphicsItem *parent, const QVector<QPointF> &labelShape, const VTextManager &tm,
|
void CreateLabelStrings(QGraphicsItem *parent, const QVector<QPointF> &labelShape, const VTextManager &tm,
|
||||||
bool textAsPaths) const;
|
bool textAsPaths) const;
|
||||||
void CreateGrainlineItem(QGraphicsItem *parent) const;
|
void CreateGrainlineItem(QGraphicsItem *parent) const;
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
QVector<T> Map(QVector<T> points) const;
|
auto Map(QVector<T> points) const -> QVector<T>;
|
||||||
|
|
||||||
QLineF Edge(const QVector<QPointF> &path, int i) const;
|
auto Edge(const QVector<QPointF> &path, int i) const -> QLineF;
|
||||||
int EdgeByPoint(const QVector<QPointF> &path, const QPointF &p1) const;
|
auto EdgeByPoint(const QVector<QPointF> &path, const QPointF &p1) const -> int;
|
||||||
};
|
};
|
||||||
|
|
||||||
QT_WARNING_POP
|
QT_WARNING_POP
|
||||||
|
|
Loading…
Reference in New Issue
Block a user