16#ifndef GUI_EDITING_SELECTIONINTERFACE_H
17#define GUI_EDITING_SELECTIONINTERFACE_H
62 void setPhoto(QString imageFilename,
bool resetSelection=
true);
Display widget for photos. Used by the PhotoEditWidget.
QSize cachedSelectionSize
QPoint mousePressPoint
first corner of selection, where mouse first clicked
void ctrlClick()
emitted when a user CTRL-clicks a selection indicating the selection needs to be rotated intelligentl...
bool selectionEmpty()
returns true if selection is empty
void lineSelected(QPoint p1, QPoint p2)
emitted once line has been selected, on or the other points will be set to -1,-1 if the user escaped ...
SelectionInterface(QWidget *parent=0, const char *name=0)
Creates layout.
void selectNone()
selects none of the image
void setPhoto(QString imageFilename, bool resetSelection=true)
Updates displayed photo.
void selectAll()
selects all of the image
bool scaleSelection(int delta)
increase/decrease selection while maintaining aspect ratio by changing selected width by delta
~SelectionInterface()
Deletes objects.
void aspectRatioChanged()
emitted when the user changed the aspect ratio of the selected region
double cropMaxDimen
Current crop max dimension (in inches)
void keyReleaseEvent(QKeyEvent *e)
QPoint ConvertDisplayToImageCoordinate(QPoint p)
converts a point from display coordinates to original image coordinates
QSize origImageSize
original image dimensions
QString origImageFilename
original image filename
DRAG_MODE currentDragMode
method of dragging out, either new selection or resizing selection corner or side
void mouseMoveEvent(QMouseEvent *e)
QPoint ConvertImageToDisplayCoordinate(QPoint p)
converts a point from original image coordinates to display coordinates
void getDisplaySize(int &width, int &height)
returns the current photo display size (in screen pixels)
void paintEvent(QPaintEvent *e)
void updateCursorShape(QPoint p)
update mouse cursor based on position over widget and selected region
void resizeEvent(QResizeEvent *)
void enterDrawLineMode()
enter draw line mode - used for tilt correction
void mousePressEvent(QMouseEvent *e)
QPoint cachedSelctionCenter
cache the aspect ratio when pressing the control buttion, this helps aleviate numerical error that bu...
DRAG_MODE mouseActionByPosition(QPoint p)
determine action based on mouse position
bool SHIFT_Pressed
state of SHIFT button, effects if mouse drags adjust or scale the current selection
void constructDisplayImages()
construct scaled image and unselected images for drawing purposes
void setSelection(QPoint topLeft, QPoint bottomRight, double cropMaxDimen=-1.0)
Sets the current selection cropMaxDimen specifies the idealized dimension in dominant direction in in...
DRAG_MODE currentMouseShape
current mouse shape.
QImage unselectedScaledImage
Grayscale version of scaled image, used for drawing non-selected regions.
QPoint cropSelectedPoint(QPoint p)
crops a selected point to within the photo
void getSelection(QPoint &topLeft, QPoint &bottomRight)
Returns the current selected coordinates (actual slideshow image space, aka not including buffered wh...
QImage scaledImage
Scaled image used for display purposes.
QPoint mouseDragPoint
second corner of selection, where mouse moved to
void keyPressEvent(QKeyEvent *e)
bool CTRL_Pressed
state of CTRL button, effects if mouse clicks rotate current selection
QPoint cachedMousePosition
cached mouse position, used to scale or drag around selection area
void mouseReleaseEvent(QMouseEvent *)
void selectionChanged()
emitted when the user changed the selected region
QImage fullScreenImage
Full screen version of image.
DRAG_MODE
current drag mode, effect of mouse movement on current selection
@ MOVE_BOTTOM_RIGHT_CORNER
@ MOVE_BOTTOM_LEFT_CORNER