• 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
kbbballsgraphicwidget.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) 2007, Nicolas Roffet *
8  * nicolas-kde@roffet.com *
9  * *
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  * This program is distributed in the hope that it will be useful, *
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
19  * GNU General Public License for more details. *
20  * *
21  * You should have received a copy of the GNU General Public License *
22  * along with this program; if not, write to the *
23  * Free Software Foundation, Inc., *
24  * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA *
25  ***************************************************************************/
26 
27 
28 
29 #ifndef KBBBALLSGRAPHICWIDGET_H
30 #define KBBBALLSGRAPHICWIDGET_H
31 
32 
33 class QGraphicsScene;
34 #include <QGraphicsView>
35 #include <QList>
36 
37 
38 class KBBGraphicsItem;
39 class KBBThemeManager;
40 
41 
42 
48 class KBBBallsGraphicWidget : public QGraphicsView
49 {
50  public:
56  explicit KBBBallsGraphicWidget(KBBThemeManager* themeManager);
57 
62  ~KBBBallsGraphicWidget();
63 
64 
69  void resizeEvent(QResizeEvent*);
70 
77  void setBallsToPlace(const int ballsToPlace);
78 
85  void setPlacedBalls(const int placedBalls);
86 
87 
88  private:
89  int m_ballsToPlace;
90  QList<KBBGraphicsItem*> m_playerBalls;
91  QGraphicsScene* m_scene;
92  KBBThemeManager* m_themeManager;
93  QList<KBBGraphicsItem*> m_wrongPlayerBalls;
94 };
95 
96 #endif // KBBBALLSGRAPHICWIDGET_H
QResizeEvent
QGraphicsScene
KBBGraphicsItem
Graphic item of the scalable graphic widget.
Definition: kbbgraphicsitem.h:44
KBBBallsGraphicWidget::KBBBallsGraphicWidget
KBBBallsGraphicWidget(KBBThemeManager *themeManager)
Constructor.
Definition: kbbballsgraphicwidget.cpp:44
KBBBallsGraphicWidget
Widget displaying the number of balls to place on the black box.
Definition: kbbballsgraphicwidget.h:48
KBBBallsGraphicWidget::resizeEvent
void resizeEvent(QResizeEvent *)
Event: widget has been resized This happens for instance when the main window has been resized...
Definition: kbbballsgraphicwidget.cpp:70
QList< KBBGraphicsItem * >
KBBBallsGraphicWidget::setBallsToPlace
void setBallsToPlace(const int ballsToPlace)
Define the number of balls to place on the black box.
Definition: kbbballsgraphicwidget.cpp:76
KBBThemeManager
Theme manager of the scalable graphic widget.
Definition: kbbthememanager.h:51
KBBBallsGraphicWidget::setPlacedBalls
void setPlacedBalls(const int placedBalls)
Define the number of balls the player already placed on the board.
Definition: kbbballsgraphicwidget.cpp:93
QGraphicsView
KBBBallsGraphicWidget::~KBBBallsGraphicWidget
~KBBBallsGraphicWidget()
Destructor Remove all items displayed on the scene.
Definition: kbbballsgraphicwidget.cpp:58
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