labplot  2.8.2
About: LabPlot is an application for plotting and analysis of 2D and 3D functions and data. It is a complete rewrite of LabPlot1 and lacks in the first release a lot of features available in the predecessor. On the other hand, the GUI and the usability is more superior.
  Fossies Dox: labplot-2.8.2.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

ImagePrivate Class Reference

#include <ImagePrivate.h>

Inheritance diagram for ImagePrivate:
[legend]
Collaboration diagram for ImagePrivate:
[legend]

Public Member Functions

 ImagePrivate (Image *)
 
QString name () const
 
void retransform ()
 
bool swapVisible (bool on)
 
virtual void recalcShapeAndBoundingRect ()
 
void updateImage ()
 
void scaleImage ()
 
void updatePosition ()
 
QPointF positionFromItemPosition (QPointF)
 
void updateBorder ()
 
QRectF boundingRect () const override
 
QPainterPath shape () const override
 
void paint (QPainter *, const QStyleOptionGraphicsItem *, QWidget *widget=nullptr) override
 
QVariant itemChange (GraphicsItemChange change, const QVariant &value) override
 

Public Attributes

QImage image
 
QString fileName
 
qreal opacity {1.0}
 
int width = (int)Worksheet::convertToSceneUnits(2.0, Worksheet::Unit::Centimeter)
 
int height = (int)Worksheet::convertToSceneUnits(3.0, Worksheet::Unit::Centimeter)
 
bool keepRatio {true}
 
qreal rotationAngle {0.0}
 
TextLabel::PositionWrapper position
 
TextLabel::HorizontalAlignment horizontalAlignment {TextLabel::HorizontalAlignment::Center}
 
TextLabel::VerticalAlignment verticalAlignment {TextLabel::VerticalAlignment::Center}
 
QPen borderPen {Qt::black, Worksheet::convertToSceneUnits(1.0, Worksheet::Unit::Point), Qt::SolidLine}
 
qreal borderOpacity {1.0}
 
bool suppressItemChangeEvent {false}
 
bool suppressRetransform {false}
 
bool m_printing {false}
 
bool m_hovered {false}
 
QRectF boundingRectangle
 
QRectF transformedBoundingRectangle
 
QPainterPath borderShapePath
 
QPainterPath imageShape
 
Image *const q
 

Private Member Functions

void contextMenuEvent (QGraphicsSceneContextMenuEvent *) override
 
void mouseReleaseEvent (QGraphicsSceneMouseEvent *) override
 
void hoverEnterEvent (QGraphicsSceneHoverEvent *) override
 
void hoverLeaveEvent (QGraphicsSceneHoverEvent *) override
 

Detailed Description

Definition at line 38 of file ImagePrivate.h.

Constructor & Destructor Documentation

◆ ImagePrivate()

ImagePrivate::ImagePrivate ( Image owner)
explicit

Definition at line 283 of file Image.cpp.

Member Function Documentation

◆ boundingRect()

QRectF ImagePrivate::boundingRect ( ) const
override

Returns the outer bounds of the item as a rectangle.

Definition at line 444 of file Image.cpp.

References transformedBoundingRectangle.

◆ contextMenuEvent()

void ImagePrivate::contextMenuEvent ( QGraphicsSceneContextMenuEvent *  event)
overrideprivate

Definition at line 585 of file Image.cpp.

References Image::createContextMenu(), and q.

◆ hoverEnterEvent()

void ImagePrivate::hoverEnterEvent ( QGraphicsSceneHoverEvent *  )
overrideprivate

Definition at line 589 of file Image.cpp.

References WorksheetElement::hovered(), m_hovered, and q.

◆ hoverLeaveEvent()

void ImagePrivate::hoverLeaveEvent ( QGraphicsSceneHoverEvent *  )
overrideprivate

Definition at line 597 of file Image.cpp.

References m_hovered, q, and WorksheetElement::unhovered().

◆ itemChange()

◆ mouseReleaseEvent()

◆ name()

QString ImagePrivate::name ( ) const

Definition at line 290 of file Image.cpp.

References AbstractAspect::name(), and q.

◆ paint()

void ImagePrivate::paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget = nullptr 
)
override

◆ positionFromItemPosition()

QPointF ImagePrivate::positionFromItemPosition ( QPointF  itemPos)

◆ recalcShapeAndBoundingRect()

void ImagePrivate::recalcShapeAndBoundingRect ( )
virtual

recalculates the outer bounds and the shape of the label.

Definition at line 458 of file Image.cpp.

References borderPen, borderShapePath, boundingRectangle, Image::changed(), imageShape, q, rotationAngle, WorksheetElement::shapeFromPath(), and transformedBoundingRectangle.

