Logo Search packages:      
Sourcecode: scantailor version File versions  Download package

Public Types | Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes

output::DewarpingView Class Reference

Inheritance diagram for output::DewarpingView:
Inheritance graph
Collaboration diagram for output::DewarpingView:
Collaboration graph

List of all members.

Public Types

enum  FocalPointMode { CENTER_IF_FITS, DONT_CENTER }

Public Slots

void depthPerceptionChanged (double val)


void distortionModelChanged (dewarping::DistortionModel const &model)

Public Member Functions

void adjustAndSetWidgetFocalPoint (QPointF const &widget_fp)
 Set the focal point in widget coordinates, after adjustring it to avoid wasting of widget space.
 DewarpingView (QImage const &image, ImagePixmapUnion const &downscaled_image, QTransform const &source_to_virt, QPolygonF const &virt_display_area, QRectF const &virt_content_rect, PageId const &page_id, DewarpingMode dewarping_mode, dewarping::DistortionModel const &distortion_model, DepthPerception const &depth_perception)
QPixmap const & downscaledPixmap () const
void ensureStatusTip (QString const &status_tip)
 A better version of setStatusTip().
QRectF getOccupiedWidgetRect () const
QPointF getWidgetFocalPoint () const
 Get the focal point in widget coordinates.
void hqTransformSetEnabled (bool enabled)
 Enable or disable the high-quality transform.
QTransform const & imageToVirtual () const
QTransform imageToWidget () const
InteractionStateinteractionState ()
InteractionState const & interactionState () const
void moveTowardsIdealPosition (double pixel_length)
InteractionHandlerrootInteractionHandler ()
void setWidgetFocalPoint (QPointF const &widget_fp)
 Set the focal point in widget coordinates.
void setWidgetFocalPointWithoutMoving (QPointF new_widget_fp)
 Sets the widget focal point and recalculates the pixmap focal focal point so that the image is not moved on screen.
void setZoomLevel (double zoom)
 Sets the zoom level.
void update ()
void updateTransform (ImagePresentation const &presentation)
 Updates image-to-virtual and recalculates virtual-to-widget transformations.
void updateTransformAndFixFocalPoint (ImagePresentation const &presentation, FocalPointMode mode)
 Same as updateTransform(), but adjusts the focal point to improve screen space usage.
void updateTransformPreservingScale (ImagePresentation const &presentation)
 Same as updateTransform(), but preserves the visual image scale.
QRectF const & virtualDisplayRect () const
QTransform const & virtualToImage () const
QTransform const & virtualToWidget () const
QTransform widgetToImage () const
QTransform const & widgetToVirtual () const
double zoomLevel () const
 Returns the current zoom level.

Static Public Member Functions

static BackgroundExecutorbackgroundExecutor ()
static QImage createDownscaledImage (QImage const &image)
 A stand-alone function to create a downscaled image to be passed to the constructor.

Protected Member Functions

virtual void contextMenuEvent (QContextMenuEvent *event)
void contextMenuEvent (QContextMenuEvent *event, InteractionState &interaction)
virtual void enterEvent (QEvent *event)
virtual void keyPressEvent (QKeyEvent *event)
void keyPressEvent (QKeyEvent *event, InteractionState &interaction)
virtual void keyReleaseEvent (QKeyEvent *event)
void keyReleaseEvent (QKeyEvent *event, InteractionState &interaction)
void makeFirstFollower (InteractionHandler &handler)
void makeFirstPreceeder (InteractionHandler &handler)
void makeLastFollower (InteractionHandler &handler)
void makeLastPreceeder (InteractionHandler &handler)
void makePeerFollower (InteractionHandler &handler)
void makePeerPreceeder (InteractionHandler &handler)
QRectF maxViewportRect () const
void mouseMoveEvent (QMouseEvent *event, InteractionState &interaction)
virtual void mouseMoveEvent (QMouseEvent *event)
void mousePressEvent (QMouseEvent *event, InteractionState &interaction)
virtual void mousePressEvent (QMouseEvent *event)
void mouseReleaseEvent (QMouseEvent *event, InteractionState &interaction)
virtual void mouseReleaseEvent (QMouseEvent *event)
virtual void onContextMenuEvent (QContextMenuEvent *event, InteractionState &interaction)
virtual void onKeyPressEvent (QKeyEvent *event, InteractionState &interaction)
virtual void onKeyReleaseEvent (QKeyEvent *event, InteractionState &interaction)
virtual void onMouseMoveEvent (QMouseEvent *event, InteractionState &interaction)
virtual void onMousePressEvent (QMouseEvent *event, InteractionState &interaction)
virtual void onMouseReleaseEvent (QMouseEvent *event, InteractionState &interaction)
virtual void onPaint (QPainter &painter, InteractionState const &interaction)
virtual void onProximityUpdate (QPointF const &screen_mouse_pos, InteractionState &interaction)
virtual void onWheelEvent (QWheelEvent *event, InteractionState &interaction)
void paint (QPainter &painter, InteractionState const &interaction)
virtual void paintEvent (QPaintEvent *event)
void proximityUpdate (QPointF const &screen_mouse_pos, InteractionState &interaction)
virtual void resizeEvent (QResizeEvent *event)
void wheelEvent (QWheelEvent *event, InteractionState &interaction)
virtual void wheelEvent (QWheelEvent *event)

Static Protected Member Functions

static bool defaultInteractionPermitter (InteractionState const &interaction)

Private Member Functions

void curveModified (int curve_idx)
void dragFinished ()
void paintXSpline (QPainter &painter, InteractionState const &interaction, InteractiveXSpline const &ispline)
QPointF sourceToWidget (QPointF const &pt) const
QPolygonF virtMarginArea (int margin_idx) const
QPointF widgetToSource (QPointF const &pt) const

Static Private Member Functions

static void fitSpline (XSpline &spline, std::vector< QPointF > const &polyline)
static void initNewSpline (XSpline &spline, QPointF const &p1, QPointF const &p2)

Private Attributes

InteractiveXSpline m_bottomSpline
DepthPerception m_depthPerception
DewarpingMode m_dewarpingMode
dewarping::DistortionModel m_distortionModel
DragHandler m_dragHandler
PageId m_pageId
InteractiveXSpline m_topSpline
QPolygonF m_virtDisplayArea
ZoomHandler m_zoomHandler

Detailed Description

Definition at line 42 of file DewarpingView.h.

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index