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)  

TextLabelPrivate Class Reference

#include <TextLabelPrivate.h>

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

Public Member Functions

 TextLabelPrivate (TextLabel *)
 
QString name () const
 
void retransform ()
 
bool swapVisible (bool on)
 
virtual void recalcShapeAndBoundingRect ()
 
void updatePosition ()
 
QPointF positionFromItemPosition (QPointF)
 
void updateText ()
 
void updateTeXImage ()
 
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

qreal rotationAngle {0.0}
 
double scaleFactor {Worksheet::convertToSceneUnits(1, Worksheet::Unit::Point)}
 
int teXImageResolution {QApplication::desktop()->physicalDpiX()}
 
double teXImageScaleFactor {Worksheet::convertToSceneUnits(2.54/QApplication::desktop()->physicalDpiX(), Worksheet::Unit::Centimeter)}
 
TextLabel::TextWrapper textWrapper
 
QFont teXFont {"Computer Modern", 42}
 
QColor fontColor {Qt::black}
 
QColor backgroundColor {Qt::white}
 
QImage teXImage
 
QFutureWatcher< QImage > teXImageFutureWatcher
 
bool teXRenderSuccessful {false}
 
WorksheetElement::PositionWrapper position
 
bool positionInvalid {false}
 
WorksheetElement::HorizontalAlignment horizontalAlignment {WorksheetElement::HorizontalAlignment::Center}
 
WorksheetElement::VerticalAlignment verticalAlignment {WorksheetElement::VerticalAlignment::Center}
 
TextLabel::BorderShape borderShape {TextLabel::BorderShape::NoBorder}
 
QPen borderPen {Qt::black, Worksheet::convertToSceneUnits(1.0, Worksheet::Unit::Point), Qt::SolidLine}
 
qreal borderOpacity {1.0}
 
QStaticText staticText
 
bool suppressItemChangeEvent {false}
 
bool suppressRetransform {false}
 
bool m_printing {false}
 
bool m_hovered {false}
 
QRectF boundingRectangle
 
QRectF transformedBoundingRectangle
 
QPainterPath borderShapePath
 
QPainterPath labelShape
 
TextLabel *const q
 

Private Member Functions

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

Detailed Description

Definition at line 40 of file TextLabelPrivate.h.

Constructor & Destructor Documentation

◆ TextLabelPrivate()

TextLabelPrivate::TextLabelPrivate ( TextLabel owner)
explicit

Definition at line 369 of file TextLabel.cpp.

Member Function Documentation

◆ boundingRect()

QRectF TextLabelPrivate::boundingRect ( ) const
override

Returns the outer bounds of the item as a rectangle.

Definition at line 710 of file TextLabel.cpp.

References transformedBoundingRectangle.

Referenced by paint().

◆ contextMenuEvent()

void TextLabelPrivate::contextMenuEvent ( QGraphicsSceneContextMenuEvent *  event)
overrideprivate

Definition at line 902 of file TextLabel.cpp.

References TextLabel::createContextMenu(), and q.

◆ hoverEnterEvent()

void TextLabelPrivate::hoverEnterEvent ( QGraphicsSceneHoverEvent *  )
overrideprivate

Definition at line 906 of file TextLabel.cpp.

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

◆ hoverLeaveEvent()

void TextLabelPrivate::hoverLeaveEvent ( QGraphicsSceneHoverEvent *  )
overrideprivate

Definition at line 914 of file TextLabel.cpp.

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

◆ itemChange()

◆ keyPressEvent()

◆ mouseReleaseEvent()

◆ name()

QString TextLabelPrivate::name ( ) const

Definition at line 377 of file TextLabel.cpp.

References AbstractAspect::name(), and q.

◆ paint()

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

◆ positionFromItemPosition()

QPointF TextLabelPrivate::positionFromItemPosition ( QPointF  itemPos)

◆ recalcShapeAndBoundingRect()

void TextLabelPrivate::recalcShapeAndBoundingRect ( )
virtual

recalculates the outer bounds and the shape of the label.

Definition at line 724 of file TextLabel.cpp.

References borderPen, borderShape, borderShapePath, boundingRectangle, labelShape, TextLabel::NoBorder, rotationAngle, WorksheetElement::shapeFromPath(), and transformedBoundingRectangle.

Referenced by updateBorder().

◆ retransform()

◆ shape()

QPainterPath TextLabelPrivate::shape ( ) const
override

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

Definition at line 717 of file TextLabel.cpp.

References labelShape.

◆ swapVisible()

bool TextLabelPrivate::swapVisible ( bool  on)

◆ updateBorder()

◆ updatePosition()

void TextLabelPrivate::updatePosition ( )

◆ updateTeXImage()

void TextLabelPrivate::updateTeXImage ( )

◆ updateText()

Member Data Documentation

