• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdegames API Reference
  • KDE Home
  • Contact Us
 

libkmahjongg

  • sources
  • kde-4.14
  • kdegames
  • libkmahjongg
kmahjonggtileset.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 1997 Mathias Mueller <in5y158@public.uni-hamburg.de>
3  Copyright (C) 2006 Mauricio Piacentini <mauricio@tabuleiro.com>
4 
5  Libkmahjongg is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program; if not, write to the Free Software
17  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
19 
20 #ifndef _KMAHJONGGTILESET_H_
21 #define _KMAHJONGGTILESET_H_
22 
23 #include <QtCore/QString>
24 #include <QtGui/QPixmap>
25 
26 #include <libkmahjongg_export.h>
27 
28 class KMahjonggTilesetPrivate;
29 
30 class KMAHJONGGLIB_EXPORT KMahjonggTileset {
31  public:
32  KMahjonggTileset();
33  ~KMahjonggTileset();
34 
35  bool loadDefault();
36  bool loadTileset(const QString & tilesetPath);
37  bool loadGraphics();
38  bool reloadTileset(const QSize & newTilesize);
39  QSize preferredTileSize(const QSize & boardsize, int horizontalCells, int verticalCells);
40  QString authorProperty(const QString &key) const;
41 
42  short width() const;
43  short height() const;
44  short levelOffsetX() const;
45  short levelOffsetY() const;
46  short qWidth() const;
47  short qHeight() const;
48  QString path() const;
49 
50  QPixmap selectedTile(int num);
51  QPixmap unselectedTile(int num);
52  QPixmap tileface(int num);
53 
54  protected:
55  void updateScaleInfo(short tilew, short tileh);
56  void buildElementIdTable(void);
57  QString pixmapCacheNameFromElementId(const QString & elementid);
58  QPixmap renderElement(short width, short height, const QString & elementid);
59 
60 
61  private:
62  friend class KMahjonggTilesetPrivate;
63  KMahjonggTilesetPrivate *const d;
64 
65  Q_DISABLE_COPY(KMahjonggTileset)
66 };
67 
68 #endif
QString
KMAHJONGGLIB_EXPORT
#define KMAHJONGGLIB_EXPORT
Definition: libkmahjongg_export.h:32
QPixmap
QSize
KMahjonggTileset
Definition: kmahjonggtileset.h:30
libkmahjongg_export.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:58 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

libkmahjongg

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