AlbumShaper
1.0a3
|
Displays photo thumbnail and description. More...
#include <photoPreviewWidget.h>
Public Member Functions | |
PhotoPreviewWidget (Q3IconView *parent, Photo *phto) | |
Sets subalbum pointer. More... | |
Photo * | getPhoto () |
Returns photo pointer. More... | |
void | updateImage () |
Update photo thumbnail from background object. More... | |
void | updateDescription () |
Update photo description. More... | |
void | paint (QPainter *p) |
void | paintItem (QPainter *p, const QColorGroup &cg) |
Repain iconview item. More... | |
void | paintFocus (QPainter *p, const QColorGroup &cg) |
void | setText (const QString &text) |
void | setPixmap (const QPixmap &p, bool redraw) |
bool | acceptDrop (const QMimeSource *e) const |
int | compare (Q3IconViewItem *i) const |
void | setMousedOver (bool val) |
QRect | getPhotoInfoRect () |
QPoint | getPhotoPos () |
Private Member Functions | |
void | initializeItemRect () |
Private Attributes | |
Photo * | phto |
Pointer to photo backend object. More... | |
int | calibratedWidth |
bool | mousedOver |
QRect | photoInfoRect |
int | pixmapXOffset |
offsets used to center pixmap More... | |
int | pixmapYOffset |
Displays photo thumbnail and description.
Definition at line 34 of file photoPreviewWidget.h.
PhotoPreviewWidget::PhotoPreviewWidget | ( | Q3IconView * | parent, |
Photo * | phto | ||
) |
Sets subalbum pointer.
Definition at line 29 of file photoPreviewWidget.cpp.
References calibratedWidth, Photo::getDescription(), initializeItemRect(), mousedOver, PHOTO_TEXT_MARGIN, phto, setText(), and THUMBNAIL_WIDTH.
bool PhotoPreviewWidget::acceptDrop | ( | const QMimeSource * | e | ) | const |
Definition at line 170 of file photoPreviewWidget.cpp.
int PhotoPreviewWidget::compare | ( | Q3IconViewItem * | i | ) | const |
Photo * PhotoPreviewWidget::getPhoto | ( | ) |
Returns photo pointer.
Definition at line 49 of file photoPreviewWidget.cpp.
References phto.
Referenced by PhotoDescEdit::disappear(), PhotoDescEdit::PhotoDescEdit(), PhotosIconView::setAlbumImage(), PhotosIconView::setSubalbumImage(), and Subalbum::syncPhotoList().
QRect PhotoPreviewWidget::getPhotoInfoRect | ( | ) |
Definition at line 224 of file photoPreviewWidget.cpp.
References height, PHOTO_MARGIN, PHOTO_SHADOW, photoInfoRect, and width.
Referenced by PhotosIconView::contentsMouseMoveEvent(), and paintItem().
QPoint PhotoPreviewWidget::getPhotoPos | ( | ) |
Definition at line 235 of file photoPreviewWidget.cpp.
References pixmapXOffset, and pixmapYOffset.
Referenced by PhotoDescEdit::PhotoDescEdit().
|
private |
Definition at line 187 of file photoPreviewWidget.cpp.
References PHOTO_MARGIN, PHOTO_SHADOW, PHOTO_TEXT_MARGIN, pixmapXOffset, pixmapYOffset, THUMBNAIL_HEIGHT, and THUMBNAIL_WIDTH.
Referenced by PhotoPreviewWidget().
void PhotoPreviewWidget::paint | ( | QPainter * | p | ) |
Definition at line 76 of file photoPreviewWidget.cpp.
References height, PHOTO_MARGIN, PHOTO_TEXT_MARGIN, pixmapXOffset, pixmapYOffset, and width.
Referenced by paintItem().
void PhotoPreviewWidget::paintFocus | ( | QPainter * | p, |
const QColorGroup & | cg | ||
) |
Definition at line 168 of file photoPreviewWidget.cpp.
void PhotoPreviewWidget::paintItem | ( | QPainter * | p, |
const QColorGroup & | cg | ||
) |
Repain iconview item.
Definition at line 109 of file photoPreviewWidget.cpp.
References buffer, getPhotoInfoRect(), height, mousedOver, paint(), PHOTO_SHADOW, PHOTO_SHADOW_END_OFFSET, photoInfoRect, Window::shadowB, Window::shadowBL, Window::shadowBR, Window::shadowR, Window::shadowTR, and width.
void PhotoPreviewWidget::setMousedOver | ( | bool | val | ) |
Definition at line 219 of file photoPreviewWidget.cpp.
References mousedOver.
Referenced by PhotosIconView::clearPseudoSelection(), and PhotosIconView::repaintGroup().
void PhotoPreviewWidget::setPixmap | ( | const QPixmap & | p, |
bool | redraw | ||
) |
Definition at line 59 of file photoPreviewWidget.cpp.
References pixmapXOffset, pixmapYOffset, THUMBNAIL_HEIGHT, and THUMBNAIL_WIDTH.
Referenced by updateImage().
void PhotoPreviewWidget::setText | ( | const QString & | text | ) |
Definition at line 71 of file photoPreviewWidget.cpp.
References calibratedWidth, and clipText().
Referenced by PhotoDescEdit::disappear(), PhotoPreviewWidget(), and updateDescription().
void PhotoPreviewWidget::updateDescription | ( | ) |
Update photo description.
Definition at line 66 of file photoPreviewWidget.cpp.
References Photo::getDescription(), phto, and setText().
void PhotoPreviewWidget::updateImage | ( | ) |
Update photo thumbnail from background object.
Definition at line 54 of file photoPreviewWidget.cpp.
References Photo::getThumbnailFilename(), phto, and setPixmap().
|
private |
Definition at line 78 of file photoPreviewWidget.h.
Referenced by PhotoPreviewWidget(), and setText().
|
private |
Definition at line 80 of file photoPreviewWidget.h.
Referenced by paintItem(), PhotoPreviewWidget(), and setMousedOver().
|
private |
Definition at line 82 of file photoPreviewWidget.h.
Referenced by getPhotoInfoRect(), and paintItem().
|
private |
Pointer to photo backend object.
Definition at line 76 of file photoPreviewWidget.h.
Referenced by getPhoto(), PhotoPreviewWidget(), updateDescription(), and updateImage().
|
private |
offsets used to center pixmap
Definition at line 85 of file photoPreviewWidget.h.
Referenced by getPhotoPos(), initializeItemRect(), paint(), and setPixmap().
|
private |
Definition at line 85 of file photoPreviewWidget.h.
Referenced by getPhotoPos(), initializeItemRect(), paint(), and setPixmap().