kblackbox
#include <kbbgraphicsitemrayresult.h>
Public Member Functions | |
KBBGraphicsItemRayResult (KBBScalableGraphicWidget *parent, KBBThemeManager *themeManager, QGraphicsScene *scene, const int borderPosition, const int columns, const int rows, const int rayNumber) | |
void | cleanDelete () |
void | highlight (bool state) |
void | highlightBoth (bool state) |
int | position () |
void | setOpposite (KBBGraphicsItemRayResult *opposite) |
void | setPause (bool state) |
Public Member Functions inherited from KBBGraphicsItemBorder | |
KBBGraphicsItemBorder (int borderPosition, int columns, int rows, float offset) | |
void | setSize (int borderPosition, int columns, int rows) |
Public Member Functions inherited from KBBGraphicsItem | |
KBBGraphicsItem (KBBScalableGraphicWidget::itemType itemType, QGraphicsScene *scene, KBBThemeManager *themeManager) | |
Public Member Functions inherited from KBBItemWithPosition | |
virtual | ~KBBItemWithPosition () |
Additional Inherited Members | |
Protected Member Functions inherited from KBBGraphicsItemBorder | |
void | centerCoordinate (int borderPosition, float ¢erX, float ¢erY, float offset) |
float | centerX () const |
float | centerY () const |
int | rotationAngle () |
void | setBorderPosition (int borderPosition) |
Protected Attributes inherited from KBBGraphicsItemBorder | |
int | m_borderPosition |
float | m_centerX |
float | m_centerY |
int | m_columns |
float | m_offset |
int | m_rows |
Detailed Description
Result of a laser ray shoot in the black box.
There 3 kinds of ray results:
- HIT: if the laser ray hits a ball in the black box by entering at the considered position.
- REFLECTION: if the laser ray exits the black box at the entrance point.
- A number to display both positions where the laser ray entered and exited the black box. Both positions are opposite positions of each other and belong together.
Definition at line 55 of file kbbgraphicsitemrayresult.h.
Constructor & Destructor Documentation
KBBGraphicsItemRayResult::KBBGraphicsItemRayResult | ( | KBBScalableGraphicWidget * | parent, |
KBBThemeManager * | themeManager, | ||
QGraphicsScene * | scene, | ||
const int | borderPosition, | ||
const int | columns, | ||
const int | rows, | ||
const int | rayNumber | ||
) |
Definition at line 50 of file kbbgraphicsitemrayresult.cpp.
Member Function Documentation
|
virtual |
Destructor of the class and dependent object Call this methode to destroy simultaneously this QGraphicsItem and all other dependent QGraphicsItems: The number or the sign.
Reimplemented from KBBItemWithPosition.
Definition at line 106 of file kbbgraphicsitemrayresult.cpp.
|
virtual |
Highlight the item.
Usually used when the mouse goes over the item or over the opposite item.
Reimplemented from KBBItemWithPosition.
Definition at line 114 of file kbbgraphicsitemrayresult.cpp.
|
virtual |
Highlight the item and the opposite one.
Reimplemented from KBBItemWithPosition.
Definition at line 123 of file kbbgraphicsitemrayresult.cpp.
|
virtual |
Get the border position.
Implements KBBItemWithPosition.
Definition at line 130 of file kbbgraphicsitemrayresult.cpp.
void KBBGraphicsItemRayResult::setOpposite | ( | KBBGraphicsItemRayResult * | opposite | ) |
Define the opposite "ray result" item.
Used if the result is not a HIT and not a REFLECTION. In the other case, the opoosite is the item itself and this method doesn't need to be called.
- Parameters
-
opposite Correspondent item with the same "number".
Definition at line 136 of file kbbgraphicsitemrayresult.cpp.
|
virtual |
Set the pause state.
Reimplemented from KBBItemWithPosition.
Definition at line 142 of file kbbgraphicsitemrayresult.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:44:09 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.