mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-26 00:36:17 +00:00
91e6b23d3f
NMAKE-VS2012 Error LNK2011 while NMAKE-VS2010 does not complain we need to link the pch.obj file see http://msdn.microsoft.com/en-us/library/3ay26wa2(v=vs.110).aspx ** PCH Support for Ninja Ninja need to add property OBJECT_DEPENDS for using PCH OBJECT_OUTPUTS for create PCH see http://public.kitware.com/pipermail/cmake-developers/2012-March/003653.html
32 lines
938 B
C++
32 lines
938 B
C++
#include <QtGui/QtGui>
|
|
#include "tile_widget.h"
|
|
|
|
CTile_Widget::CTile_Widget(QWidget *parent)
|
|
: QWidget(parent)
|
|
|
|
{
|
|
ui.setupUi(this);
|
|
}
|
|
|
|
|
|
void CTile_Widget::initWidget(const QPixmap& pixmap, const int pixmapSide, const QString& label)
|
|
{
|
|
int nbPixel = pixmapSide;
|
|
this->resize( nbPixel + (PIXMAP_MARGIN * 2), nbPixel + (PIXMAP_MARGIN * 2) + ui.tileLabel->height());
|
|
|
|
ui.tilePixmapLabel->resize(pixmapSide, pixmapSide);
|
|
ui.tilePixmapLabel->move(PIXMAP_MARGIN, PIXMAP_MARGIN);
|
|
ui.tilePixmapLabel->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
|
|
|
|
ui.tileLabel->setText(label);
|
|
ui.tileLabel->setToolTip(label);
|
|
ui.tileLabel->resize(nbPixel, ui.tileLabel->height());
|
|
ui.tileLabel->move(PIXMAP_MARGIN, nbPixel + PIXMAP_MARGIN * 2);
|
|
ui.tileLabel->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
|
|
|
|
if(!pixmap.isNull())
|
|
{
|
|
ui.tilePixmapLabel->setPixmap(pixmap);
|
|
ui.tilePixmapLabel->setFrameShape(QFrame::NoFrame);
|
|
}
|
|
}
|