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

kblackbox

  • sources
  • kde-4.14
  • kdegames
  • kblackbox
kbbgraphicsitemrayresult.h
Go to the documentation of this file.
1 //
2 // KBlackBox
3 //
4 // A simple game inspired by an emacs module
5 //
6 /***************************************************************************
7  * Copyright (c) 1999-2000, Robert Cimrman *
8  * cimrman3@students.zcu.cz *
9  * *
10  * Copyright (c) 2007, Nicolas Roffet *
11  * nicolas-kde@roffet.com *
12  * *
13  * *
14  * This program is free software; you can redistribute it and/or modify *
15  * it under the terms of the GNU General Public License as published by *
16  * the Free Software Foundation; either version 2 of the License, or *
17  * (at your option) any later version. *
18  * *
19  * This program is distributed in the hope that it will be useful, *
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
22  * GNU General Public License for more details. *
23  * *
24  * You should have received a copy of the GNU General Public License *
25  * along with this program; if not, write to the *
26  * Free Software Foundation, Inc., *
27  * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA *
28  ***************************************************************************/
29 
30 #ifndef KBBGRAPHICSITEMRAYRESULT_H
31 #define KBBGRAPHICSITEMRAYRESULT_H
32 
33 
34 
35 class QGraphicsScene;
36 class QGraphicsSvgItem;
37 
38 
39 #include "kbbgraphicsitem.h"
40 #include "kbbgraphicsitemborder.h"
41 #include "kbbitemwithposition.h"
42 class KBBScalableGraphicWidget;
43 class KBBThemeManager;
44 
45 
46 
55 class KBBGraphicsItemRayResult : public KBBGraphicsItemBorder, public KBBGraphicsItem, public KBBItemWithPosition
56 {
57  public:
58  KBBGraphicsItemRayResult(KBBScalableGraphicWidget* parent, KBBThemeManager* themeManager, QGraphicsScene* scene, const int borderPosition, const int columns, const int rows, const int rayNumber);
59 
60 
65  void cleanDelete();
66 
72  void highlight(bool state);
73 
77  void highlightBoth(bool state);
78 
82  int position();
83 
90  void setOpposite(KBBGraphicsItemRayResult* opposite);
91 
95  void setPause(bool state);
96 
97 
98  private:
99  void hoverEnterEvent (QGraphicsSceneHoverEvent*);
100  void hoverLeaveEvent (QGraphicsSceneHoverEvent*);
101 
102  QString m_elementIdResultBackground;
103  QString m_elementIdResultBackgroundHighlight;
104  QGraphicsSvgItem* m_notNumber;
105  QGraphicsSimpleTextItem* m_number;
106  KBBGraphicsItemRayResult* m_opposite;
107  bool m_pause;
108  QGraphicsScene* m_scene;
109  KBBScalableGraphicWidget* m_widget;
110 };
111 
112 #endif // KBBGRAPHICSITEMRAYRESULT_H
QGraphicsScene
kbbgraphicsitem.h
KBBGraphicsItem
Graphic item of the scalable graphic widget.
Definition: kbbgraphicsitem.h:44
KBBGraphicsItemRayResult::highlightBoth
void highlightBoth(bool state)
Highlight the item and the opposite one.
Definition: kbbgraphicsitemrayresult.cpp:123
KBBScalableGraphicWidget
Scalable graphic central widget for KBlackBox.
Definition: kbbscalablegraphicwidget.h:62
QGraphicsItem::scene
QGraphicsScene * scene() const
QGraphicsSimpleTextItem
KBBItemWithPosition
Item with position.
Definition: kbbitemwithposition.h:37
QString
QGraphicsSceneHoverEvent
kbbitemwithposition.h
KBBGraphicsItemRayResult::position
int position()
Get the border position.
Definition: kbbgraphicsitemrayresult.cpp:130
KBBGraphicsItemRayResult
Result of a laser ray shoot in the black box.
Definition: kbbgraphicsitemrayresult.h:55
KBBGraphicsItemRayResult::highlight
void highlight(bool state)
Highlight the item.
Definition: kbbgraphicsitemrayresult.cpp:114
QGraphicsSvgItem
KBBGraphicsItemRayResult::setOpposite
void setOpposite(KBBGraphicsItemRayResult *opposite)
Define the opposite "ray result" item.
Definition: kbbgraphicsitemrayresult.cpp:136
KBBGraphicsItemRayResult::cleanDelete
void cleanDelete()
Destructor of the class and dependent object Call this methode to destroy simultaneously this QGraphi...
Definition: kbbgraphicsitemrayresult.cpp:106
KBBGraphicsItemRayResult::setPause
void setPause(bool state)
Set the pause state.
Definition: kbbgraphicsitemrayresult.cpp:142
KBBGraphicsItemBorder
Any border element of the scalable graphic widget.
Definition: kbbgraphicsitemborder.h:40
KBBThemeManager
Theme manager of the scalable graphic widget.
Definition: kbbthememanager.h:51
KBBGraphicsItemRayResult::KBBGraphicsItemRayResult
KBBGraphicsItemRayResult(KBBScalableGraphicWidget *parent, KBBThemeManager *themeManager, QGraphicsScene *scene, const int borderPosition, const int columns, const int rows, const int rayNumber)
Definition: kbbgraphicsitemrayresult.cpp:50
QObject::parent
QObject * parent() const
kbbgraphicsitemborder.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:20 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