mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
30 lines
707 B
C++
30 lines
707 B
C++
|
#include "AlbumItem.h"
|
||
|
#include "ui_AlbumItem.h"
|
||
|
|
||
|
AlbumItem::AlbumItem(const RsPhotoAlbum& album, QWidget *parent) :
|
||
|
QWidget(parent),
|
||
|
ui(new Ui::AlbumItem), mAlbum(album)
|
||
|
{
|
||
|
ui->setupUi(this);
|
||
|
setUp();
|
||
|
}
|
||
|
|
||
|
AlbumItem::~AlbumItem()
|
||
|
{
|
||
|
delete ui;
|
||
|
}
|
||
|
|
||
|
void AlbumItem::setUp()
|
||
|
{
|
||
|
ui->label_AlbumTitle->setText(QString::fromStdString(mAlbum.mMeta.mGroupName));
|
||
|
ui->label_Photographer->setText(QString::fromStdString(mAlbum.mPhotographer));
|
||
|
QPixmap qtn;
|
||
|
qtn.loadFromData(mAlbum.mThumbnail.data, mAlbum.mThumbnail.size, mAlbum.mThumbnail.type.c_str());
|
||
|
ui->label_Thumbnail->setPixmap(qtn);
|
||
|
}
|
||
|
|
||
|
RsPhotoAlbum AlbumItem::getAlbum()
|
||
|
{
|
||
|
return mAlbum;
|
||
|
}
|