00001 /* 00002 Situare - A location system for Facebook 00003 Copyright (C) 2010 Ixonos Plc. Authors: 00004 00005 Sami Rämö - sami.ramo@ixonos.com 00006 00007 Situare is free software; you can redistribute it and/or 00008 modify it under the terms of the GNU General Public License 00009 version 2 as published by the Free Software Foundation. 00010 00011 Situare is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with Situare; if not, write to the Free Software 00018 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 00019 USA. 00020 */ 00021 00022 #ifndef MAPTILE_H 00023 #define MAPTILE_H 00024 00025 #include <QGraphicsPixmapItem> 00026 #include <QPoint> 00027 00033 class MapTile : public QGraphicsPixmapItem 00034 { 00035 public: 00039 MapTile(); 00040 00041 /******************************************************************************* 00042 * MEMBER FUNCTIONS AND SLOTS 00043 ******************************************************************************/ 00053 void setSceneLevel(int currentZoomLevel); 00054 00061 void setTileNumber(QPoint tileNumber); 00062 00071 void setZoomLevel(int tileZoomLevel, int currentViewZoomLevel); 00072 00078 QPoint tileNumber(); 00079 00085 int zoomLevel(); 00086 00087 private: 00094 void setPosition(); 00095 00096 /******************************************************************************* 00097 * DATA MEMBERS 00098 ******************************************************************************/ 00099 private: 00100 QPoint m_tileNumber; 00101 int m_zoomLevel; 00102 }; 00103 00104 #endif // MAPTILE_H