• 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
kbbgraphicsitemballrepository.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 #ifndef KBBGRAPHICSITEMBALLREPOSITORY_H
28 #define KBBGRAPHICSITEMBALLREPOSITORY_H
29 
30 
31 
32 #include <krandomsequence.h>
33 
34 
35 #include "kbbgraphicsitem.h"
36 class KBBGraphicsItemSet;
37 class KBBScalableGraphicWidget;
38 class KBBThemeManager;
39 
40 
41 
45 class KBBGraphicsItemBallRepository : public KBBGraphicsItem
46 {
47  Q_OBJECT
48 
49 
50  public:
51  KBBGraphicsItemBallRepository(KBBScalableGraphicWidget* parent, KBBThemeManager* themeManager);
52  ~KBBGraphicsItemBallRepository();
53 
54 
55  int ballToTake() const;
56  void fillBallsOutside(int placed);
57  void newGame(int columns, int rows, int balls);
58  void removeBall(int outsidePosition);
59 
60 
61  private:
62  KBBGraphicsItemSet* m_ballsOutside;
63  KBBScalableGraphicWidget* m_parent;
64  KBBThemeManager* m_themeManager;
65 
66  KRandomSequence m_random;
67 
68  int m_columns;
69  int m_rows;
70  int m_width;
71  int m_height;
72  int m_ballToPlace;
73 };
74 
75 #endif // KBBGRAPHICSITEMBALLREPOSITORY_H
kbbgraphicsitem.h
KBBGraphicsItem
Graphic item of the scalable graphic widget.
Definition: kbbgraphicsitem.h:44
KBBGraphicsItemSet
Set of graphic items with positions.
Definition: kbbgraphicsitemset.h:46
KBBGraphicsItemBallRepository::ballToTake
int ballToTake() const
Definition: kbbgraphicsitemballrepository.cpp:69
KBBScalableGraphicWidget
Scalable graphic central widget for KBlackBox.
Definition: kbbscalablegraphicwidget.h:62
KBBGraphicsItemBallRepository::fillBallsOutside
void fillBallsOutside(int placed)
Definition: kbbgraphicsitemballrepository.cpp:75
KBBGraphicsItemBallRepository::~KBBGraphicsItemBallRepository
~KBBGraphicsItemBallRepository()
Definition: kbbgraphicsitemballrepository.cpp:58
KBBGraphicsItemBallRepository::newGame
void newGame(int columns, int rows, int balls)
Definition: kbbgraphicsitemballrepository.cpp:89
KBBGraphicsItemBallRepository
The balls the player has to place.
Definition: kbbgraphicsitemballrepository.h:45
KBBGraphicsItemBallRepository::removeBall
void removeBall(int outsidePosition)
Definition: kbbgraphicsitemballrepository.cpp:115
KBBThemeManager
Theme manager of the scalable graphic widget.
Definition: kbbthememanager.h:51
KBBGraphicsItemBallRepository::KBBGraphicsItemBallRepository
KBBGraphicsItemBallRepository(KBBScalableGraphicWidget *parent, KBBThemeManager *themeManager)
Definition: kbbgraphicsitemballrepository.cpp:44
QObject::parent
QObject * parent() const
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