#include <editingInterface.h>
Inheritance diagram for EditingInterface:
Definition at line 53 of file editingInterface.h.
Public Slots | |
void | handleSelectionChanged () |
void | handleAspectRatioChanged () |
void | setFocus () |
Signals | |
void | photoModified () |
Public Member Functions | |
EditingInterface (QWidget *parent=0, const char *name=0) | |
Constructs layout. | |
~EditingInterface () | |
void | setPhoto (Subalbum *collection, Photo *photo) |
Sets the photo pointer and constructs scaled qimage's for painting. | |
Photo * | getPhoto () |
Returns a pointer to the currently selected photo. | |
bool | currentPhotoRevertable () |
void | revertCurrentPhoto () |
reverts current photo and updates display | |
Protected Member Functions | |
void | keyPressEvent (QKeyEvent *e) |
Private Slots | |
void | showPrevPhoto () |
Show prev photo. | |
void | showNextPhoto () |
Show next photo. | |
void | showFirstPhoto () |
Show first photo. | |
void | showLastPhoto () |
Show last photo. | |
void | rotateRight () |
Rotate image right 90 degrees. | |
void | rotateLeft () |
Rotate image left 90 degrees. | |
void | flipHorizontal () |
Flip image horizontally. | |
void | startCorrectTilt () |
Enter correct image tilt mode. | |
void | finishCorrectTilt (QPoint p1, QPoint p2) |
Finish correcting and image's tilt. | |
void | flipVertical () |
Flip image vertically. | |
void | selectAspectRatio () |
Aspect ratio selection changed. | |
void | screenResolutionChanged () |
Update recorded screen resolution and selection if necessary. | |
void | rotateSelection () |
Rotate current selection. | |
void | crop () |
Cropped image. | |
void | enhanceContrast () |
Enhance image contrast. | |
void | colorBalance () |
Improve color balance. | |
void | removeRedeye () |
Applies redeye removal. | |
void | tuneLevels () |
Opens levels editor for manual histogram and brightness/contrast adjustments. | |
void | adjustGrain () |
Opens image grain editor. | |
void | selectEffect () |
Effect seletion changed. | |
void | applyEffect () |
Apply selected effect. | |
void | returnAction () |
Exit editing interface. | |
Private Member Functions | |
void | showNextPrevFirstLastPhoto (Photo *newPhoto) |
Utility method for show prev/next photos. | |
void | rotateFlip (TRANSFORM_CODE rotationFlipType) |
Utility method for rotation + flip slots. | |
bool | findSelection (QPoint &topLeft, QPoint &bottomRight) |
Finds the selected region of the image. | |
void | selectAll (QPoint &topLeft, QPoint &bottomRight) |
Return coordinates that select entire image. | |
QImage * | applyEffect (QString filename, ManipulationOptions *options=NULL) |
utlity function for apply effect and preview effect slots | |
void | applyImageUpdate (QImage *editedImage, bool resetSelection) |
Applies update to image. | |
Private Attributes | |
ClickableLabel * | previousButton |
------------ Buttons for changing the shown image | |
ClickableLabel * | nextButton |
------------ Buttons for changing the shown image | |
SelectionInterface * | selectionInterface |
This widget scales and displays the photo to fit the available screen space, and provides extensive support for selecting regions of the photo for editing/cropping. | |
QComboBox * | aspectRatios |
Widget for selection aspect ratio to crop to. | |
QComboBox * | orientations |
int | displayResolutionIndex |
Index for screen resolution, needed if this value pair changes during program executing. | |
QSize * | aspectRatioValues |
array of common aspect ratios to crop to | |
double * | maxDimensions |
bool | selectionRotated |
state variable indicating if the user wants to use a rotate aspect ratio | |
QToolButton * | correctTiltButton |
The start tilt button is disabled while a line is being selected. | |
QToolButton * | cropButton |
The crop buttons is disabled when no seletion is present. | |
ClickableLabel * | redEyeReductionButton |
The red eye reduction button is disabled when no selection is present. | |
QComboBox * | effectsList |
List of effects that can be applied to photos. | |
QPushButton * | applyEffectButton |
The apply effect button is disabled when no effect has been chosen. | |
QLabel * | effectPreview |
Label that shows preview of effect. | |
Subalbum * | collection |
========== Pointer to backend collection | |
Photo * | photo |
Pointer to backend photo. | |
QString | effectPreviewImageFilename |
Path to scaled down version of image for fast generation of previews of effects. | |
LayoutWidget * | layout |
Pointer to the parent layout widget. | |
int | displayWidth |
Dimension of photo in display coordinates. | |
int | displayHeight |
Dimension of photo in display coordinates. | |
int | imageWidth |
Dimension of photo in image coordinates. | |
int | imageHeight |
Dimension of photo in image coordinates. |
|
Constructs layout.
Definition at line 71 of file editingInterface.cpp. References adjustGrain(), applyEffect(), applyEffectButton, aspectRatios, aspectRatioValues, BW_EFFECT, colorBalance(), correctTiltButton, crop(), cropButton, displayResolutionIndex, EditingInterface(), effectPreview, effectsList, EMBOSS_EFFECT, enhanceContrast(), finishCorrectTilt(), flipHorizontal(), flipVertical(), handleAspectRatioChanged(), handleSelectionChanged(), IMAGE_PATH, INVERT_EFFECT, layout, maxDimensions, MOSAIC_EFFECT, nextButton, NUM_MANIPULATIONS, PAINTING_EFFECT, photo, POINTILLISM_EFFECT, previousButton, redEyeReductionButton, removeRedeye(), rotateLeft(), rotateRight(), rotateSelection(), screenResolutionChanged(), selectAspectRatio(), selectEffect(), selectionInterface, SEPIA_EFFECT, ClickableLabel::setEnabled(), ClickableLabel::setPixmap(), showNextPhoto(), showPrevPhoto(), startCorrectTilt(), TIGHT_WIDGET_SPACING, tuneLevels(), and WIDGET_SPACING. Referenced by EditingInterface().
|
|
Definition at line 428 of file editingInterface.cpp.
|
|
Opens image grain editor.
Definition at line 748 of file editingInterface.cpp. References applyImageUpdate(), Photo::getImageFilename(), GrainEditor::getModifiedImage(), Window::getStatus(), LayoutWidget::getWindow(), StatusWidget::grabInput(), layout, photo, and StatusWidget::releaseInput(). Referenced by EditingInterface().
|
|
utlity function for apply effect and preview effect slots
Definition at line 834 of file editingInterface.cpp. References blackWhiteEffect(), BW_EFFECT, effectsList, EMBOSS_EFFECT, embossEffect(), INVERT_EFFECT, invertEffect(), MOSAIC_EFFECT, mosaicEffect(), oilPaintingEffect(), PAINTING_EFFECT, POINTILLISM_EFFECT, pointillismEffect(), SEPIA_EFFECT, and sepiaEffect().
|
|
Apply selected effect.
Definition at line 788 of file editingInterface.cpp. References applyEffectButton, applyImageUpdate(), editedImage, effectsList, Photo::getImageFilename(), MosaicOptionsDialog::getOptions(), Window::getStatus(), LayoutWidget::getWindow(), StatusWidget::grabInput(), layout, MOSAIC_EFFECT, photo, StatusWidget::releaseInput(), StatusWidget::setStatus(), and StatusWidget::showProgressBar(). Referenced by EditingInterface(), and selectEffect().
|
|
Applies update to image.
Definition at line 853 of file editingInterface.cpp. References applyImageUpdate(), displayHeight, displayWidth, editedImage, EFFECT_PREVIEW_HEIGHT, EFFECT_PREVIEW_WIDTH, effectPreviewImageFilename, SelectionInterface::getDisplaySize(), Photo::getImageFilename(), getImageSize(), imageHeight, imageWidth, photo, photoModified(), scaleImage(), selectEffect(), selectionInterface, selectionRotated, SelectionInterface::selectNone(), Photo::setImage(), and SelectionInterface::setPhoto(). Referenced by adjustGrain(), applyEffect(), applyImageUpdate(), colorBalance(), crop(), enhanceContrast(), finishCorrectTilt(), removeRedeye(), and tuneLevels().
|
|
Improve color balance.
Definition at line 672 of file editingInterface.cpp. References applyImageUpdate(), Photo::getImageFilename(), Window::getStatus(), LayoutWidget::getWindow(), StatusWidget::grabInput(), improveColorBalance(), layout, photo, and StatusWidget::releaseInput(). Referenced by EditingInterface().
|
|
Cropped image.
Definition at line 626 of file editingInterface.cpp. References applyImageUpdate(), bottomRight, cropImage(), findSelection(), Photo::getImageFilename(), Window::getStatus(), LayoutWidget::getWindow(), StatusWidget::grabInput(), layout, photo, StatusWidget::releaseInput(), and topLeft. Referenced by EditingInterface().
|
|
Definition at line 995 of file editingInterface.cpp. References photo, and Photo::revertPossible(). Referenced by LayoutWidget::photoStateChangedEvent(), and revertCurrentPhoto().
|
|
Enhance image contrast.
Definition at line 650 of file editingInterface.cpp. References applyImageUpdate(), enhanceImageContrast(), Photo::getImageFilename(), Window::getStatus(), LayoutWidget::getWindow(), StatusWidget::grabInput(), layout, photo, and StatusWidget::releaseInput(). Referenced by EditingInterface().
|
|
Finds the selected region of the image.
Definition at line 914 of file editingInterface.cpp. References bottomRight, findSelection(), SelectionInterface::getSelection(), selectionInterface, and topLeft. Referenced by crop(), findSelection(), handleSelectionChanged(), and removeRedeye().
|
|
Finish correcting and image's tilt.
Definition at line 1215 of file editingInterface.cpp. References applyImageUpdate(), correctImageTilt(), correctTiltButton, finishCorrectTilt(), Photo::getImageFilename(), Window::getStatus(), LayoutWidget::getWindow(), StatusWidget::grabInput(), layout, photo, and StatusWidget::releaseInput(). Referenced by EditingInterface(), and finishCorrectTilt().
|
|
Flip image horizontally.
Definition at line 557 of file editingInterface.cpp. References FLIP_H, and rotateFlip(). Referenced by EditingInterface(), and keyPressEvent().
|
|
Flip image vertically.
Definition at line 562 of file editingInterface.cpp. References FLIP_V, and rotateFlip(). Referenced by EditingInterface(), and keyPressEvent().
|
|
Returns a pointer to the currently selected photo.
Definition at line 430 of file editingInterface.cpp. References photo. Referenced by LayoutWidget::tabChanged().
|
|
Definition at line 938 of file editingInterface.cpp. References aspectRatios. Referenced by EditingInterface().
|
|
Definition at line 928 of file editingInterface.cpp. References bottomRight, cropButton, findSelection(), redEyeReductionButton, ClickableLabel::setEnabled(), and topLeft. Referenced by EditingInterface().
|
|
Definition at line 952 of file editingInterface.cpp. References flipHorizontal(), flipVertical(), keyPressEvent(), returnAction(), rotateLeft(), rotateRight(), showFirstPhoto(), showLastPhoto(), showNextPhoto(), and showPrevPhoto(). Referenced by keyPressEvent().
|
|
Referenced by applyImageUpdate(), revertCurrentPhoto(), rotateFlip(), and showNextPrevFirstLastPhoto(). |
|
Applies redeye removal.
Definition at line 694 of file editingInterface.cpp. References applyImageUpdate(), bottomRight, findSelection(), Photo::getImageFilename(), Window::getStatus(), LayoutWidget::getWindow(), StatusWidget::grabInput(), layout, photo, StatusWidget::releaseInput(), removeRedeyeRegions(), and topLeft. Referenced by EditingInterface().
|
|
Exit editing interface.
Definition at line 908 of file editingInterface.cpp. References layout, and LayoutWidget::organize(). Referenced by keyPressEvent().
|
|
reverts current photo and updates display Revert photo Definition at line 1003 of file editingInterface.cpp. References currentPhotoRevertable(), displayHeight, displayWidth, EFFECT_PREVIEW_HEIGHT, EFFECT_PREVIEW_WIDTH, effectPreviewImageFilename, SelectionInterface::getDisplaySize(), Photo::getImageFilename(), getImageSize(), Window::getStatus(), LayoutWidget::getWindow(), StatusWidget::grabInput(), imageHeight, imageWidth, layout, Photo::originalImageFilename(), photo, photoModified(), StatusWidget::releaseInput(), Photo::revertPhoto(), scaleImage(), selectEffect(), selectionInterface, and SelectionInterface::setPhoto(). Referenced by LayoutWidget::revertPhotos().
|
|
Utility method for rotation + flip slots.
Definition at line 567 of file editingInterface.cpp. References displayHeight, displayWidth, EFFECT_PREVIEW_HEIGHT, EFFECT_PREVIEW_WIDTH, effectPreviewImageFilename, SelectionInterface::getDisplaySize(), Photo::getImageFilename(), getImageSize(), Window::getStatus(), LayoutWidget::getWindow(), StatusWidget::grabInput(), imageHeight, imageWidth, layout, photo, photoModified(), StatusWidget::releaseInput(), ROTATE_270, ROTATE_90, rotateFlip(), scaleImage(), selectAspectRatio(), selectEffect(), selectionInterface, selectionRotated, Photo::setImage(), SelectionInterface::setPhoto(), and transformImage(). Referenced by flipHorizontal(), flipVertical(), rotateFlip(), rotateLeft(), and rotateRight().
|
|
Rotate image left 90 degrees.
Definition at line 552 of file editingInterface.cpp. References ROTATE_270, and rotateFlip(). Referenced by EditingInterface(), and keyPressEvent().
|
|
Rotate image right 90 degrees.
Definition at line 547 of file editingInterface.cpp. References ROTATE_90, and rotateFlip(). Referenced by EditingInterface(), and keyPressEvent().
|
|
Rotate current selection.
Definition at line 1052 of file editingInterface.cpp. References aspectRatios, bottomRight, calcScaledImageDimensions(), SelectionInterface::getSelection(), imageHeight, imageWidth, selectAspectRatio(), selectionInterface, selectionRotated, SelectionInterface::setSelection(), and topLeft. Referenced by EditingInterface().
|
|
Update recorded screen resolution and selection if necessary.
Definition at line 616 of file editingInterface.cpp. References aspectRatios, aspectRatioValues, displayResolutionIndex, and selectAspectRatio(). Referenced by EditingInterface().
|
|
Return coordinates that select entire image.
Definition at line 944 of file editingInterface.cpp. References bottomRight, imageHeight, imageWidth, selectAll(), and topLeft. Referenced by selectAll().
|
|
Aspect ratio selection changed.
Definition at line 1117 of file editingInterface.cpp. References aspectRatios, aspectRatioValues, calcScaledImageDimensions(), displayResolutionIndex, SelectionInterface::getSelection(), imageHeight, imageWidth, maxDimensions, selectionInterface, selectionRotated, and SelectionInterface::setSelection(). Referenced by EditingInterface(), rotateFlip(), rotateSelection(), screenResolutionChanged(), and showNextPrevFirstLastPhoto().
|
|
Effect seletion changed.
Definition at line 774 of file editingInterface.cpp. References applyEffect(), editedImage, effectPreview, and effectPreviewImageFilename. Referenced by applyImageUpdate(), EditingInterface(), revertCurrentPhoto(), rotateFlip(), setPhoto(), and showNextPrevFirstLastPhoto().
|
|
Definition at line 1046 of file editingInterface.cpp. References selectionInterface. Referenced by LayoutWidget::tabChanged().
|
|
Sets the photo pointer and constructs scaled qimage's for painting.
Definition at line 432 of file editingInterface.cpp. References aspectRatios, cropButton, displayHeight, displayWidth, EFFECT_PREVIEW_HEIGHT, EFFECT_PREVIEW_WIDTH, effectPreviewImageFilename, effectsList, SelectionInterface::getDisplaySize(), getImageSize(), imageHeight, imageWidth, nextButton, previousButton, redEyeReductionButton, scaleImage(), selectEffect(), selectionInterface, selectionRotated, ClickableLabel::setEnabled(), ClickableLabel::setInvisible(), SelectionInterface::setPhoto(), and setPhoto(). Referenced by setPhoto(), and LayoutWidget::tabChanged().
|
|
Show first photo.
Definition at line 487 of file editingInterface.cpp. References collection, Subalbum::getFirst(), photo, and showNextPrevFirstLastPhoto(). Referenced by keyPressEvent().
|
|
Show last photo.
Definition at line 495 of file editingInterface.cpp. References collection, Subalbum::getLast(), photo, and showNextPrevFirstLastPhoto(). Referenced by keyPressEvent().
|
|
Show next photo.
Definition at line 478 of file editingInterface.cpp. References Photo::getNext(), photo, and showNextPrevFirstLastPhoto(). Referenced by EditingInterface(), and keyPressEvent().
|
|
Utility method for show prev/next photos.
Definition at line 503 of file editingInterface.cpp. References aspectRatios, displayHeight, displayWidth, EFFECT_PREVIEW_HEIGHT, EFFECT_PREVIEW_WIDTH, effectPreviewImageFilename, SelectionInterface::getDisplaySize(), Photo::getImageFilename(), getImageSize(), Photo::getNext(), Photo::getPrev(), imageHeight, imageWidth, nextButton, photo, photoModified(), previousButton, scaleImage(), selectAspectRatio(), selectEffect(), selectionInterface, selectionRotated, ClickableLabel::setInvisible(), SelectionInterface::setPhoto(), SelectionInterface::setSelection(), and showNextPrevFirstLastPhoto(). Referenced by showFirstPhoto(), showLastPhoto(), showNextPhoto(), showNextPrevFirstLastPhoto(), and showPrevPhoto().
|
|
Show prev photo.
Definition at line 469 of file editingInterface.cpp. References Photo::getPrev(), photo, and showNextPrevFirstLastPhoto(). Referenced by EditingInterface(), and keyPressEvent().
|
|
Enter correct image tilt mode.
Definition at line 1207 of file editingInterface.cpp. References correctTiltButton, SelectionInterface::enterDrawLineMode(), and selectionInterface. Referenced by EditingInterface().
|
|
Opens levels editor for manual histogram and brightness/contrast adjustments.
Definition at line 722 of file editingInterface.cpp. References applyImageUpdate(), Photo::getImageFilename(), HistogramEditor::getModifiedImage(), Window::getStatus(), LayoutWidget::getWindow(), StatusWidget::grabInput(), layout, photo, and StatusWidget::releaseInput(). Referenced by EditingInterface().
|
|
The apply effect button is disabled when no effect has been chosen.
Definition at line 208 of file editingInterface.h. Referenced by applyEffect(), and EditingInterface(). |
|
Widget for selection aspect ratio to crop to.
Definition at line 180 of file editingInterface.h. Referenced by EditingInterface(), handleAspectRatioChanged(), rotateSelection(), screenResolutionChanged(), selectAspectRatio(), setPhoto(), and showNextPrevFirstLastPhoto(). |
|
array of common aspect ratios to crop to
Definition at line 189 of file editingInterface.h. Referenced by EditingInterface(), screenResolutionChanged(), and selectAspectRatio(). |
|
========== Pointer to backend collection
Definition at line 214 of file editingInterface.h. Referenced by showFirstPhoto(), and showLastPhoto(). |
|
The start tilt button is disabled while a line is being selected.
Definition at line 196 of file editingInterface.h. Referenced by EditingInterface(), finishCorrectTilt(), and startCorrectTilt(). |
|
The crop buttons is disabled when no seletion is present.
Definition at line 199 of file editingInterface.h. Referenced by EditingInterface(), handleSelectionChanged(), and setPhoto(). |
|
Dimension of photo in display coordinates.
Definition at line 226 of file editingInterface.h. Referenced by applyImageUpdate(), revertCurrentPhoto(), rotateFlip(), setPhoto(), and showNextPrevFirstLastPhoto(). |
|
Index for screen resolution, needed if this value pair changes during program executing.
Definition at line 186 of file editingInterface.h. Referenced by EditingInterface(), screenResolutionChanged(), and selectAspectRatio(). |
|
Dimension of photo in display coordinates.
Definition at line 226 of file editingInterface.h. Referenced by applyImageUpdate(), revertCurrentPhoto(), rotateFlip(), setPhoto(), and showNextPrevFirstLastPhoto(). |
|
Label that shows preview of effect.
Definition at line 211 of file editingInterface.h. Referenced by EditingInterface(), and selectEffect(). |
|
Path to scaled down version of image for fast generation of previews of effects.
Definition at line 220 of file editingInterface.h. Referenced by applyImageUpdate(), revertCurrentPhoto(), rotateFlip(), selectEffect(), setPhoto(), and showNextPrevFirstLastPhoto(). |
|
List of effects that can be applied to photos.
Definition at line 205 of file editingInterface.h. Referenced by applyEffect(), EditingInterface(), and setPhoto(). |
|
Dimension of photo in image coordinates.
Definition at line 229 of file editingInterface.h. Referenced by applyImageUpdate(), revertCurrentPhoto(), rotateFlip(), rotateSelection(), selectAll(), selectAspectRatio(), setPhoto(), and showNextPrevFirstLastPhoto(). |
|
Dimension of photo in image coordinates.
Definition at line 229 of file editingInterface.h. Referenced by applyImageUpdate(), revertCurrentPhoto(), rotateFlip(), rotateSelection(), selectAll(), selectAspectRatio(), setPhoto(), and showNextPrevFirstLastPhoto(). |
|
Pointer to the parent layout widget.
Definition at line 223 of file editingInterface.h. Referenced by adjustGrain(), applyEffect(), colorBalance(), crop(), EditingInterface(), enhanceContrast(), finishCorrectTilt(), removeRedeye(), returnAction(), revertCurrentPhoto(), rotateFlip(), and tuneLevels(). |
|
Definition at line 190 of file editingInterface.h. Referenced by EditingInterface(), and selectAspectRatio(). |
|
------------ Buttons for changing the shown image
Definition at line 173 of file editingInterface.h. Referenced by EditingInterface(), setPhoto(), and showNextPrevFirstLastPhoto(). |
|
Definition at line 183 of file editingInterface.h. |
|
Pointer to backend photo.
Definition at line 217 of file editingInterface.h. Referenced by adjustGrain(), applyEffect(), applyImageUpdate(), colorBalance(), crop(), currentPhotoRevertable(), EditingInterface(), enhanceContrast(), finishCorrectTilt(), getPhoto(), removeRedeye(), revertCurrentPhoto(), rotateFlip(), showFirstPhoto(), showLastPhoto(), showNextPhoto(), showNextPrevFirstLastPhoto(), showPrevPhoto(), and tuneLevels(). |
|
------------ Buttons for changing the shown image
Definition at line 173 of file editingInterface.h. Referenced by EditingInterface(), setPhoto(), and showNextPrevFirstLastPhoto(). |
|
The red eye reduction button is disabled when no selection is present.
Definition at line 202 of file editingInterface.h. Referenced by EditingInterface(), handleSelectionChanged(), and setPhoto(). |
|
This widget scales and displays the photo to fit the available screen space, and provides extensive support for selecting regions of the photo for editing/cropping.
Definition at line 177 of file editingInterface.h. Referenced by applyImageUpdate(), EditingInterface(), findSelection(), revertCurrentPhoto(), rotateFlip(), rotateSelection(), selectAspectRatio(), setFocus(), setPhoto(), showNextPrevFirstLastPhoto(), and startCorrectTilt(). |
|
state variable indicating if the user wants to use a rotate aspect ratio
Definition at line 193 of file editingInterface.h. Referenced by applyImageUpdate(), rotateFlip(), rotateSelection(), selectAspectRatio(), setPhoto(), and showNextPrevFirstLastPhoto(). |