Crossfire Server, Trunk
CREPixmap.h
Go to the documentation of this file.
1 /*
2  * Crossfire -- cooperative multi-player graphical RPG and adventure game
3  *
4  * Copyright (c) 2022 the Crossfire Development Team
5  *
6  * Crossfire is free software and comes with ABSOLUTELY NO WARRANTY. You are
7  * welcome to redistribute it under certain conditions. For details, please
8  * see COPYING and LICENSE.
9  *
10  * The authors can be reached via e-mail at <crossfire@metalforge.org>.
11  */
12 
13 #ifndef CREPIXMAP_H
14 #define CREPIXMAP_H
15 
16 #include <QtWidgets>
17 #include "global.h"
18 #include "image.h"
19 
20 class CREPixmap
21 {
22  public:
23  static void init();
24 
25  static face_sets *faceset;
26  static void setFaceset(const QString& prefix);
27  static void setUseFacesetFallback(bool use);
28  static void clearFaceCache();
29 
30  static QIcon getIcon(uint16_t faceNumber);
31  static QIcon getIcon(const Face *face);
32 
33  static QIcon getTreasureIcon();
34  static QIcon getTreasureOneIcon();
35  static QIcon getTreasureYesIcon();
36  static QIcon getTreasureNoIcon();
37 
38  protected:
39  static QIcon getIcon(const face_sets* faceset, uint16_t faceNumber);
40 
41  static QHash<uint16_t, QIcon> allFaces;
42  static QIcon* myTreasureIcon;
43  static QIcon* myTreasureOneIcon;
44  static QIcon* myTreasureYesIcon;
45  static QIcon* myTreasureNoIcon;
46  static bool myUseFaceFallback;
47 };
48 
49 #endif // CREPIXMAP_H
CREPixmap::setFaceset
static void setFaceset(const QString &prefix)
Definition: CREPixmap.cpp:44
Face
Definition: face.h:14
CREPixmap::allFaces
static QHash< uint16_t, QIcon > allFaces
Definition: CREPixmap.h:41
global.h
castle_read.prefix
string prefix
Definition: castle_read.py:31
CREPixmap::setUseFacesetFallback
static void setUseFacesetFallback(bool use)
Definition: CREPixmap.cpp:52
CREPixmap::getTreasureIcon
static QIcon getTreasureIcon()
Definition: CREPixmap.cpp:102
CREPixmap::getIcon
static QIcon getIcon(uint16_t faceNumber)
Definition: CREPixmap.cpp:65
CREPixmap::myTreasureYesIcon
static QIcon * myTreasureYesIcon
Definition: CREPixmap.h:44
CREPixmap::myTreasureOneIcon
static QIcon * myTreasureOneIcon
Definition: CREPixmap.h:43
CREPixmap::myTreasureNoIcon
static QIcon * myTreasureNoIcon
Definition: CREPixmap.h:45
CREPixmap::faceset
static face_sets * faceset
Definition: CREPixmap.h:25
CREPixmap::getTreasureYesIcon
static QIcon getTreasureYesIcon()
Definition: CREPixmap.cpp:114
image.h
CREPixmap
Definition: CREPixmap.h:20
CREPixmap::getTreasureOneIcon
static QIcon getTreasureOneIcon()
Definition: CREPixmap.cpp:108
CREPixmap::myUseFaceFallback
static bool myUseFaceFallback
Definition: CREPixmap.h:46
CREPixmap::init
static void init()
Definition: CREPixmap.cpp:32
CREPixmap::clearFaceCache
static void clearFaceCache()
Definition: CREPixmap.cpp:60
face_sets
Definition: image.h:17
CREPixmap::getTreasureNoIcon
static QIcon getTreasureNoIcon()
Definition: CREPixmap.cpp:120
CREPixmap::myTreasureIcon
static QIcon * myTreasureIcon
Definition: CREPixmap.h:42