1 // Object Viewer Qt - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) <dnk-88@tut.by>
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 #ifndef PIXMAP_DATABASE_H
18 #define PIXMAP_DATABASE_H
21 #include "landscape_editor_global.h"
24 #include <nel/ligo/zone_bank.h>
27 #include <QtCore/QString>
28 #include <QtCore/QMap>
29 #include <QtGui/QPixmap>
31 namespace LandscapeEditor
36 @brief PixmapDatabase contains the image database
39 class LANDSCAPE_EDITOR_EXPORT PixmapDatabase
42 explicit PixmapDatabase(int textureSize
= 256);
45 /// Load all images(png) from zonePath, list images gets from zoneBank
46 bool loadPixmaps(const QString
&zonePath
, NLLIGO::CZoneBank
&zoneBank
, bool displayProgress
= false);
51 /// Get list names all loaded pixmaps
52 QStringList
listPixmaps() const;
54 /// Get original pixmap
55 /// @return QPixmap* if the image is in the database ;
56 /// otherwise returns pixmap which contains error message.
57 QPixmap
*pixmap(const QString
&zoneName
) const;
59 int textureSize() const;
64 QPixmap
*m_errorPixmap
;
65 QMap
<QString
, QPixmap
*> m_pixmapMap
;
68 } /* namespace LandscapeEditor */
70 #endif // PIXMAP_DATABASE_H