AlbumShaper
1.0a3
|
A custom menu entry, displays album image, name, and number of photos. More...
#include <recentAlbumMenuItem.h>
Public Member Functions | |
RecentAlbumMenuItem (Qt::Key acceleratorKey) | |
void | changeItem (QString albumName, QString albumLocation, QString numPhotos) |
updates entry as per arguments passed (used by constructor during intiailization as well) More... | |
void | paint (QPainter *p, const QColorGroup &cg, bool act, bool enabled, int x, int y, int w, int h) |
paints entry More... | |
QSize | sizeHint () |
returns menu entry size More... | |
void | setMaxWidth (int val) |
after all menu items have been refreshed hint at maximum width so we can adequately position the accelerator text More... | |
bool | fullSpan () const |
no icon necessary since album image painted here More... | |
Private Attributes | |
Qt::Key | acceleratorKey |
QImage | albumImage |
album image More... | |
QString | albumName |
album name More... | |
QString | numPhotos |
number of photos More... | |
QSize | size |
computed size More... | |
int | maxWidth |
max element width More... | |
int | idealImageWidth |
used for painting purposes More... | |
A custom menu entry, displays album image, name, and number of photos.
Definition at line 23 of file recentAlbumMenuItem.h.
RecentAlbumMenuItem::RecentAlbumMenuItem | ( | Qt::Key | acceleratorKey | ) |
Definition at line 22 of file recentAlbumMenuItem.cpp.
References acceleratorKey, and changeItem().
void RecentAlbumMenuItem::changeItem | ( | QString | albumName, |
QString | albumLocation, | ||
QString | numPhotos | ||
) |
updates entry as per arguments passed (used by constructor during intiailization as well)
Definition at line 28 of file recentAlbumMenuItem.cpp.
References albumImage, albumName, idealImageWidth, numPhotos, scaleImage(), and size.
Referenced by RecentAlbumMenuItem(), and TitleWidget::refreshOpenRecentMenu().
bool RecentAlbumMenuItem::fullSpan | ( | ) | const |
no icon necessary since album image painted here
Definition at line 108 of file recentAlbumMenuItem.cpp.
void RecentAlbumMenuItem::paint | ( | QPainter * | p, |
const QColorGroup & | cg, | ||
bool | act, | ||
bool | enabled, | ||
int | x, | ||
int | y, | ||
int | w, | ||
int | h | ||
) |
paints entry
Definition at line 60 of file recentAlbumMenuItem.cpp.
References acceleratorKey, albumImage, albumName, idealImageWidth, maxWidth, numPhotos, and size.
void RecentAlbumMenuItem::setMaxWidth | ( | int | val | ) |
after all menu items have been refreshed hint at maximum width so we can adequately position the accelerator text
Definition at line 111 of file recentAlbumMenuItem.cpp.
References maxWidth.
Referenced by TitleWidget::refreshOpenRecentMenu().
QSize RecentAlbumMenuItem::sizeHint | ( | ) |
|
private |
Definition at line 48 of file recentAlbumMenuItem.h.
Referenced by paint(), and RecentAlbumMenuItem().
|
private |
album image
Definition at line 51 of file recentAlbumMenuItem.h.
Referenced by changeItem(), and paint().
|
private |
album name
Definition at line 54 of file recentAlbumMenuItem.h.
Referenced by changeItem(), and paint().
|
private |
used for painting purposes
Definition at line 66 of file recentAlbumMenuItem.h.
Referenced by changeItem(), and paint().
|
private |
max element width
Definition at line 63 of file recentAlbumMenuItem.h.
Referenced by paint(), and setMaxWidth().
|
private |
number of photos
Definition at line 57 of file recentAlbumMenuItem.h.
Referenced by changeItem(), and paint().
|
private |
computed size
Definition at line 60 of file recentAlbumMenuItem.h.
Referenced by changeItem(), paint(), and sizeHint().