![]() |
CTK
0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
|
#include <Libs/Widgets/ctkThumbnailLabel.h>
Public Types | |
typedef QWidget | Superclass |
Signals | |
void | doubleClicked (const ctkThumbnailLabel &widget) |
void | selected (const ctkThumbnailLabel &widget) |
Public Member Functions | |
ctkThumbnailLabel (QWidget *parent=0) | |
virtual int | heightForWidth (int width) const |
bool | isSelected () const |
virtual QSize | minimumSizeHint () const |
const QPixmap * | pixmap () const |
QColor | selectedColor () const |
void | setPixmap (const QPixmap &pixmap) |
void | setSelected (bool selected) |
void | setSelectedColor (const QColor &color) |
void | setText (const QString &text) |
void | setTextPosition (const Qt::Alignment &alignment) |
void | setTransformationMode (Qt::TransformationMode mode) |
virtual QSize | sizeHint () const |
QString | text () const |
Qt::Alignment | textPosition () const |
Qt::TransformationMode | transformationMode () const |
virtual | ~ctkThumbnailLabel () |
Protected Member Functions | |
virtual void | mouseDoubleClickEvent (QMouseEvent *event) |
virtual void | mousePressEvent (QMouseEvent *event) |
virtual void | paintEvent (QPaintEvent *event) |
virtual void | resizeEvent (QResizeEvent *event) |
Protected Attributes | |
QScopedPointer< ctkThumbnailLabelPrivate > | d_ptr |
Properties | |
QPixmap | pixmap |
bool | selected |
QColor | selectedColor |
QString | text |
Qt::Alignment | textPosition |
Qt::TransformationMode | transformationMode |
ctkThumbnailLabel is an advanced label that gives control over the pixmap size and text location. If a pixmap is set, it is resized to fit the available space but its original width/height ratio is always respected. The widget can be selected or not (a rectangle is drawn around)
Definition at line 38 of file ctkThumbnailLabel.h.
typedef QWidget ctkThumbnailLabel::Superclass |
Definition at line 63 of file ctkThumbnailLabel.h.
|
explicit |
|
virtual |
|
signal |
|
virtual |
bool ctkThumbnailLabel::isSelected | ( | ) | const |
|
virtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
const QPixmap* ctkThumbnailLabel::pixmap | ( | ) | const |
|
protectedvirtual |
|
signal |
QColor ctkThumbnailLabel::selectedColor | ( | ) | const |
void ctkThumbnailLabel::setPixmap | ( | const QPixmap & | pixmap | ) |
void ctkThumbnailLabel::setSelected | ( | bool | selected | ) |
void ctkThumbnailLabel::setSelectedColor | ( | const QColor & | color | ) |
void ctkThumbnailLabel::setText | ( | const QString & | text | ) |
void ctkThumbnailLabel::setTextPosition | ( | const Qt::Alignment & | alignment | ) |
void ctkThumbnailLabel::setTransformationMode | ( | Qt::TransformationMode | mode | ) |
|
virtual |
QString ctkThumbnailLabel::text | ( | ) | const |
Qt::Alignment ctkThumbnailLabel::textPosition | ( | ) | const |
Qt::TransformationMode ctkThumbnailLabel::transformationMode | ( | ) | const |
|
protected |
Definition at line 90 of file ctkThumbnailLabel.h.
|
readwrite |
Optional pixmap for the label. No pixmap by default
Definition at line 1 of file ctkThumbnailLabel.h.
|
readwrite |
Control whether or not the label is selected. When selected, a rectangle is drawn around the widget with the selectedColor color. Not selected by default
Definition at line 1 of file ctkThumbnailLabel.h.
|
readwrite |
Color of the selected rectangle. Palette highlight color by default
Definition at line 1 of file ctkThumbnailLabel.h.
|
readwrite |
If the text is empty, the space allocated for the text is hidden Empty by default
Definition at line 1 of file ctkThumbnailLabel.h.
|
readwrite |
Position of the text relative to the pixmap. Qt::AlignTop | Qt::AlignHCenter by default. For now, if the alignment is HCenter|VCenter (same location than the pixmap), no text is shown.
Definition at line 1 of file ctkThumbnailLabel.h.
|
readwrite |
Controls the quality of the resizing of the pixmap. Qt::FastTransformation by default
Definition at line 1 of file ctkThumbnailLabel.h.