2010-12-08 08:26:18 +01:00
|
|
|
#include "savelistitem.h"
|
|
|
|
|
|
|
|
SaveListItem::SaveListItem( SaveBanner banner, const QString &tid, quint32 s, QListWidget * parent ) : QListWidgetItem( parent ), size( s )
|
|
|
|
{
|
|
|
|
sb = banner;
|
|
|
|
QImage im = banner.BannerImg();
|
|
|
|
if( !im.isNull() )
|
|
|
|
{
|
2011-01-02 07:15:26 +01:00
|
|
|
im.load( ";/noBanner.png" );
|
2010-12-08 08:26:18 +01:00
|
|
|
}
|
|
|
|
QString tex = banner.Title();
|
|
|
|
if( tex.isEmpty() )
|
2011-01-02 07:15:26 +01:00
|
|
|
tex = "???";
|
2010-12-08 08:26:18 +01:00
|
|
|
|
|
|
|
this->setText( tex );
|
|
|
|
this->setIcon( QIcon( QPixmap::fromImage( im ) ) );
|
|
|
|
id = tid;
|
|
|
|
}
|
|
|
|
|
|
|
|
SaveListItem::~SaveListItem()
|
|
|
|
{
|
|
|
|
//qDebug() << "SaveListItem destroyed";
|
|
|
|
}
|