◆ backgroundColor

QColor TextLabelPrivate::backgroundColor {Qt::white}

Definition at line 57 of file TextLabelPrivate.h.

Referenced by updateText().

◆ borderOpacity

qreal TextLabelPrivate::borderOpacity {1.0}

Definition at line 74 of file TextLabelPrivate.h.

Referenced by paint().

◆ borderPen

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

Definition at line 73 of file TextLabelPrivate.h.

Referenced by paint(), and recalcShapeAndBoundingRect().

◆ borderShape

Definition at line 72 of file TextLabelPrivate.h.

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

◆ borderShapePath

QPainterPath TextLabelPrivate::borderShapePath

Definition at line 94 of file TextLabelPrivate.h.

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

◆ boundingRectangle

QRectF TextLabelPrivate::boundingRectangle

Definition at line 92 of file TextLabelPrivate.h.

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

◆ fontColor

QColor TextLabelPrivate::fontColor {Qt::black}

Definition at line 56 of file TextLabelPrivate.h.

Referenced by updateText().

◆ horizontalAlignment

Definition at line 69 of file TextLabelPrivate.h.

Referenced by positionFromItemPosition(), and retransform().

◆ labelShape

QPainterPath TextLabelPrivate::labelShape

Definition at line 95 of file TextLabelPrivate.h.

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

◆ m_hovered

bool TextLabelPrivate::m_hovered {false}

Definition at line 90 of file TextLabelPrivate.h.

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

◆ m_printing

bool TextLabelPrivate::m_printing {false}

Definition at line 89 of file TextLabelPrivate.h.

Referenced by paint().

◆ position

◆ positionInvalid

bool TextLabelPrivate::positionInvalid {false}

Definition at line 67 of file TextLabelPrivate.h.

Referenced by paint().

◆ q

◆ rotationAngle

qreal TextLabelPrivate::rotationAngle {0.0}

Definition at line 44 of file TextLabelPrivate.h.

Referenced by paint(), and recalcShapeAndBoundingRect().

◆ scaleFactor

double TextLabelPrivate::scaleFactor {Worksheet::convertToSceneUnits(1, Worksheet::Unit::Point)}

Definition at line 49 of file TextLabelPrivate.h.

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

◆ staticText

QStaticText TextLabelPrivate::staticText

Definition at line 85 of file TextLabelPrivate.h.

Referenced by paint(), positionFromItemPosition(), retransform(), and updateText().

◆ suppressItemChangeEvent

bool TextLabelPrivate::suppressItemChangeEvent {false}

Definition at line 87 of file TextLabelPrivate.h.

Referenced by itemChange(), and retransform().

◆ suppressRetransform

bool TextLabelPrivate::suppressRetransform {false}

Definition at line 88 of file TextLabelPrivate.h.

Referenced by mouseReleaseEvent(), retransform(), and updateText().

◆ teXFont

QFont TextLabelPrivate::teXFont {"Computer Modern", 42}

Definition at line 55 of file TextLabelPrivate.h.

Referenced by updateText().

◆ teXImage

QImage TextLabelPrivate::teXImage

Definition at line 58 of file TextLabelPrivate.h.

Referenced by paint(), positionFromItemPosition(), retransform(), and updateTeXImage().

◆ teXImageFutureWatcher

QFutureWatcher<QImage> TextLabelPrivate::teXImageFutureWatcher

Definition at line 59 of file TextLabelPrivate.h.

Referenced by updateTeXImage(), and updateText().

◆ teXImageResolution

int TextLabelPrivate::teXImageResolution {QApplication::desktop()->physicalDpiX()}

Definition at line 50 of file TextLabelPrivate.h.

Referenced by updateText().

◆ teXImageScaleFactor

double TextLabelPrivate::teXImageScaleFactor {Worksheet::convertToSceneUnits(2.54/QApplication::desktop()->physicalDpiX(), Worksheet::Unit::Centimeter)}

Definition at line 52 of file TextLabelPrivate.h.

Referenced by retransform().

◆ teXRenderSuccessful

bool TextLabelPrivate::teXRenderSuccessful {false}

Definition at line 60 of file TextLabelPrivate.h.

Referenced by updateTeXImage(), and updateText().

◆ textWrapper

TextLabel::TextWrapper TextLabelPrivate::textWrapper

Definition at line 54 of file TextLabelPrivate.h.

Referenced by paint(), positionFromItemPosition(), retransform(), and updateText().

◆ transformedBoundingRectangle

QRectF TextLabelPrivate::transformedBoundingRectangle

Definition at line 93 of file TextLabelPrivate.h.

Referenced by boundingRect(), and recalcShapeAndBoundingRect().

◆ verticalAlignment

Definition at line 70 of file TextLabelPrivate.h.

Referenced by positionFromItemPosition(), and retransform().


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