kblackbox
kbbgraphicsitemborder.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) 1999-2000, Robert Cimrman * 00008 * cimrman3@students.zcu.cz * 00009 * * 00010 * Copyright (c) 2007, Nicolas Roffet * 00011 * nicolas-kde@roffet.com * 00012 * * 00013 * * 00014 * This program is free software; you can redistribute it and/or modify * 00015 * it under the terms of the GNU General Public License as published by * 00016 * the Free Software Foundation; either version 2 of the License, or * 00017 * (at your option) any later version. * 00018 * * 00019 * This program is distributed in the hope that it will be useful, * 00020 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00021 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00022 * GNU General Public License for more details. * 00023 * * 00024 * You should have received a copy of the GNU General Public License * 00025 * along with this program; if not, write to the * 00026 * Free Software Foundation, Inc., * 00027 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * 00028 ***************************************************************************/ 00029 00030 00031 00032 #ifndef KBBGRAPHICSITEMBORDER_H 00033 #define KBBGRAPHICSITEMBORDER_H 00034 00035 00036 00040 class KBBGraphicsItemBorder 00041 { 00042 public: 00046 KBBGraphicsItemBorder(int borderPosition, int columns, int rows, float offset); 00047 00048 void setSize(int borderPosition, int columns, int rows); 00049 00050 00051 protected: 00052 void centerCoordinate(int borderPosition, float ¢erX, float ¢erY, float offset); 00053 float centerX() const; 00054 float centerY() const; 00055 const int rotation(); 00056 void setBorderPosition(int borderPosition); 00057 00058 00059 int m_borderPosition; 00060 float m_centerX; 00061 float m_centerY; 00062 int m_columns; 00063 float m_offset; 00064 int m_rows; 00065 }; 00066 00067 #endif // KBBGRAPHICSITEMBORDER_H
KDE 4.0 API Reference