• 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
kbbgraphicsitemcursor.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 KBBGRAPHICSITEMCURSOR_H
30 #define KBBGRAPHICSITEMCURSOR_H
31 
32 
33 #include "kbbgraphicsitem.h"
34 class KBBScalableGraphicWidget;
35 class KBBThemeManager;
36 
37 
38 
44 class KBBGraphicsItemCursor : public KBBGraphicsItem
45 {
46  Q_OBJECT
47 
48 
49  public:
53  static const int NO_POSITION = -1;
54 
55 
56  KBBGraphicsItemCursor(KBBScalableGraphicWidget* parent, KBBThemeManager* themeManager);
57 
58 
59  int borderPosition();
60  int boxPosition();
61 
62  void moveDown();
63  void moveLeft();
64  void moveRight();
65  void moveUp();
66 
67  void setBoardSize(const int columns, const int rows);
68  void setBorderPosition(const int borderPosition);
69  void setBoxPosition(const int boxPosition);
70 
71 
72  signals:
73  void cursorAtNewPosition(const int borderPosition);
74 
75 
76  private:
77  void updatePositions();
78 
79  int m_boxPosition;
80  int m_borderPosition;
81  int m_columns;
82  int m_rows;
83 };
84 
85 #endif // KBBGRAPHICSITEMCURSOR_H
kbbgraphicsitem.h
KBBGraphicsItem
Graphic item of the scalable graphic widget.
Definition: kbbgraphicsitem.h:44
KBBScalableGraphicWidget
Scalable graphic central widget for KBlackBox.
Definition: kbbscalablegraphicwidget.h:62
KBBGraphicsItemCursor::moveLeft
void moveLeft()
Definition: kbbgraphicsitemcursor.cpp:81
KBBGraphicsItemCursor::setBoardSize
void setBoardSize(const int columns, const int rows)
Definition: kbbgraphicsitemcursor.cpp:151
KBBGraphicsItemCursor::moveRight
void moveRight()
Definition: kbbgraphicsitemcursor.cpp:104
KBBGraphicsItemCursor::moveUp
void moveUp()
Definition: kbbgraphicsitemcursor.cpp:128
KBBGraphicsItemCursor::borderPosition
int borderPosition()
Definition: kbbgraphicsitemcursor.cpp:46
KBBGraphicsItemCursor::moveDown
void moveDown()
Definition: kbbgraphicsitemcursor.cpp:58
KBBGraphicsItemCursor
"Cursor" on the scalable graphic widget
Definition: kbbgraphicsitemcursor.h:44
KBBGraphicsItemCursor::NO_POSITION
static const int NO_POSITION
Invalid border and box position.
Definition: kbbgraphicsitemcursor.h:53
KBBGraphicsItemCursor::KBBGraphicsItemCursor
KBBGraphicsItemCursor(KBBScalableGraphicWidget *parent, KBBThemeManager *themeManager)
Definition: kbbgraphicsitemcursor.cpp:35
KBBGraphicsItemCursor::boxPosition
int boxPosition()
Definition: kbbgraphicsitemcursor.cpp:52
KBBGraphicsItemCursor::setBorderPosition
void setBorderPosition(const int borderPosition)
Definition: kbbgraphicsitemcursor.cpp:164
KBBGraphicsItemCursor::setBoxPosition
void setBoxPosition(const int boxPosition)
Definition: kbbgraphicsitemcursor.cpp:193
KBBThemeManager
Theme manager of the scalable graphic widget.
Definition: kbbthememanager.h:51
KBBGraphicsItemCursor::cursorAtNewPosition
void cursorAtNewPosition(const int borderPosition)
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