• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdegames API Reference
  • KDE Home
  • Contact Us
 

kblackbox

Public Member Functions | List of all members
KBBGraphicsItemRayResult Class Reference

#include <kbbgraphicsitemrayresult.h>

Inheritance diagram for KBBGraphicsItemRayResult:
Inheritance graph
[legend]

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 &centerX, float &centerY, 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

void KBBGraphicsItemRayResult::cleanDelete ( )
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.

void KBBGraphicsItemRayResult::highlight ( bool  state)
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.

void KBBGraphicsItemRayResult::highlightBoth ( bool  state)
virtual

Highlight the item and the opposite one.

Reimplemented from KBBItemWithPosition.

Definition at line 123 of file kbbgraphicsitemrayresult.cpp.

int KBBGraphicsItemRayResult::position ( )
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
oppositeCorrespondent item with the same "number".

Definition at line 136 of file kbbgraphicsitemrayresult.cpp.

void KBBGraphicsItemRayResult::setPause ( bool  state)
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:
  • kbbgraphicsitemrayresult.h
  • kbbgraphicsitemrayresult.cpp
This file is part of the KDE documentation.
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.

kblackbox

Skip menu "kblackbox"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdegames API Reference

Skip menu "kdegames API Reference"
  • granatier
  • kapman
  • kblackbox
  • kgoldrunner
  • kigo
  • kmahjongg
  • KShisen
  • ksquares
  • libkdegames
  •   highscore
  •   libkdegamesprivate
  •     kgame
  • libkmahjongg
  • palapeli
  •   libpala

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal