11 #ifndef GUI_EDITING_SPLITVIEWINTERFACE_H 12 #define GUI_EDITING_SPLITVIEWINTERFACE_H 21 #include <QPaintEvent> 22 #include <QResizeEvent> 23 #include <QMouseEvent> 121 #endif //GUI_EDITING_SPLITVIEWINTERFACE_H PREVIEW_MOUSE_MODE
ceffect of mouse movement on split point
PREVIEW_MOUSE_MODE mouseMode
current mouse move mode
SplitViewInterface(QWidget *parent=0, const char *name=0)
Creates layout.
virtual void resizeEvent(QResizeEvent *)=0
A split view interface provides a means to show before and after versions of an image while adjustmen...
PREVIEW_MODE previewMode
Current display setting (adjusted or split screen)
QImage & getOrigImage()
returns orig image object
double displayToWorld(int coordinate)
convert display coordinates to world coordinates (double from 0.0 - 1.0)
bool nearSplitPoint(QPoint p)
determines if mouse is near split point
QString originalString
Original and adjusted strings.
QImage adjustedImage
Scaled adjusted image.
void setImages(QImage origImage, QImage adjustedImage)
virtual QSize minimumSizeHint() const
void mouseReleaseEvent(QMouseEvent *)
void mouseMoveEvent(QMouseEvent *e)
double dragOffset
x (or y) coordinate of split between drawn adjusted and original images
bool forceDrawLabel
Draw original/adjusted lables outside of split view mode?
void setPreviewMode(PREVIEW_MODE mode, bool forceDrawLabel=false)
Sets preview mode.
PREVIEW_MODE
current preview mode
int worldToDisplay(double coordinate)
convert world coordinates to display coordinates (int from 0 to origImage width-1) ...
QImage origImage
Scaled original image.
void mousePressEvent(QMouseEvent *e)
void paintEvent(QPaintEvent *e)
virtual QSize sizeHint() const =0
void setAdjustedImage(QImage adjustedImage)
sets adjusted image and repaints
QFont textFont
Larger font used for drawing text.
PREVIEW_MOUSE_MODE currentMouseShape
current mouse shape.