Logo Search packages:      
Sourcecode: albumshaper version File versions  Download package

SelectionInterface Class Reference

#include <selectionInterface.h>

List of all members.

Detailed Description

Display widget for photos. Used by the PhotoEditWidget.

Definition at line 44 of file selectionInterface.h.

Public Slots

void selectAll ()
 selects all of the image
void selectNone ()
 selects none of the image


void aspectRatioChanged ()
 emitted when the user changed the aspect ratio of the selected region
void ctrlClick ()
void lineSelected (QPoint p1, QPoint p2)
void selectionChanged ()
 emitted when the user changed the selected region

Public Member Functions

void enterDrawLineMode ()
 enter draw line mode - used for tilt correction
void getDisplaySize (int &width, int &height)
 returns the current photo display size (in screen pixels)
void getSelection (QPoint &topLeft, QPoint &bottomRight)
bool selectionEmpty ()
 returns true if selection is empty
 SelectionInterface (QWidget *parent=0, const char *name=0)
 Creates layout.
void setPhoto (QString imageFilename, bool resetSelection=true)
 Updates displayed photo.
void setSelection (QPoint topLeft, QPoint bottomRight, double cropMaxDimen=-1.0)
 ~SelectionInterface ()
 Deletes objects.

Protected Member Functions

void keyPressEvent (QKeyEvent *e)
void keyReleaseEvent (QKeyEvent *e)
void mouseMoveEvent (QMouseEvent *e)
void mousePressEvent (QMouseEvent *e)
void mouseReleaseEvent (QMouseEvent *)
void paintEvent (QPaintEvent *e)
void resizeEvent (QResizeEvent *)
QSize sizeHint ()

Private Member Functions

void constructDisplayImages ()
 construct scaled image and unselected images for drawing purposes
QPoint ConvertDisplayToImageCoordinate (QPoint p)
 converts a point from display coordinates to original image coordinates
QPoint ConvertImageToDisplayCoordinate (QPoint p)
 converts a point from original image coordinates to display coordinates
QPoint cropSelectedPoint (QPoint p)
 crops a selected point to within the photo
DRAG_MODE mouseActionByPosition (QPoint p)
 determine action based on mouse position
bool scaleSelection (int delta)
 increase/decrease selection while maintaining aspect ratio by changing selected width by delta
void updateCursorShape (QPoint p)
 update mouse cursor based on position over widget and selected region

Private Attributes

QPoint cachedMousePosition
 cached mouse position, used to scale or drag around selection area
QPoint cachedSelctionCenter
QSize cachedSelectionSize
double cropMaxDimen
 Current crop max dimension (in inches).
bool CTRL_Pressed
 state of CTRL button, effects if mouse clicks rotate current selection
DRAG_MODE currentDragMode
 method of dragging out, either new selection or resizing selection corner or side
DRAG_MODE currentMouseShape
QImage fullScreenImage
 Full screen version of image.
QPoint mouseDragPoint
 second corner of selection, where mouse moved to
QPoint mousePressPoint
 first corner of selection, where mouse first clicked
QString origImageFilename
 original image filename
QSize origImageSize
 original image dimensions
QImage scaledImage
 Scaled image used for display purposes.
bool SHIFT_Pressed
 state of SHIFT button, effects if mouse drags adjust or scale the current selection
QImage unselectedScaledImage
 Grayscale version of scaled image, used for drawing non-selected regions.

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index