#include <vlayoutgenerator.h>
Public Slots | |
void | Abort () |
Signals | |
void | Start () |
void | Arranged (int count) |
void | Error (const LayoutErrors &state) |
void | Finished () |
Public Member Functions | |
VLayoutGenerator (QObject *parent=nullptr) | |
virtual | ~VLayoutGenerator () Q_DECL_OVERRIDE |
void | setPieces (const QVector< VLayoutPiece > &details) |
void | SetLayoutWidth (qreal width) |
void | SetCaseType (Cases caseType) |
int | PieceCount () |
qreal | GetPaperHeight () const |
void | SetPaperHeight (qreal value) |
qreal | GetPaperWidth () const |
void | SetPaperWidth (qreal value) |
bool | IsUsePrinterFields () const |
QMarginsF | GetPrinterFields () const |
void | SetPrinterFields (bool usePrinterFields, const QMarginsF &value) |
quint32 | GetShift () const |
void | SetShift (quint32 shift) |
void | Generate () |
LayoutErrors | State () const |
Q_REQUIRED_RESULT QList< QGraphicsItem * > | GetPapersItems () const |
Q_REQUIRED_RESULT QList< QList< QGraphicsItem * > > | getAllPieceItems () const |
QVector< QVector< VLayoutPiece > > | getAllPieces () const |
bool | GetRotate () const |
void | SetRotate (bool value) |
int | GetRotationIncrease () const |
void | SetRotationIncrease (int value) |
bool | GetAutoCrop () const |
void | SetAutoCrop (bool value) |
bool | IsSaveLength () const |
void | SetSaveLength (bool value) |
bool | IsUnitePages () const |
void | SetUnitePages (bool value) |
quint8 | GetMultiplier () const |
void | SetMultiplier (const quint8 &value) |
bool | IsStripOptimization () const |
void | SetStripOptimization (bool value) |
bool | IsTestAsPaths () const |
void | SetTestAsPaths (bool value) |
Private Member Functions | |
int | PageHeight () const |
int | PageWidth () const |
void | GatherPages () |
void | UnitePages () |
void | unitePieces (int j, QList< QList< VLayoutPiece > > &pieces, qreal length, int i) |
void | UnitePapers (int j, QList< qreal > &papersLength, qreal length) |
QList< VLayoutPiece > | movePieces (qreal length, const QVector< VLayoutPiece > &pieces) |
Private Attributes | |
QVector< VLayoutPaper > | papers |
VBank * | bank |
qreal | paperHeight |
qreal | paperWidth |
QMarginsF | margins |
bool | usePrinterFields |
std::atomic_bool | stopGeneration |
LayoutErrors | state |
quint32 | shift |
bool | rotate |
int | rotationIncrease |
bool | autoCrop |
bool | saveLength |
bool | unitePages |
bool | stripOptimizationEnabled |
quint8 | multiplier |
bool | stripOptimization |
bool | textAsPaths |
Definition at line 74 of file vlayoutgenerator.h.
|
explicit |
Definition at line 64 of file vlayoutgenerator.cpp.
|
virtual |
Definition at line 92 of file vlayoutgenerator.cpp.
References bank.
|
slot |
Definition at line 264 of file vlayoutgenerator.cpp.
References ProcessStoped, state, and stopGeneration.
Referenced by MainWindowsNoGUI::LayoutSettings().
|
signal |
Referenced by Generate(), and MainWindowsNoGUI::LayoutSettings().
|
signal |
Referenced by Generate(), and MainWindowsNoGUI::LayoutSettings().
|
signal |
Referenced by Generate(), and MainWindowsNoGUI::LayoutSettings().
|
private |
Definition at line 331 of file vlayoutgenerator.cpp.
References bank, VBank::GetLayoutWidth(), PageHeight(), PageWidth(), paperHeight, papers, rotate, rotationIncrease, saveLength, VLayoutPaper::SetLayoutWidth(), VLayoutPaper::SetPaperIndex(), VLayoutPaper::setPieces(), VLayoutPaper::SetRotate(), VLayoutPaper::SetRotationIncrease(), VLayoutPaper::SetSaveLength(), VLayoutPaper::SetShift(), shift, and unitePieces().
Referenced by Generate().
void VLayoutGenerator::Generate | ( | ) |
Definition at line 123 of file vlayoutgenerator.cpp.
References VBank::allPieceCount(), Arranged(), VBank::Arranged(), VBank::ArrangedCount(), VLayoutPaper::arrangePiece(), bank, VLayoutPaper::Count(), EmptyPaperError, Error(), Finished(), GatherPages(), VBank::GetBiggestDiagonal(), VBank::GetLayoutWidth(), VBank::getPiece(), VBank::GetTiket(), IsUnitePages(), VBank::LeftArrange(), multiplier, NoError, VBank::NotArranged(), PageHeight(), PageWidth(), papers, VBank::Prepare(), PrepareLayoutError, rotate, rotationIncrease, saveLength, VLayoutPaper::SetLayoutWidth(), VLayoutPaper::SetPaperIndex(), VLayoutPaper::SetRotate(), VLayoutPaper::SetRotationIncrease(), VLayoutPaper::SetSaveLength(), VLayoutPaper::SetShift(), shift, Start(), state, stopGeneration, stripOptimization, stripOptimizationEnabled, and UnitePages().
Referenced by MainWindowsNoGUI::LayoutSettings().
Definition at line 242 of file vlayoutgenerator.cpp.
References IsTestAsPaths(), and papers.
Referenced by MainWindowsNoGUI::LayoutSettings().
QVector< QVector< VLayoutPiece > > VLayoutGenerator::getAllPieces | ( | ) | const |
Definition at line 253 of file vlayoutgenerator.cpp.
References papers.
Referenced by MainWindowsNoGUI::LayoutSettings().
bool VLayoutGenerator::GetAutoCrop | ( | ) | const |
Definition at line 519 of file vlayoutgenerator.cpp.
References autoCrop.
Referenced by MainWindowsNoGUI::LayoutSettings().
quint8 VLayoutGenerator::GetMultiplier | ( | ) | const |
Definition at line 296 of file vlayoutgenerator.cpp.
References multiplier.
qreal VLayoutGenerator::GetPaperHeight | ( | ) | const |
Definition at line 604 of file vlayoutgenerator.cpp.
References paperHeight.
Referenced by MainWindowsNoGUI::LayoutSettings().
QList< QGraphicsItem * > VLayoutGenerator::GetPapersItems | ( | ) | const |
Definition at line 231 of file vlayoutgenerator.cpp.
References autoCrop, IsTestAsPaths(), and papers.
Referenced by MainWindowsNoGUI::LayoutSettings().
qreal VLayoutGenerator::GetPaperWidth | ( | ) | const |
Definition at line 561 of file vlayoutgenerator.cpp.
References paperWidth.
Referenced by MainWindowsNoGUI::LayoutSettings().
QMarginsF VLayoutGenerator::GetPrinterFields | ( | ) | const |
Definition at line 579 of file vlayoutgenerator.cpp.
References margins.
Referenced by MainWindowsNoGUI::LayoutSettings().
bool VLayoutGenerator::GetRotate | ( | ) | const |
Definition at line 549 of file vlayoutgenerator.cpp.
References rotate.
int VLayoutGenerator::GetRotationIncrease | ( | ) | const |
Definition at line 532 of file vlayoutgenerator.cpp.
References rotationIncrease.
quint32 VLayoutGenerator::GetShift | ( | ) | const |
Definition at line 592 of file vlayoutgenerator.cpp.
References shift.
bool VLayoutGenerator::IsSaveLength | ( | ) | const |
Definition at line 507 of file vlayoutgenerator.cpp.
References saveLength.
bool VLayoutGenerator::IsStripOptimization | ( | ) | const |
Definition at line 272 of file vlayoutgenerator.cpp.
References stripOptimization.
bool VLayoutGenerator::IsTestAsPaths | ( | ) | const |
Definition at line 284 of file vlayoutgenerator.cpp.
References textAsPaths.
Referenced by getAllPieceItems(), and GetPapersItems().
bool VLayoutGenerator::IsUnitePages | ( | ) | const |
Definition at line 495 of file vlayoutgenerator.cpp.
References unitePages.
Referenced by Generate(), and MainWindowsNoGUI::LayoutSettings().
bool VLayoutGenerator::IsUsePrinterFields | ( | ) | const |
Definition at line 573 of file vlayoutgenerator.cpp.
References usePrinterFields.
Referenced by MainWindowsNoGUI::LayoutSettings().
|
private |
Definition at line 476 of file vlayoutgenerator.cpp.
References VLayoutPiece::Translate().
Referenced by unitePieces().
|
private |
Definition at line 319 of file vlayoutgenerator.cpp.
References margins, and paperHeight.
Referenced by GatherPages(), and Generate().
|
private |
Definition at line 325 of file vlayoutgenerator.cpp.
References margins, and paperWidth.
Referenced by GatherPages(), Generate(), and UnitePages().
int VLayoutGenerator::PieceCount | ( | ) |
Definition at line 117 of file vlayoutgenerator.cpp.
References VBank::allPieceCount(), and bank.
void VLayoutGenerator::SetAutoCrop | ( | bool | value | ) |
Definition at line 525 of file vlayoutgenerator.cpp.
References autoCrop.
Referenced by DialogLayoutSettings::DialogAccepted().
void VLayoutGenerator::SetCaseType | ( | Cases | caseType | ) |
Definition at line 110 of file vlayoutgenerator.cpp.
References bank, and VBank::SetCaseType().
Referenced by DialogLayoutSettings::DialogAccepted().
void VLayoutGenerator::SetLayoutWidth | ( | qreal | width | ) |
Definition at line 104 of file vlayoutgenerator.cpp.
References bank, and VBank::SetLayoutWidth().
Referenced by DialogLayoutSettings::DialogAccepted().
void VLayoutGenerator::SetMultiplier | ( | const quint8 & | value | ) |
Definition at line 302 of file vlayoutgenerator.cpp.
References multiplier.
Referenced by DialogLayoutSettings::DialogAccepted().
void VLayoutGenerator::SetPaperHeight | ( | qreal | value | ) |
Definition at line 610 of file vlayoutgenerator.cpp.
References paperHeight.
Referenced by DialogLayoutSettings::DialogAccepted().
void VLayoutGenerator::SetPaperWidth | ( | qreal | value | ) |
Definition at line 567 of file vlayoutgenerator.cpp.
References paperWidth.
Referenced by DialogLayoutSettings::DialogAccepted().
void VLayoutGenerator::setPieces | ( | const QVector< VLayoutPiece > & | details | ) |
Definition at line 98 of file vlayoutgenerator.cpp.
References bank, and VBank::setPieces().
Referenced by MainWindowsNoGUI::LayoutSettings().
void VLayoutGenerator::SetPrinterFields | ( | bool | usePrinterFields, |
const QMarginsF & | value | ||
) |
Definition at line 585 of file vlayoutgenerator.cpp.
References margins, and usePrinterFields.
Referenced by DialogLayoutSettings::DialogAccepted().
void VLayoutGenerator::SetRotate | ( | bool | value | ) |
Definition at line 555 of file vlayoutgenerator.cpp.
References rotate.
Referenced by DialogLayoutSettings::DialogAccepted().
void VLayoutGenerator::SetRotationIncrease | ( | int | value | ) |
Definition at line 538 of file vlayoutgenerator.cpp.
References rotationIncrease.
Referenced by DialogLayoutSettings::DialogAccepted().
void VLayoutGenerator::SetSaveLength | ( | bool | value | ) |
Definition at line 513 of file vlayoutgenerator.cpp.
References saveLength.
Referenced by DialogLayoutSettings::DialogAccepted().
void VLayoutGenerator::SetShift | ( | quint32 | shift | ) |
Definition at line 598 of file vlayoutgenerator.cpp.
References shift.
Referenced by DialogLayoutSettings::DialogAccepted().
void VLayoutGenerator::SetStripOptimization | ( | bool | value | ) |
Definition at line 278 of file vlayoutgenerator.cpp.
References stripOptimization.
Referenced by DialogLayoutSettings::DialogAccepted().
void VLayoutGenerator::SetTestAsPaths | ( | bool | value | ) |
Definition at line 290 of file vlayoutgenerator.cpp.
References textAsPaths.
Referenced by DialogLayoutSettings::DialogAccepted().
void VLayoutGenerator::SetUnitePages | ( | bool | value | ) |
Definition at line 501 of file vlayoutgenerator.cpp.
References unitePages.
Referenced by DialogLayoutSettings::DialogAccepted().
|
signal |
Referenced by Generate(), and MainWindowsNoGUI::LayoutSettings().
LayoutErrors VLayoutGenerator::State | ( | ) | const |
Definition at line 225 of file vlayoutgenerator.cpp.
References state.
Referenced by MainWindowsNoGUI::LayoutSettings().
|
private |
Definition at line 385 of file vlayoutgenerator.cpp.
References autoCrop, bank, VBank::GetLayoutWidth(), PageWidth(), paperHeight, papers, QIMAGE_MAX, rotate, rotationIncrease, saveLength, VLayoutPaper::SetLayoutWidth(), VLayoutPaper::SetPaperIndex(), VLayoutPaper::setPieces(), VLayoutPaper::SetRotate(), VLayoutPaper::SetRotationIncrease(), VLayoutPaper::SetSaveLength(), VLayoutPaper::SetShift(), shift, UnitePapers(), and unitePieces().
Referenced by Generate().
|
private |
Definition at line 463 of file vlayoutgenerator.cpp.
Referenced by UnitePages().
|
private |
Definition at line 450 of file vlayoutgenerator.cpp.
References movePieces(), and papers.
Referenced by GatherPages(), and UnitePages().
|
private |
Definition at line 154 of file vlayoutgenerator.h.
Referenced by GetAutoCrop(), GetPapersItems(), SetAutoCrop(), and UnitePages().
|
private |
Definition at line 144 of file vlayoutgenerator.h.
Referenced by GatherPages(), Generate(), PieceCount(), SetCaseType(), SetLayoutWidth(), setPieces(), UnitePages(), and ~VLayoutGenerator().
|
private |
Definition at line 147 of file vlayoutgenerator.h.
Referenced by GetPrinterFields(), PageHeight(), PageWidth(), and SetPrinterFields().
|
private |
Definition at line 158 of file vlayoutgenerator.h.
Referenced by Generate(), GetMultiplier(), and SetMultiplier().
|
private |
Definition at line 145 of file vlayoutgenerator.h.
Referenced by GatherPages(), GetPaperHeight(), PageHeight(), SetPaperHeight(), and UnitePages().
|
private |
Definition at line 143 of file vlayoutgenerator.h.
Referenced by GatherPages(), Generate(), getAllPieceItems(), getAllPieces(), GetPapersItems(), UnitePages(), and unitePieces().
|
private |
Definition at line 146 of file vlayoutgenerator.h.
Referenced by GetPaperWidth(), PageWidth(), and SetPaperWidth().
|
private |
Definition at line 152 of file vlayoutgenerator.h.
Referenced by GatherPages(), Generate(), GetRotate(), SetRotate(), and UnitePages().
|
private |
Definition at line 153 of file vlayoutgenerator.h.
Referenced by GatherPages(), Generate(), GetRotationIncrease(), SetRotationIncrease(), and UnitePages().
|
private |
Definition at line 155 of file vlayoutgenerator.h.
Referenced by GatherPages(), Generate(), IsSaveLength(), SetSaveLength(), and UnitePages().
|
private |
Definition at line 151 of file vlayoutgenerator.h.
Referenced by GatherPages(), Generate(), GetShift(), SetShift(), and UnitePages().
|
private |
Definition at line 150 of file vlayoutgenerator.h.
Referenced by Abort(), Generate(), and State().
|
private |
Definition at line 149 of file vlayoutgenerator.h.
Referenced by Abort(), and Generate().
|
private |
Definition at line 159 of file vlayoutgenerator.h.
Referenced by Generate(), IsStripOptimization(), and SetStripOptimization().
|
private |
Definition at line 157 of file vlayoutgenerator.h.
Referenced by Generate().
|
private |
Definition at line 160 of file vlayoutgenerator.h.
Referenced by IsTestAsPaths(), and SetTestAsPaths().
|
private |
Definition at line 156 of file vlayoutgenerator.h.
Referenced by IsUnitePages(), and SetUnitePages().
|
private |
Definition at line 148 of file vlayoutgenerator.h.
Referenced by IsUsePrinterFields(), and SetPrinterFields().