Seamly2D
Code documentation
VBank Class Reference

#include <vbank.h>

Collaboration diagram for VBank:

Public Member Functions

 VBank ()
 
qreal GetLayoutWidth () const
 
void SetLayoutWidth (const qreal &value)
 
void setPieces (const QVector< VLayoutPiece > &pieces)
 
int GetTiket ()
 
VLayoutPiece getPiece (int i) const
 
void Arranged (int i)
 
void NotArranged (int i)
 
bool Prepare ()
 
void Reset ()
 
void SetCaseType (Cases caseType)
 
int allPieceCount () const
 
int LeftArrange () const
 
int ArrangedCount () const
 
qreal GetBiggestDiagonal () const
 

Private Member Functions

void PrepareGroup ()
 
void PrepareThreeGroups ()
 
void PrepareTwoGroups ()
 
void PrepareDescGroup ()
 
int GetNextThreeGroups () const
 
int GetNextTwoGroups () const
 
int GetNextDescGroup () const
 
void SqMaxMin (qint64 &sMax, qint64 &sMin) const
 

Private Attributes

QVector< VLayoutPiecepieces
 
QHash< int, qint64 > unsorted
 
QHash< int, qint64 > big
 
QHash< int, qint64 > middle
 
QHash< int, qint64 > small
 
qreal layoutWidth
 
Cases caseType
 
bool prepare
 
qreal diagonal
 

Detailed Description

Definition at line 73 of file vbank.h.

Constructor & Destructor Documentation

◆ VBank()

QT_WARNING_PUSH QT_WARNING_POP VBank::VBank ( )

Definition at line 78 of file vbank.cpp.

References CaseDesc.

Member Function Documentation

◆ allPieceCount()

int VBank::allPieceCount ( ) const

Definition at line 263 of file vbank.cpp.

References big, middle, small, and unsorted.

Referenced by ArrangedCount(), VLayoutGenerator::Generate(), and VLayoutGenerator::PieceCount().

◆ Arranged()

void VBank::Arranged ( int  i)

Definition at line 156 of file vbank.cpp.

References big, middle, and small.

Referenced by VLayoutGenerator::Generate().

◆ ArrangedCount()

int VBank::ArrangedCount ( ) const

Definition at line 281 of file vbank.cpp.

References allPieceCount(), and pieces.

Referenced by VLayoutGenerator::Generate().

◆ GetBiggestDiagonal()

qreal VBank::GetBiggestDiagonal ( ) const

Definition at line 275 of file vbank.cpp.

References diagonal.

Referenced by VLayoutGenerator::Generate().

◆ GetLayoutWidth()

qreal VBank::GetLayoutWidth ( ) const

◆ GetNextDescGroup()

int VBank::GetNextDescGroup ( ) const
private

Definition at line 411 of file vbank.cpp.

References big.

Referenced by GetTiket().

◆ GetNextThreeGroups()

int VBank::GetNextThreeGroups ( ) const
private

Definition at line 369 of file vbank.cpp.

References big, middle, and small.

Referenced by GetTiket().

◆ GetNextTwoGroups()

int VBank::GetNextTwoGroups ( ) const
private

Definition at line 393 of file vbank.cpp.

References big, and small.

Referenced by GetTiket().

◆ getPiece()

VLayoutPiece VBank::getPiece ( int  i) const

Definition at line 143 of file vbank.cpp.

References pieces.

Referenced by VLayoutGenerator::Generate().

◆ GetTiket()

◆ LeftArrange()

int VBank::LeftArrange ( ) const

Definition at line 269 of file vbank.cpp.

References big, middle, and small.

Referenced by VLayoutGenerator::Generate(), and GetTiket().

◆ NotArranged()

void VBank::NotArranged ( int  i)

Definition at line 177 of file vbank.cpp.

References big, middle, small, and unsorted.

Referenced by VLayoutGenerator::Generate().

◆ Prepare()

bool VBank::Prepare ( )

Definition at line 201 of file vbank.cpp.

References diagonal, layoutWidth, pieces, prepare, PrepareGroup(), and unsorted.

Referenced by VLayoutGenerator::Generate().

◆ PrepareDescGroup()

void VBank::PrepareDescGroup ( )
private

Definition at line 362 of file vbank.cpp.

References big, and unsorted.

Referenced by PrepareGroup().

◆ PrepareGroup()

void VBank::PrepareGroup ( )
private

◆ PrepareThreeGroups()

void VBank::PrepareThreeGroups ( )
private

Definition at line 306 of file vbank.cpp.

References big, middle, small, SqMaxMin(), and unsorted.

Referenced by PrepareGroup().

◆ PrepareTwoGroups()

void VBank::PrepareTwoGroups ( )
private

Definition at line 337 of file vbank.cpp.

References big, small, SqMaxMin(), and unsorted.

Referenced by PrepareGroup().

◆ Reset()

void VBank::Reset ( )

Definition at line 246 of file vbank.cpp.

References big, diagonal, middle, prepare, small, and unsorted.

Referenced by SetLayoutWidth(), and setPieces().

◆ SetCaseType()

void VBank::SetCaseType ( Cases  caseType)

Definition at line 257 of file vbank.cpp.

References caseType.

Referenced by VLayoutGenerator::SetCaseType().

◆ SetLayoutWidth()

void VBank::SetLayoutWidth ( const qreal &  value)

Definition at line 96 of file vbank.cpp.

References layoutWidth, and Reset().

Referenced by VLayoutGenerator::SetLayoutWidth().

◆ setPieces()

void VBank::setPieces ( const QVector< VLayoutPiece > &  pieces)

Definition at line 103 of file vbank.cpp.

References pieces, and Reset().

Referenced by VLayoutGenerator::setPieces().

◆ SqMaxMin()

void VBank::SqMaxMin ( qint64 &  sMax,
qint64 &  sMin 
) const
private

Definition at line 432 of file vbank.cpp.

References unsorted.

Referenced by PrepareThreeGroups(), and PrepareTwoGroups().

Member Data Documentation

◆ big

◆ caseType

Cases VBank::caseType
private

Definition at line 109 of file vbank.h.

Referenced by GetTiket(), PrepareGroup(), and SetCaseType().

◆ diagonal

qreal VBank::diagonal
private

Definition at line 111 of file vbank.h.

Referenced by GetBiggestDiagonal(), Prepare(), and Reset().

◆ layoutWidth

qreal VBank::layoutWidth
private

Definition at line 107 of file vbank.h.

Referenced by GetLayoutWidth(), Prepare(), and SetLayoutWidth().

◆ middle

QHash<int, qint64> VBank::middle
private

◆ pieces

QVector<VLayoutPiece> VBank::pieces
private

Definition at line 100 of file vbank.h.

Referenced by ArrangedCount(), getPiece(), Prepare(), and setPieces().

◆ prepare

bool VBank::prepare
private

Definition at line 110 of file vbank.h.

Referenced by GetTiket(), Prepare(), and Reset().

◆ small

QHash<int, qint64> VBank::small
private

◆ unsorted

QHash<int, qint64> VBank::unsorted
private

The documentation for this class was generated from the following files: