#include <splitViewInterface.h>
Inheritance diagram for SplitViewInterface:
Definition at line 43 of file splitViewInterface.h.
Public Member Functions | |
SplitViewInterface (QWidget *parent=0, const char *name=0) | |
Creates layout. | |
void | setPreviewMode (PREVIEW_MODE mode, bool forceDrawLabel=false) |
Sets preview mode. | |
virtual QSize | sizeHint () const =0 |
virtual QSize | minimumSizeHint () const |
void | setImages (QImage origImage, QImage adjustedImage) |
void | setAdjustedImage (QImage adjustedImage) |
sets adjusted image and repaints | |
QImage & | getOrigImage () |
returns orig image object | |
Protected Member Functions | |
void | paintEvent (QPaintEvent *e) |
void | mousePressEvent (QMouseEvent *e) |
void | mouseReleaseEvent (QMouseEvent *) |
void | mouseMoveEvent (QMouseEvent *e) |
virtual void | resizeEvent (QResizeEvent *)=0 |
Private Member Functions | |
double | displayToWorld (int coordinate) |
convert display coordinates to world coordinates (double from 0.0 - 1.0) | |
int | worldToDisplay (double coordinate) |
convert world coordinates to display coordinates (int from 0 to origImage width-1) | |
bool | nearSplitPoint (QPoint p) |
determines if mouse is near split point | |
Private Attributes | |
PREVIEW_MODE | previewMode |
Current display setting (adjusted or split screen). | |
bool | forceDrawLabel |
Draw original/adjusted lables outside of split view mode? | |
QString | originalString |
Original and adjusted strings. | |
QString | adjustedString |
QFont | textFont |
Larger font used for drawing text. | |
double | dragOffset |
x (or y) coordinate of split between drawn adjusted and original images | |
PREVIEW_MOUSE_MODE | mouseMode |
current mouse move mode | |
PREVIEW_MOUSE_MODE | currentMouseShape |
current mouse shape. | |
QImage | origImage |
Scaled original image. | |
QImage | adjustedImage |
Scaled adjusted image. |
|
Creates layout.
Definition at line 27 of file splitViewInterface.cpp. References adjustedString, currentMouseShape, dragOffset, forceDrawLabel, mouseMode, NO_EFFECT_ON_SPLIT, originalString, previewMode, SPLIT_VIEW, SplitViewInterface(), and textFont. Referenced by SplitViewInterface().
|
|
convert display coordinates to world coordinates (double from 0.0 - 1.0)
Definition at line 388 of file splitViewInterface.cpp. References displayToWorld(), and origImage. Referenced by displayToWorld(), and mouseMoveEvent().
|
|
returns orig image object
Definition at line 412 of file splitViewInterface.cpp. References origImage. Referenced by HistogramEditor::generateAdjustedPreviewImage(), and GrainEditor::generateAdjustedPreviewImage().
|
|
Reimplemented in ScaledPreviewInterface. Definition at line 404 of file splitViewInterface.cpp. References adjustedString, originalString, TEXT_BACKGROUND_MARGIN, and textFont. Referenced by ScaledPreviewInterface::minimumSizeHint().
|
|
Definition at line 322 of file splitViewInterface.cpp. References adjustedString, currentMouseShape, displayToWorld(), DRAG_SPLIT, dragOffset, getCursor(), height, mouseMode, mouseMoveEvent(), MOVE_HOR_CURSOR, MOVE_VERT_CURSOR, nearSplitPoint(), NO_EFFECT_ON_SPLIT, origImage, originalString, TEXT_BACKGROUND_MARGIN, TEXT_INSET, textFont, and width. Referenced by mouseMoveEvent().
|
|
Definition at line 315 of file splitViewInterface.cpp. References DRAG_SPLIT, mouseMode, mousePressEvent(), and nearSplitPoint(). Referenced by mousePressEvent().
|
|
Definition at line 375 of file splitViewInterface.cpp. References currentMouseShape, DRAG_SPLIT, mouseMode, mouseReleaseEvent(), nearSplitPoint(), and NO_EFFECT_ON_SPLIT. Referenced by mouseReleaseEvent().
|
|
determines if mouse is near split point
Definition at line 287 of file splitViewInterface.cpp. References DRAG_THRESHOLD, dragOffset, height, nearSplitPoint(), origImage, previewMode, SPLIT_VIEW, width, and worldToDisplay(). Referenced by mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), and nearSplitPoint().
|
|
Definition at line 58 of file splitViewInterface.cpp. References ADJUSTED_IMAGE, adjustedImage, adjustedString, buffer, dragOffset, forceDrawLabel, height, INV_SPLIT_VIEW, origImage, ORIGINAL_IMAGE, originalString, paintEvent(), previewMode, SPLIT_VIEW, TEXT_BACKGROUND_MARGIN, TEXT_INSET, textFont, width, and worldToDisplay(). Referenced by paintEvent().
|
|
Implemented in PanningPreviewInterface, and ScaledPreviewInterface. |
|
sets adjusted image and repaints
Definition at line 423 of file splitViewInterface.cpp. References setAdjustedImage(). Referenced by HistogramEditor::generateAdjustedPreviewImage(), GrainEditor::generateAdjustedPreviewImage(), and setAdjustedImage().
|
|
Definition at line 415 of file splitViewInterface.cpp. References setImages(). Referenced by setImages().
|
|
Sets preview mode.
Definition at line 279 of file splitViewInterface.cpp. References previewMode, and setPreviewMode(). Referenced by HistogramEditor::keyPressEvent(), GrainEditor::keyPressEvent(), HistogramEditor::keyReleaseEvent(), GrainEditor::keyReleaseEvent(), HistogramEditor::selectPreviewImageType(), GrainEditor::selectPreviewImageType(), and setPreviewMode().
|
|
Implemented in PanningPreviewInterface, and ScaledPreviewInterface. |
|
convert world coordinates to display coordinates (int from 0 to origImage width-1)
Definition at line 396 of file splitViewInterface.cpp. References origImage, and worldToDisplay(). Referenced by nearSplitPoint(), paintEvent(), and worldToDisplay().
|
|
Scaled adjusted image.
Definition at line 112 of file splitViewInterface.h. Referenced by paintEvent(). |
|
Definition at line 93 of file splitViewInterface.h. Referenced by minimumSizeHint(), mouseMoveEvent(), paintEvent(), and SplitViewInterface(). |
|
current mouse shape. by caching this value we avoid resetting the mouse cursor every time it moves etc. Definition at line 106 of file splitViewInterface.h. Referenced by mouseMoveEvent(), mouseReleaseEvent(), and SplitViewInterface(). |
|
x (or y) coordinate of split between drawn adjusted and original images
Definition at line 99 of file splitViewInterface.h. Referenced by mouseMoveEvent(), nearSplitPoint(), paintEvent(), and SplitViewInterface(). |
|
Draw original/adjusted lables outside of split view mode?
Definition at line 89 of file splitViewInterface.h. Referenced by paintEvent(), and SplitViewInterface(). |
|
current mouse move mode
Definition at line 102 of file splitViewInterface.h. Referenced by mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), and SplitViewInterface(). |
|
Scaled original image.
Definition at line 109 of file splitViewInterface.h. Referenced by displayToWorld(), getOrigImage(), mouseMoveEvent(), nearSplitPoint(), paintEvent(), and worldToDisplay(). |
|
Original and adjusted strings.
Definition at line 92 of file splitViewInterface.h. Referenced by minimumSizeHint(), mouseMoveEvent(), paintEvent(), and SplitViewInterface(). |
|
Current display setting (adjusted or split screen).
Definition at line 86 of file splitViewInterface.h. Referenced by nearSplitPoint(), paintEvent(), setPreviewMode(), and SplitViewInterface(). |
|
Larger font used for drawing text.
Definition at line 96 of file splitViewInterface.h. Referenced by minimumSizeHint(), mouseMoveEvent(), paintEvent(), and SplitViewInterface(). |