Store database icons as QImage instead of QIcon.

This has the advantage that they can be used without a running X server.
Add methods to retrieve QPixmaps that are converted from the stored QImages
and cached by QPixmapCache.
This commit is contained in:
Felix Geyer
2012-01-01 21:52:54 +01:00
parent fdf600e09a
commit 00aafa69f5
15 changed files with 137 additions and 60 deletions

View File

@@ -21,7 +21,7 @@
#include <QtCore/QDateTime>
#include <QtCore/QXmlStreamWriter>
#include <QtGui/QColor>
#include <QtGui/QIcon>
#include <QtGui/QImage>
#include "core/Database.h"
#include "core/Entry.h"
@@ -46,7 +46,7 @@ private:
void writeMetadata();
void writeMemoryProtection();
void writeCustomIcons();
void writeIcon(const Uuid& uuid, const QIcon& icon);
void writeIcon(const Uuid& uuid, const QImage& icon);
void writeCustomData();
void writeCustomDataItem(const QString& key, const QString& value);
void writeRoot();