#include <vbestsquare.h>
Public Member Functions | |
VBestSquare (const QSizeF &sheetSize, bool saveLength) | |
void | NewResult (const QSizeF &candidate, int i, int j, const QTransform &transform, bool mirror, BestFrom type) |
void | NewResult (const VBestSquare &best) |
QSizeF | BestSize () const |
int | GContourEdge () const |
int | pieceEdge () const |
QTransform | Transform () const |
bool | ValidResult () const |
bool | isMirror () const |
BestFrom | Type () const |
bool | IsSaveLength () const |
Static Private Member Functions | |
static qint64 | Square (const QSizeF &size) |
Private Attributes | |
int | resI |
int | resJ |
QTransform | resTransform |
QSizeF | bestSize |
qreal | sheetWidth |
bool | valideResult |
bool | resMirror |
BestFrom | type |
bool | saveLength |
Definition at line 61 of file vbestsquare.h.
VBestSquare::VBestSquare | ( | const QSizeF & | sheetSize, |
bool | saveLength | ||
) |
Definition at line 57 of file vbestsquare.cpp.
References Rotation.
QSizeF VBestSquare::BestSize | ( | ) | const |
int VBestSquare::GContourEdge | ( | ) | const |
Definition at line 119 of file vbestsquare.cpp.
References resI.
Referenced by NewResult(), and VLayoutPaper::SaveResult().
bool VBestSquare::isMirror | ( | ) | const |
Definition at line 143 of file vbestsquare.cpp.
References resMirror.
Referenced by NewResult(), and VLayoutPaper::SaveResult().
bool VBestSquare::IsSaveLength | ( | ) | const |
void VBestSquare::NewResult | ( | const QSizeF & | candidate, |
int | i, | ||
int | j, | ||
const QTransform & | transform, | ||
bool | mirror, | ||
BestFrom | type | ||
) |
Definition at line 69 of file vbestsquare.cpp.
References bestSize, resI, resJ, resMirror, resTransform, saveLength, sheetWidth, Square(), type, and valideResult.
Referenced by VLayoutPaper::AddToSheet(), NewResult(), and VPosition::SaveCandidate().
void VBestSquare::NewResult | ( | const VBestSquare & | best | ) |
Definition at line 104 of file vbestsquare.cpp.
References BestSize(), GContourEdge(), isMirror(), IsSaveLength(), NewResult(), pieceEdge(), saveLength, Transform(), Type(), and ValidResult().
int VBestSquare::pieceEdge | ( | ) | const |
Definition at line 125 of file vbestsquare.cpp.
References resJ.
Referenced by NewResult(), and VLayoutPaper::SaveResult().
|
staticprivate |
Definition at line 161 of file vbestsquare.cpp.
Referenced by NewResult().
QTransform VBestSquare::Transform | ( | ) | const |
Definition at line 131 of file vbestsquare.cpp.
References resTransform.
Referenced by NewResult(), and VLayoutPaper::SaveResult().
BestFrom VBestSquare::Type | ( | ) | const |
Definition at line 149 of file vbestsquare.cpp.
References type.
Referenced by NewResult(), and VLayoutPaper::SaveResult().
bool VBestSquare::ValidResult | ( | ) | const |
Definition at line 137 of file vbestsquare.cpp.
References valideResult.
Referenced by NewResult(), and VLayoutPaper::SaveResult().
|
private |
Definition at line 84 of file vbestsquare.h.
Referenced by BestSize(), and NewResult().
|
private |
Definition at line 81 of file vbestsquare.h.
Referenced by GContourEdge(), and NewResult().
|
private |
Definition at line 82 of file vbestsquare.h.
Referenced by NewResult(), and pieceEdge().
|
private |
Definition at line 87 of file vbestsquare.h.
Referenced by isMirror(), and NewResult().
|
private |
Definition at line 83 of file vbestsquare.h.
Referenced by NewResult(), and Transform().
|
private |
Definition at line 89 of file vbestsquare.h.
Referenced by IsSaveLength(), and NewResult().
|
private |
Definition at line 85 of file vbestsquare.h.
Referenced by NewResult().
|
private |
Definition at line 88 of file vbestsquare.h.
Referenced by NewResult(), and Type().
|
private |
Definition at line 86 of file vbestsquare.h.
Referenced by NewResult(), and ValidResult().