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

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

page_layout::ImageView Class Reference

Inheritance diagram for page_layout::ImageView:
Inheritance graph
[legend]
Collaboration diagram for page_layout::ImageView:
Collaboration graph
[legend]

List of all members.

Classes

struct  StateBeforeResizing

Public Types

enum  FocalPointMode { CENTER_IF_FITS, DONT_CENTER }

Public Slots

void aggregateHardSizeChanged ()
void alignmentChanged (Alignment const &alignment)
void leftRightLinkToggled (bool linked)
void marginsSetExternally (Margins const &margins_mm)
void topBottomLinkToggled (bool linked)

Signals

void invalidateAllThumbnails ()
void invalidateThumbnail (PageId const &page_id)
void marginsSetLocally (Margins const &margins_mm)

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.
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
 ImageView (IntrusivePtr< Settings > const &settings, PageId const &page_id, QImage const &image, QImage const &downscaled_image, ImageTransformation const &xform, QRectF const &adapted_content_rect, OptionsWidget const &opt_widget)
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)
virtual void enterEvent (QEvent *event)
virtual void keyPressEvent (QKeyEvent *event)
virtual void keyReleaseEvent (QKeyEvent *event)
QRectF maxViewportRect () const
virtual void mouseMoveEvent (QMouseEvent *event)
virtual void mousePressEvent (QMouseEvent *event)
virtual void mouseReleaseEvent (QMouseEvent *event)
virtual void paintEvent (QPaintEvent *event)
virtual void resizeEvent (QResizeEvent *event)
virtual void wheelEvent (QWheelEvent *event)

Private Types

enum  AggregateSizeChanged { AGGREGATE_SIZE_UNCHANGED, AGGREGATE_SIZE_CHANGED }
enum  Edge { LEFT = 1, RIGHT = 2, TOP = 4, BOTTOM = 8 }
enum  FitMode { FIT, DONT_FIT }

Private Member Functions

Margins calcHardMarginsMM () const
 Calculates margins in millimeters between m_innerRect and m_middleRect.
AggregateSizeChanged commitHardMargins (Margins const &margins_mm)
void contextMenuEvent (QContextMenuEvent *event, InteractionState &interaction)
Proximity cornerProximity (int edge_mask, QRectF const *box, QPointF const &mouse_pos) const
void dragFinished ()
void dragInitiated (QPointF const &mouse_pos)
Proximity edgeProximity (int edge_mask, QRectF const *box, QPointF const &mouse_pos) const
void forceNonNegativeHardMargins (QRectF &middle_rect) const
void innerRectDragContinuation (int edge_mask, QPointF const &mouse_pos)
void invalidateThumbnails (AggregateSizeChanged agg_size_changed)
void keyPressEvent (QKeyEvent *event, InteractionState &interaction)
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)
void middleRectDragContinuation (int edge_mask, QPointF const &mouse_pos)
void mouseMoveEvent (QMouseEvent *event, InteractionState &interaction)
void mousePressEvent (QMouseEvent *event, InteractionState &interaction)
void mouseReleaseEvent (QMouseEvent *event, InteractionState &interaction)
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)
QSizeF origRectToSizeMM (QRectF const &rect) const
void paint (QPainter &painter, InteractionState const &interaction)
void proximityUpdate (QPointF const &screen_mouse_pos, InteractionState &interaction)
void recalcBoxesAndFit (Margins const &margins_mm)
void recalcOuterRect ()
 Recalculates m_outerRect based on m_middleRect, m_aggregateHardSizeMM and m_alignment.
void updatePresentationTransform (FitMode fit_mode)
void wheelEvent (QWheelEvent *event, InteractionState &interaction)

Static Private Member Functions

static bool defaultInteractionPermitter (InteractionState const &interaction)

Private Attributes

QSizeF m_aggregateHardSizeMM
 Aggregate (max width + max height) hard page size.
Alignment m_alignment
StateBeforeResizing m_beforeResizing
QSizeF m_committedAggregateHardSizeMM
 Aggregate (max width + max height) hard page size.
DragHandler m_dragHandler
ObjectDragHandler m_innerCornerHandlers [4]
DraggableObject m_innerCorners [4]
ObjectDragHandler m_innerEdgeHandlers [4]
DraggableObject m_innerEdges [4]
QRectF const m_innerRect
bool m_leftRightLinked
ObjectDragHandler m_middleCornerHandlers [4]
DraggableObject m_middleCorners [4]
ObjectDragHandler m_middleEdgeHandlers [4]
DraggableObject m_middleEdges [4]
QRectF m_middleRect
 Content box + hard margins in virtual image coordinates.
QRectF m_outerRect
 Content box + hard + soft margins in virtual image coordinates.
PageId const m_pageId
PhysicalTransformation const m_physXform
IntrusivePtr< Settingsm_ptrSettings
bool m_topBottomLinked
ZoomHandler m_zoomHandler

Detailed Description

Definition at line 47 of file ImageView.h.


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

Generated by  Doxygen 1.6.0   Back to index