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

libkmahjongg

kmahjonggtileset.h

Go to the documentation of this file.
00001 /*
00002     Copyright (C) 1997 Mathias Mueller   <in5y158@public.uni-hamburg.de>
00003     Copyright (C) 2006 Mauricio Piacentini  <mauricio@tabuleiro.com>
00004 
00005     Libkmahjongg is free software; you can redistribute it and/or modify
00006     it under the terms of the GNU General Public License as published by
00007     the Free Software Foundation; either version 2 of the License, or
00008     (at your option) any later version.
00009 
00010     This program is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013     GNU General Public License for more details.
00014 
00015     You should have received a copy of the GNU General Public License
00016     along with this program; if not, write to the Free Software
00017     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00018 */
00019 
00020 #ifndef _KMAHJONGGTILESET_H_
00021 #define _KMAHJONGGTILESET_H_
00022 
00023 #include <QtCore/QString>
00024 #include <QtGui/QPixmap>
00025 
00026 #include <libkmahjongg_export.h>
00027 
00028 class KMahjonggTilesetPrivate;
00029 
00030 class KMAHJONGGLIB_EXPORT KMahjonggTileset {
00031    public:
00032      KMahjonggTileset();         
00033      ~KMahjonggTileset();   
00034 
00035      bool loadDefault();
00036      bool loadTileset(const QString & tilesetPath);
00037      bool loadGraphics();
00038      bool reloadTileset(const QSize & newTilesize);
00039      QSize preferredTileSize(const QSize & boardsize, int horizontalCells, int verticalCells);
00040      QString authorProperty(const QString &key) const;
00041 
00042      short width() const;
00043      short height() const;
00044      short levelOffsetX() const;
00045      short levelOffsetY() const;
00046      short qWidth() const;
00047      short qHeight() const;
00048      QString path() const;
00049 
00050      QPixmap selectedTile(int num);
00051      QPixmap unselectedTile(int num);
00052      QPixmap tileface(int num);
00053 
00054   protected:
00055 
00056     void updateScaleInfo(short tilew, short tileh);
00057     void buildElementIdTable(void);
00058     QString pixmapCacheNameFromElementId(const QString & elementid);
00059     QPixmap renderElement(short width, short height, const QString & elementid);
00060   
00061 
00062   private:
00063     friend class KMahjonggTilesetPrivate;
00064     KMahjonggTilesetPrivate *const d;
00065 
00066     Q_DISABLE_COPY(KMahjonggTileset)
00067 };
00068 
00069 #endif

libkmahjongg

Skip menu "libkmahjongg"
  • 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