PicsSelectWidget Class Reference

PicsSelectWidget is the detailed piece selection window. More...

#include <PicsSelectWidget.h>

Collaboration diagram for PicsSelectWidget:

Collaboration graph
[legend]
List of all members.

Public Slots

void continueCreate ()
 continue the creation of the widgets once the pieces XML was loaded.
void pressedPicButton (int data, bool checked)
void changedNumBox (int data, int num)
void pressedGlobalAll ()
void pressedGlobalNone ()
void changeTab (int data)
void changedTabBox (int count)
void changeFamBox (int count, int data)
void setBuildTilesCount (int n)
void changeToResetValues ()
void updateView (int hint)
 update the view according to the current state in the PicBucket.

Signals

void changedPieceCount (int num)
void switchToDesign ()

Public Member Functions

 PicsSelectWidget (QWidget *parent, CubeDoc *document)
virtual ~PicsSelectWidget ()
virtual QSize minimumSizeHint () const

Private Slots

void updateSetsSpinBox (int index)
void changedGrpBox (int val, int data)

Private Member Functions

void UpdateCount ()
void UpdatePic (int g, int p, int num)
void UpdateSolNum (int g, int p, int num)
void UpdateSolveText (int first, int second)
void updateFamSelected ()
void updateNumLabel ()
int calcGrpSelected (int g)
void globalSignalBlock (bool block)
 this method is part of the signal storm control mechanism that is in place to avoid the cascading signaling from cross referenced widgets.
void famSignalBlock (bool block)
 this method is part of the signal storm control mechanism that is in place to avoid the cascading signaling from cross referenced widgets.

Private Attributes

QVector< GroupCtrlm_groups
CubeDocm_doc
bool m_bFinishedCreate
QVBoxLayout * m_layout
QPalette * m_slvPalette
QPalette * m_countPalette
QPushButton * m_selectAllBot
QPushButton * m_selectNoneBot
QLabel * m_solveLabel
QLabel * m_numLabel
DataSpinBoxm_selectCurrent
QTabWidget * m_tabs
int m_currentGlobalCount
 optimization for UpdateCount
int m_currentBuildTilesCount
bool m_bIncomingSignalsBlocked
int m_nGblocked
int m_nFblocked

Classes

struct  GroupCtrl
 GroupCtrl holds the widgets relevant for a group of pieces. . More...
struct  PicCtrl
 PicCtrl holds the widgets relevant for a single piece in PicsSelectWidget. More...

Detailed Description

PicsSelectWidget is the detailed piece selection window.

It appears when the used presses the "advanced" button in the piece selection widget in the design view. it allows the user to select pieces for the solution in a move fine grained manner, down to the single piece. Every family of pieces has its own tab in the PicsSelectWidget. In the family tab the user can see all the pieces of the family and select them individually. Additionally, when viewing a solution, the widget displays how many instances of every piece participate in it. This widget contains quite alot of labels, buttons and spinboxes which are cross referenced. in a naive implementation a change to one of them is likely to cause a cascading change which repeats itself many times and causes significat delay in the GUI. The widgets in this class are carefully tuned and optimized to avoid these cascading changes and minimize the delay.


Constructor & Destructor Documentation

PicsSelectWidget::PicsSelectWidget ( QWidget *  parent,
CubeDoc document 
)

virtual PicsSelectWidget::~PicsSelectWidget (  )  [inline, virtual]


Member Function Documentation

virtual QSize PicsSelectWidget::minimumSizeHint (  )  const [inline, virtual]

void PicsSelectWidget::continueCreate (  )  [slot]

continue the creation of the widgets once the pieces XML was loaded.

this is where all the work of creating the family tabs and their content is performed.

void PicsSelectWidget::pressedPicButton ( int  data,
bool  checked 
) [slot]

void PicsSelectWidget::changedNumBox ( int  data,
int  num 
) [slot]

void PicsSelectWidget::pressedGlobalAll (  )  [slot]

void PicsSelectWidget::pressedGlobalNone (  )  [slot]

void PicsSelectWidget::changeTab ( int  data  )  [slot]

void PicsSelectWidget::changedTabBox ( int  count  )  [slot]

void PicsSelectWidget::changeFamBox ( int  count,
int  data 
) [slot]

void PicsSelectWidget::setBuildTilesCount ( int  n  )  [slot]

void PicsSelectWidget::changeToResetValues (  )  [slot]

void PicsSelectWidget::updateView ( int  hint  )  [slot]

update the view according to the current state in the PicBucket.

void PicsSelectWidget::changedPieceCount ( int  num  )  [signal]

void PicsSelectWidget::switchToDesign (  )  [signal]

void PicsSelectWidget::updateSetsSpinBox ( int  index  )  [private, slot]

void PicsSelectWidget::changedGrpBox ( int  val,
int  data 
) [private, slot]

void PicsSelectWidget::UpdateCount (  )  [private]

void PicsSelectWidget::UpdatePic ( int  g,
int  p,
int  num 
) [private]

void PicsSelectWidget::UpdateSolNum ( int  g,
int  p,
int  num 
) [private]

void PicsSelectWidget::UpdateSolveText ( int  first,
int  second 
) [private]

void PicsSelectWidget::updateFamSelected (  )  [private]

void PicsSelectWidget::updateNumLabel (  )  [private]

int PicsSelectWidget::calcGrpSelected ( int  g  )  [private]

void PicsSelectWidget::globalSignalBlock ( bool  block  )  [private]

this method is part of the signal storm control mechanism that is in place to avoid the cascading signaling from cross referenced widgets.

blocks everything. virtually all signals are blocked. this method also employs a stack so it can be called multiple times from nestsing recusion levels.

void PicsSelectWidget::famSignalBlock ( bool  block  )  [private]

this method is part of the signal storm control mechanism that is in place to avoid the cascading signaling from cross referenced widgets.


Member Data Documentation

QVBoxLayout* PicsSelectWidget::m_layout [private]

QPalette* PicsSelectWidget::m_slvPalette [private]

QPalette * PicsSelectWidget::m_countPalette [private]

QPushButton* PicsSelectWidget::m_selectAllBot [private]

QPushButton* PicsSelectWidget::m_selectNoneBot [private]

QLabel* PicsSelectWidget::m_solveLabel [private]

QLabel* PicsSelectWidget::m_numLabel [private]

QTabWidget* PicsSelectWidget::m_tabs [private]

optimization for UpdateCount


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