#include <selectionPlacementInterface.h>
Inheritance diagram for SelectionPlacementInterface:
Definition at line 26 of file selectionPlacementInterface.h.
Signals | |
void | placementChanged (QRect) |
Public Member Functions | |
SelectionPlacementInterface (QString imageFilename, QWidget *parent=0, const char *name=0) | |
Creates layout. | |
~SelectionPlacementInterface () | |
Deletes objects. | |
QRect | getSelectedRegion () |
Returns the selected region in image space. | |
void | setSelectedRegion (QRect selection) |
Set the select region using image space coordinates. | |
virtual QSize | sizeHint () const |
virtual QSize | minimumSizeHint () const |
Protected Member Functions | |
void | paintEvent (QPaintEvent *e) |
void | mousePressEvent (QMouseEvent *e) |
void | mouseReleaseEvent (QMouseEvent *) |
void | mouseMoveEvent (QMouseEvent *e) |
Private Member Functions | |
QRect | imageToDisplay (QRect r) |
convert rectangle from image coordinates to display coordinates | |
bool | overRegion (QPoint p) |
util function used to determine if mouse is over selected region | |
void | recenterSelection (QPoint mousePosition) |
util function used to center selection about mouse location | |
Private Attributes | |
QImage | scaledImage |
Scaled image used for display purposes. | |
QImage | unselectedScaledImage |
Unselected scaled image (desaturated version of scaled image). | |
QSize | origImageSize |
original image dimensions | |
QRect | selection |
selection | |
bool | currentlyDragging |
dragging the mouse only moves the selection if the mouse button is pressed first over the selected region | |
bool | currentMouseShapeIsDrag |
current mouse shape. |
|
Creates layout.
Definition at line 22 of file selectionPlacementInterface.cpp. References b, currentlyDragging, currentMouseShapeIsDrag, getImageSize(), HSVtoRGB(), origImageSize, RGBtoHSV(), scaledImage, scaleImage(), selection, SelectionPlacementInterface(), and unselectedScaledImage. Referenced by SelectionPlacementInterface().
|
|
Deletes objects.
Definition at line 84 of file selectionPlacementInterface.cpp.
|
|
Returns the selected region in image space.
Definition at line 281 of file selectionPlacementInterface.cpp. References selection.
|
|
convert rectangle from image coordinates to display coordinates
Definition at line 257 of file selectionPlacementInterface.cpp. References imageToDisplay(), origImageSize, and scaledImage. Referenced by imageToDisplay(), overRegion(), and paintEvent().
|
|
Definition at line 158 of file selectionPlacementInterface.cpp. References scaledImage. Referenced by sizeHint().
|
|
Definition at line 230 of file selectionPlacementInterface.cpp. References currentlyDragging, currentMouseShapeIsDrag, getCursor(), mouseMoveEvent(), MOVE_SELECTION_CURSOR, overRegion(), and recenterSelection(). Referenced by mouseMoveEvent().
|
|
Definition at line 216 of file selectionPlacementInterface.cpp. References currentlyDragging, currentMouseShapeIsDrag, getCursor(), mousePressEvent(), MOVE_SELECTION_CURSOR, and recenterSelection(). Referenced by mousePressEvent().
|
|
Definition at line 251 of file selectionPlacementInterface.cpp. References currentlyDragging, and mouseReleaseEvent(). Referenced by mouseReleaseEvent().
|
|
util function used to determine if mouse is over selected region
Definition at line 161 of file selectionPlacementInterface.cpp. References height, imageToDisplay(), overRegion(), scaledImage, selection, and width. Referenced by mouseMoveEvent(), and overRegion().
|
|
Definition at line 86 of file selectionPlacementInterface.cpp. References bottomRight, buffer, height, imageToDisplay(), origImageSize, paintEvent(), scaledImage, selection, topLeft, unselectedScaledImage, and width. Referenced by paintEvent().
|
|
Referenced by recenterSelection(). |
|
util function used to center selection about mouse location
Definition at line 185 of file selectionPlacementInterface.cpp. References height, origImageSize, placementChanged(), recenterSelection(), selection, and width. Referenced by mouseMoveEvent(), mousePressEvent(), and recenterSelection().
|
|
Set the select region using image space coordinates.
Definition at line 286 of file selectionPlacementInterface.cpp. References setSelectedRegion(). Referenced by GrainEditor::previewResized(), and setSelectedRegion().
|
|
Definition at line 155 of file selectionPlacementInterface.cpp. References minimumSizeHint().
|
|
dragging the mouse only moves the selection if the mouse button is pressed first over the selected region
Definition at line 78 of file selectionPlacementInterface.h. Referenced by mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), and SelectionPlacementInterface(). |
|
current mouse shape. by caching this value we avoid resetting the mouse cursor every time it moves etc. Definition at line 82 of file selectionPlacementInterface.h. Referenced by mouseMoveEvent(), mousePressEvent(), and SelectionPlacementInterface(). |
|
original image dimensions
Definition at line 71 of file selectionPlacementInterface.h. Referenced by imageToDisplay(), paintEvent(), recenterSelection(), and SelectionPlacementInterface(). |
|
Scaled image used for display purposes.
Definition at line 65 of file selectionPlacementInterface.h. Referenced by imageToDisplay(), minimumSizeHint(), overRegion(), paintEvent(), and SelectionPlacementInterface(). |
|
selection
Definition at line 74 of file selectionPlacementInterface.h. Referenced by getSelectedRegion(), overRegion(), paintEvent(), recenterSelection(), and SelectionPlacementInterface(). |
|
Unselected scaled image (desaturated version of scaled image).
Definition at line 68 of file selectionPlacementInterface.h. Referenced by paintEvent(), and SelectionPlacementInterface(). |