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