Referenced by updateBorder().

◆ retransform()

◆ scaleImage()

void ImagePrivate::scaleImage ( )

◆ shape()

QPainterPath ImagePrivate::shape ( ) const
override

Returns the shape of this item as a QPainterPath in local coordinates.

Definition at line 451 of file Image.cpp.

References imageShape.

◆ swapVisible()

bool ImagePrivate::swapVisible ( bool  on)

Definition at line 433 of file Image.cpp.

References Image::changed(), q, and Image::visibleChanged().

◆ updateBorder()

void ImagePrivate::updateBorder ( )

Definition at line 427 of file Image.cpp.

References borderShapePath, boundingRectangle, and recalcShapeAndBoundingRect().

Referenced by retransform().

◆ updateImage()

void ImagePrivate::updateImage ( )

◆ updatePosition()

void ImagePrivate::updatePosition ( )

Member Data Documentation

◆ borderOpacity

qreal ImagePrivate::borderOpacity {1.0}

Definition at line 63 of file ImagePrivate.h.

Referenced by paint().

◆ borderPen

QPen ImagePrivate::borderPen {Qt::black, Worksheet::convertToSceneUnits(1.0, Worksheet::Unit::Point), Qt::SolidLine}

Definition at line 62 of file ImagePrivate.h.

Referenced by paint(), and recalcShapeAndBoundingRect().

◆ borderShapePath

QPainterPath ImagePrivate::borderShapePath

Definition at line 82 of file ImagePrivate.h.

Referenced by paint(), recalcShapeAndBoundingRect(), and updateBorder().

◆ boundingRectangle

QRectF ImagePrivate::boundingRectangle

Definition at line 80 of file ImagePrivate.h.

Referenced by paint(), recalcShapeAndBoundingRect(), retransform(), and updateBorder().

◆ fileName

QString ImagePrivate::fileName

Definition at line 43 of file ImagePrivate.h.

Referenced by updateImage().

◆ height

int ImagePrivate::height = (int)Worksheet::convertToSceneUnits(3.0, Worksheet::Unit::Centimeter)

Definition at line 46 of file ImagePrivate.h.

Referenced by scaleImage(), and updateImage().

◆ horizontalAlignment

Definition at line 58 of file ImagePrivate.h.

Referenced by positionFromItemPosition(), and retransform().

◆ image

QImage ImagePrivate::image

Definition at line 42 of file ImagePrivate.h.

Referenced by paint(), positionFromItemPosition(), retransform(), scaleImage(), and updateImage().

◆ imageShape

QPainterPath ImagePrivate::imageShape

Definition at line 83 of file ImagePrivate.h.

Referenced by paint(), recalcShapeAndBoundingRect(), and shape().

◆ keepRatio

bool ImagePrivate::keepRatio {true}

Definition at line 47 of file ImagePrivate.h.

Referenced by scaleImage().

◆ m_hovered

bool ImagePrivate::m_hovered {false}

Definition at line 78 of file ImagePrivate.h.

Referenced by hoverEnterEvent(), hoverLeaveEvent(), and paint().

◆ m_printing

bool ImagePrivate::m_printing {false}

Definition at line 77 of file ImagePrivate.h.

Referenced by paint().

◆ opacity

qreal ImagePrivate::opacity {1.0}

Definition at line 44 of file ImagePrivate.h.

Referenced by paint().

◆ position

◆ q

◆ rotationAngle

qreal ImagePrivate::rotationAngle {0.0}

Definition at line 48 of file ImagePrivate.h.

Referenced by paint(), and recalcShapeAndBoundingRect().

◆ suppressItemChangeEvent

bool ImagePrivate::suppressItemChangeEvent {false}

Definition at line 75 of file ImagePrivate.h.

Referenced by itemChange(), and retransform().

◆ suppressRetransform

bool ImagePrivate::suppressRetransform {false}

Definition at line 76 of file ImagePrivate.h.

Referenced by mouseReleaseEvent(), and retransform().

◆ transformedBoundingRectangle

QRectF ImagePrivate::transformedBoundingRectangle

Definition at line 81 of file ImagePrivate.h.

Referenced by boundingRect(), and recalcShapeAndBoundingRect().

◆ verticalAlignment

Definition at line 59 of file ImagePrivate.h.

Referenced by positionFromItemPosition(), and retransform().

◆ width

int ImagePrivate::width = (int)Worksheet::convertToSceneUnits(2.0, Worksheet::Unit::Centimeter)

Definition at line 45 of file ImagePrivate.h.

Referenced by scaleImage(), and updateImage().


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