3 #include "tile_widget.h"
5 CTile_Widget::CTile_Widget(QWidget
*parent
)
13 void CTile_Widget::initWidget(const QPixmap
& pixmap
, const int pixmapSide
, const QString
& label
)
15 int nbPixel
= pixmapSide
;
16 this->resize( nbPixel
+ (PIXMAP_MARGIN
* 2), nbPixel
+ (PIXMAP_MARGIN
* 2) + ui
.tileLabel
->height());
18 ui
.tilePixmapLabel
->resize(pixmapSide
, pixmapSide
);
19 ui
.tilePixmapLabel
->move(PIXMAP_MARGIN
, PIXMAP_MARGIN
);
20 ui
.tilePixmapLabel
->setAlignment(Qt::AlignHCenter
| Qt::AlignVCenter
);
22 ui
.tileLabel
->setText(label
);
23 ui
.tileLabel
->setToolTip(label
);
24 ui
.tileLabel
->resize(nbPixel
, ui
.tileLabel
->height());
25 ui
.tileLabel
->move(PIXMAP_MARGIN
, nbPixel
+ PIXMAP_MARGIN
* 2);
26 ui
.tileLabel
->setAlignment(Qt::AlignHCenter
| Qt::AlignVCenter
);
30 ui
.tilePixmapLabel
->setPixmap(pixmap
);
31 ui
.tilePixmapLabel
->setFrameShape(QFrame::NoFrame
);