Update the changelog, version, scale the instance icon

This commit is contained in:
Petr Mrázek
2014-01-20 01:14:11 +01:00
parent 130a790807
commit 3a3c9ac951
5 changed files with 36 additions and 6 deletions

View File

@ -336,6 +336,23 @@ QIcon IconList::getIcon(QString key)
return QIcon();
}
QIcon IconList::getBigIcon(QString key)
{
int icon_index = getIconIndex(key);
if (icon_index == -1)
key = "infinity";
// Fallback for icons that don't exist.
icon_index = getIconIndex(key);
if (icon_index == -1)
return QIcon();
QPixmap bigone = icons[icon_index].icon().pixmap(256,256).scaled(256,256);
return QIcon(bigone);
}
int IconList::getIconIndex(QString key)
{
if (key == "default")

View File

@ -34,6 +34,7 @@ public:
virtual ~IconList() {};
QIcon getIcon(QString key);
QIcon getBigIcon(QString key);
int getIconIndex(QString key);
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;