AlbumShaper
1.0a3
|
Displays subalbum layout. More...
#include <subalbumWidget.h>
Signals | |
void | selectedPhotoStateChanged () |
Public Member Functions | |
SubalbumWidget (Subalbum *salbum, QWidget *parent=0, const char *name=0) | |
Creates layout based on backend object. More... | |
void | setSubalbum (Subalbum *salbum) |
Resets the subalbum this subalbum widget is displaying. More... | |
void | refreshPhotos () |
clears and reinserts all photos for the current collection the current selection is cleared More... | |
void | refreshAllPhotos () |
refreshes all photos, selections are preserved More... | |
void | refreshSelectedPhotos () |
refreshes selected photos, selections are preserved More... | |
Subalbum * | getSubalbum () |
returns a pointer to the backend subalbum More... | |
Photo * | getSelectedPhoto () |
Returns currently selected photo. If no or multiple photos selected returns NULL. More... | |
void | setSelectedPhoto (Photo *selection) |
Sets the selected photo to selection and ensures it is visible. More... | |
Photo * | getFirstSelectedPhoto () |
Returns first selected photo. More... | |
bool | anyPhotosSelected () |
Returns true if any phtos are selected. More... | |
bool | anySelectedPhotosRevertable () |
Returns true if any selected photos are revertable. More... | |
Q3IconView * | getPhotos () |
Returns pointer to icon view. More... | |
void | updateButtons (bool enable) |
Activates/Deactives remove/rotate buttons. More... | |
void | stripDescriptionsFromSelectedPhotos () |
Strip descriptions from selected photos. More... | |
void | revertSelectedPhotos () |
Revert selected photos to their original form. More... | |
Protected Member Functions | |
void | resizeEvent (QResizeEvent *) |
Private Slots | |
void | setWallpaperAction () |
set desktop wallpaper More... | |
void | selectionChangedEvent () |
handles changing selections More... | |
void | updateButtons () |
Activates/Deactives remove/rotate buttons depending on if an image is selected. More... | |
void | addImageAction () |
Adds an image to the subalbum. More... | |
void | addImageAction (QStringList fileNames, bool setDescriptions=false) |
void | removeImageAction () |
Remove an image from the subalbum. More... | |
void | rotate90ImageAction () |
Rotate clockwise selected images. More... | |
void | rotate270ImageAction () |
Rotate counter-clockwise selected images. More... | |
void | reorder () |
void | deselectAll () |
Private Attributes | |
Q3GridLayout * | mainGrid |
Grids widgets are placed in. More... | |
Q3GridLayout * | buttonsGrid |
Q3Frame * | thumbnailFrame |
Grid lower buttons are placed in. More... | |
Q3Frame * | buttonsFrame |
PhotosIconView * | photos |
Photos layout. More... | |
Subalbum * | subalbum |
Pointer to backend subalbum. More... | |
QToolButton * | addImage |
"Add" button More... | |
QToolButton * | removeImage |
"Remove" button More... | |
QToolButton * | rotate90Image |
"Rotate 90" button More... | |
QToolButton * | rotate270Image |
"Rotate 270" button More... | |
QToolButton * | setDesktopBtn |
Set desktop wallpaper button. More... | |
LayoutWidget * | layout |
Pointer to the parent layout widget. More... | |
bool | buttonsState |
cached enabled/disabled state of buttons More... | |
bool | wallpaperButtonState |
cached enabled/distable state of set wallpaper button More... | |
Displays subalbum layout.
Definition at line 40 of file subalbumWidget.h.
Creates layout based on backend object.
Definition at line 52 of file subalbumWidget.cpp.
References addImage, addImageAction(), buttonsFrame, buttonsGrid, deselectAll(), IMAGE_PATH, layout, mainGrid, photos, removeImage, removeImageAction(), reorder(), rotate270Image, rotate270ImageAction(), rotate90Image, rotate90ImageAction(), selectionChangedEvent(), setDesktopBtn, setWallpaperAction(), setWallpaperSupported(), and subalbum.
|
privateslot |
Adds an image to the subalbum.
Definition at line 239 of file subalbumWidget.cpp.
References AddPhotosDialog::getFilenames(), Configuration::getString(), Configuration::resetSetting(), and Configuration::setString().
Referenced by SubalbumWidget().
|
privateslot |
Definition at line 266 of file subalbumWidget.cpp.
References Subalbum::addPhoto(), Subalbum::getLast(), Window::getStatus(), LayoutWidget::getSubalbums(), Window::getTitle(), LayoutWidget::getWindow(), layout, photos, TitleWidget::setBusy(), StatusWidget::setStatus(), StatusWidget::showProgressBar(), subalbum, SubalbumsWidget::updateButtons(), updateButtons(), TitleWidget::updateMenus(), and StatusWidget::updateProgress().
bool SubalbumWidget::anyPhotosSelected | ( | ) |
Returns true if any phtos are selected.
Definition at line 656 of file subalbumWidget.cpp.
References photos.
Referenced by LayoutWidget::photoStateChangedEvent(), and TitleWidget::removeSelectedPhotoDesc().
bool SubalbumWidget::anySelectedPhotosRevertable | ( | ) |
Returns true if any selected photos are revertable.
Definition at line 668 of file subalbumWidget.cpp.
References photos.
Referenced by LayoutWidget::photoStateChangedEvent().
|
privateslot |
Definition at line 782 of file subalbumWidget.cpp.
References photos.
Referenced by SubalbumWidget().
Photo * SubalbumWidget::getFirstSelectedPhoto | ( | ) |
Returns first selected photo.
Definition at line 615 of file subalbumWidget.cpp.
References photos.
Referenced by LayoutWidget::tabChanged().
Q3IconView * SubalbumWidget::getPhotos | ( | ) |
Returns pointer to icon view.
Definition at line 688 of file subalbumWidget.cpp.
References photos.
Referenced by TitleWidget::dropEvent(), and SubalbumPreviewWidget::dropped().
Photo * SubalbumWidget::getSelectedPhoto | ( | ) |
Returns currently selected photo. If no or multiple photos selected returns NULL.
Definition at line 588 of file subalbumWidget.cpp.
References photos.
Referenced by TitleWidget::setAlbumImage(), TitleWidget::setSubalbumImage(), and setWallpaperAction().
Subalbum * SubalbumWidget::getSubalbum | ( | ) |
returns a pointer to the backend subalbum
Definition at line 583 of file subalbumWidget.cpp.
References subalbum.
Referenced by SubalbumPreviewWidget::dropped(), TitleWidget::setSubalbumImage(), and LayoutWidget::tabChanged().
void SubalbumWidget::refreshAllPhotos | ( | ) |
refreshes all photos, selections are preserved
Definition at line 538 of file subalbumWidget.cpp.
References photos.
Referenced by LayoutWidget::tabChanged().
void SubalbumWidget::refreshPhotos | ( | ) |
clears and reinserts all photos for the current collection the current selection is cleared
Definition at line 519 of file subalbumWidget.cpp.
References Subalbum::getFirst(), Photo::getNext(), photos, and subalbum.
Referenced by setSubalbum().
void SubalbumWidget::refreshSelectedPhotos | ( | ) |
refreshes selected photos, selections are preserved
Definition at line 549 of file subalbumWidget.cpp.
References photos.
|
privateslot |
Remove an image from the subalbum.
Definition at line 320 of file subalbumWidget.cpp.
References LayoutWidget::getSubalbums(), Window::getTitle(), LayoutWidget::getWindow(), layout, photos, Subalbum::removePhoto(), selectionChangedEvent(), TitleWidget::setBusy(), subalbum, SubalbumsWidget::updateButtons(), and updateButtons().
Referenced by SubalbumWidget().
|
privateslot |
Definition at line 693 of file subalbumWidget.cpp.
References photos, subalbum, and Subalbum::syncPhotoList().
Referenced by SubalbumWidget().
|
protected |
void SubalbumWidget::revertSelectedPhotos | ( | ) |
Revert selected photos to their original form.
Definition at line 385 of file subalbumWidget.cpp.
References photos, and selectedPhotoStateChanged().
Referenced by LayoutWidget::revertPhotos().
|
privateslot |
Rotate counter-clockwise selected images.
Definition at line 469 of file subalbumWidget.cpp.
References Window::getStatus(), LayoutWidget::getSubalbums(), Window::getTitle(), LayoutWidget::getWindow(), layout, PhotosIconView::numSelected(), photos, selectedPhotoStateChanged(), TitleWidget::setBusy(), StatusWidget::setStatus(), StatusWidget::showProgressBar(), SubalbumsWidget::updateButtons(), updateButtons(), and StatusWidget::updateProgress().
Referenced by SubalbumWidget().
|
privateslot |
Rotate clockwise selected images.
Definition at line 418 of file subalbumWidget.cpp.
References Window::getStatus(), LayoutWidget::getSubalbums(), Window::getTitle(), LayoutWidget::getWindow(), layout, PhotosIconView::numSelected(), photos, selectedPhotoStateChanged(), TitleWidget::setBusy(), StatusWidget::setStatus(), StatusWidget::showProgressBar(), SubalbumsWidget::updateButtons(), updateButtons(), and StatusWidget::updateProgress().
Referenced by SubalbumWidget().
|
signal |
Referenced by revertSelectedPhotos(), rotate270ImageAction(), rotate90ImageAction(), and selectionChangedEvent().
|
privateslot |
handles changing selections
Definition at line 703 of file subalbumWidget.cpp.
References selectedPhotoStateChanged(), and updateButtons().
Referenced by removeImageAction(), setSubalbum(), and SubalbumWidget().
void SubalbumWidget::setSelectedPhoto | ( | Photo * | selection | ) |
Sets the selected photo to selection and ensures it is visible.
Definition at line 633 of file subalbumWidget.cpp.
References photos.
Referenced by LayoutWidget::tabChanged().
void SubalbumWidget::setSubalbum | ( | Subalbum * | salbum | ) |
Resets the subalbum this subalbum widget is displaying.
Definition at line 222 of file subalbumWidget.cpp.
References buttonsFrame, refreshPhotos(), selectionChangedEvent(), and subalbum.
Referenced by TitleWidget::loadAlbum(), TitleWidget::newAlbum(), and LayoutWidget::showCollection().
|
privateslot |
set desktop wallpaper
Definition at line 408 of file subalbumWidget.cpp.
References getSelectedPhoto(), and setWallpaper().
Referenced by SubalbumWidget().
void SubalbumWidget::stripDescriptionsFromSelectedPhotos | ( | ) |
Strip descriptions from selected photos.
Definition at line 566 of file subalbumWidget.cpp.
References photos.
Referenced by TitleWidget::removeSelectedPhotoDesc().
void SubalbumWidget::updateButtons | ( | bool | enable | ) |
Activates/Deactives remove/rotate buttons.
Definition at line 755 of file subalbumWidget.cpp.
References addImage, buttonsState, layout, removeImage, rotate270Image, rotate90Image, setDesktopBtn, LayoutWidget::setEditTabEnabled(), and wallpaperButtonState.
Referenced by TitleWidget::exportLargeImages(), TitleWidget::exportSmallWebGallery(), TitleWidget::loadAlbum(), TitleWidget::saveAlbum(), and TitleWidget::saveAsAlbum().
|
privateslot |
Activates/Deactives remove/rotate buttons depending on if an image is selected.
Definition at line 712 of file subalbumWidget.cpp.
References layout, photos, removeImage, rotate270Image, rotate90Image, setDesktopBtn, and LayoutWidget::setEditTabEnabled().
Referenced by addImageAction(), removeImageAction(), rotate270ImageAction(), rotate90ImageAction(), and selectionChangedEvent().
|
private |
"Add" button
Definition at line 145 of file subalbumWidget.h.
Referenced by SubalbumWidget(), and updateButtons().
|
private |
Definition at line 136 of file subalbumWidget.h.
Referenced by setSubalbum(), and SubalbumWidget().
|
private |
Definition at line 132 of file subalbumWidget.h.
Referenced by SubalbumWidget().
|
private |
cached enabled/disabled state of buttons
Definition at line 163 of file subalbumWidget.h.
Referenced by updateButtons().
|
private |
Pointer to the parent layout widget.
Definition at line 160 of file subalbumWidget.h.
Referenced by addImageAction(), removeImageAction(), rotate270ImageAction(), rotate90ImageAction(), SubalbumWidget(), and updateButtons().
|
private |
Grids widgets are placed in.
Definition at line 131 of file subalbumWidget.h.
Referenced by SubalbumWidget().
|
private |
Photos layout.
Definition at line 139 of file subalbumWidget.h.
Referenced by addImageAction(), anyPhotosSelected(), anySelectedPhotosRevertable(), deselectAll(), getFirstSelectedPhoto(), getPhotos(), getSelectedPhoto(), refreshAllPhotos(), refreshPhotos(), refreshSelectedPhotos(), removeImageAction(), reorder(), resizeEvent(), revertSelectedPhotos(), rotate270ImageAction(), rotate90ImageAction(), setSelectedPhoto(), stripDescriptionsFromSelectedPhotos(), SubalbumWidget(), and updateButtons().
|
private |
"Remove" button
Definition at line 148 of file subalbumWidget.h.
Referenced by SubalbumWidget(), and updateButtons().
|
private |
"Rotate 270" button
Definition at line 154 of file subalbumWidget.h.
Referenced by SubalbumWidget(), and updateButtons().
|
private |
"Rotate 90" button
Definition at line 151 of file subalbumWidget.h.
Referenced by SubalbumWidget(), and updateButtons().
|
private |
Set desktop wallpaper button.
Definition at line 157 of file subalbumWidget.h.
Referenced by SubalbumWidget(), and updateButtons().
|
private |
Pointer to backend subalbum.
Definition at line 142 of file subalbumWidget.h.
Referenced by addImageAction(), getSubalbum(), refreshPhotos(), removeImageAction(), reorder(), setSubalbum(), and SubalbumWidget().
|
private |
Grid lower buttons are placed in.
Definition at line 135 of file subalbumWidget.h.
|
private |
cached enabled/distable state of set wallpaper button
Definition at line 166 of file subalbumWidget.h.
Referenced by updateButtons().