PieceGLWidget Class Reference

PieceGLWidget is the small OpenGL widget in the solution sidebar which shows the current piece. More...

#include <ModelHelpDlg.h>

Inherits GLWidget.

Inheritance diagram for PieceGLWidget:

Inheritance graph
[legend]
Collaboration diagram for PieceGLWidget:

Collaboration graph
[legend]
List of all members.

Public Slots

void externRotate (GLWidget::EAxis axis, int x, int y)
 The main solution view is rotating, We need to keep up with it.
void clear ()
 clear the view of any object in it. forget any state we may have had.

Public Member Functions

 PieceGLWidget (QWidget *parent, CubeDoc *doc, QGLWidget *shareFrom)
virtual ~PieceGLWidget ()
virtual void myPaintGL ()
void setSelectedPiece (int p)
void setSelectAll (int piece)
virtual void mouseMoveEvent (QMouseEvent *event)
 we're moving independently from the main solution view.

Private Attributes

CubeDocm_doc
int m_lastSelectedPiece
int m_selectedPiece
bool m_bSelectAll
bool m_bHasPushedMatrix
 true when the user rotated the model in this view independendtly from the rotation of the main solution view.

Detailed Description

PieceGLWidget is the small OpenGL widget in the solution sidebar which shows the current piece.

The piece viewed is the last piece hovered by the mouse in the main ModelGLWidget. This view is mostly for convenience so that the user would be able to see the exact shape and orientation of a possibly obscured piece in the solution. When the user right clicks a piece in the main solution view the solution view and the piece view switch places so that the single piece is displayed in the main view and the whole solution is displayed in the piece view. The object in the piece view can be freely rotated on its own but it will reset its rotation when the there is a rotation in the main view or when a different piece is selected. This class uses the static ModelGLWidget::paint() to do all its 3D display.

See also:
ModelGLWidget ModelHelpDlg


Constructor & Destructor Documentation

PieceGLWidget::PieceGLWidget ( QWidget *  parent,
CubeDoc doc,
QGLWidget *  shareFrom 
)

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


Member Function Documentation

void PieceGLWidget::myPaintGL (  )  [virtual]

Reimplemented from GLWidget.

void PieceGLWidget::setSelectedPiece ( int  p  ) 

void PieceGLWidget::setSelectAll ( int  piece  ) 

void PieceGLWidget::mouseMoveEvent ( QMouseEvent *  event  )  [virtual]

we're moving independently from the main solution view.

Reimplemented from GLWidget.

void PieceGLWidget::externRotate ( GLWidget::EAxis  axis,
int  x,
int  y 
) [slot]

The main solution view is rotating, We need to keep up with it.

void PieceGLWidget::clear (  )  [slot]

clear the view of any object in it. forget any state we may have had.


Member Data Documentation

true when the user rotated the model in this view independendtly from the rotation of the main solution view.


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