#include <ModelHelpDlg.h>
Inherits GLWidget.
Inheritance diagram for PieceGLWidget:
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 | |
CubeDoc * | m_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. |
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.
PieceGLWidget::PieceGLWidget | ( | QWidget * | parent, | |
CubeDoc * | doc, | |||
QGLWidget * | shareFrom | |||
) |
virtual PieceGLWidget::~PieceGLWidget | ( | ) | [inline, virtual] |
void PieceGLWidget::myPaintGL | ( | ) | [virtual] |
Reimplemented from GLWidget.
void PieceGLWidget::setSelectedPiece | ( | int | p | ) |
void PieceGLWidget::setSelectAll | ( | int | piece | ) |
void PieceGLWidget::mouseMoveEvent | ( | QMouseEvent * | event | ) | [virtual] |
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.
CubeDoc* PieceGLWidget::m_doc [private] |
int PieceGLWidget::m_lastSelectedPiece [private] |
int PieceGLWidget::m_selectedPiece [private] |
bool PieceGLWidget::m_bSelectAll [private] |
bool PieceGLWidget::m_bHasPushedMatrix [private] |
true when the user rotated the model in this view independendtly from the rotation of the main solution view.