• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kblackbox

kbbgraphicsitemcursor.h

Go to the documentation of this file.
00001 //
00002 // KBlackBox
00003 //
00004 // A simple game inspired by an emacs module
00005 //
00006 /***************************************************************************
00007  *   Copyright (c) 2007, Nicolas Roffet                                    *
00008  *   nicolas-kde@roffet.com                                                *
00009  *                                                                         *
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  *   This program is distributed in the hope that it will be useful,       *
00017  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00018  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00019  *   GNU General Public License for more details.                          *
00020  *                                                                         *
00021  *   You should have received a copy of the GNU General Public License     *
00022  *   along with this program; if not, write to the                         *
00023  *   Free Software Foundation, Inc.,                                       *
00024  *   51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA               *
00025  ***************************************************************************/
00026 
00027 
00028 
00029 #ifndef KBBGRAPHICSITEMCURSOR_H
00030 #define KBBGRAPHICSITEMCURSOR_H
00031 
00032 
00033 #include "kbbgraphicsitem.h"
00034 class KBBScalableGraphicWidget;
00035 class KBBThemeManager;
00036 
00037 
00038 
00044 class KBBGraphicsItemCursor : public KBBGraphicsItem
00045 {
00046     Q_OBJECT
00047 
00048 
00049     public:
00053         static const int NO_POSITION = -1;
00054 
00055 
00056         KBBGraphicsItemCursor(KBBScalableGraphicWidget* parent, KBBThemeManager* themeManager);
00057         
00058         
00059         int borderPosition();
00060         int boxPosition();
00061         
00062         void moveDown();
00063         void moveLeft();
00064         void moveRight();
00065         void moveUp();
00066         
00067         void setBoardSize(const int columns, const int rows);
00068         void setBorderPosition(const int borderPosition);
00069         void setBoxPosition(const int boxPosition);
00070 
00071 
00072     signals:
00073         void cursorAtNewPosition(const int borderPosition);
00074 
00075 
00076     private:
00077         void updatePositions();
00078         
00079         int m_boxPosition;
00080         int m_borderPosition;
00081         int m_columns;
00082         int m_rows;
00083 };
00084 
00085 #endif // KBBGRAPHICSITEMCURSOR_H

kblackbox

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

API Reference

Skip menu "API Reference"
  • kblackbox
  • kgoldrunner
  • kmahjongg
  • ksquares
  • libkdegames
  •   highscore
  •   kgame
  •   kggzgames
  •   kggzmod
  •   kggznet
  • libkmahjongg
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal