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)  

CustomPointPrivate Class Reference

#include <CustomPointPrivate.h>

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

Public Member Functions

 CustomPointPrivate (CustomPoint *, const CartesianPlot *)
 
QString name () const
 
void retransform ()
 
bool swapVisible (bool)
 
virtual void recalcShapeAndBoundingRect ()
 
void updatePosition ()
 
void updateData ()
 
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

const CartesianPlotplot
 
bool suppressItemChangeEvent {false}
 
bool suppressRetransform {false}
 
bool m_printing {false}
 
bool m_hovered {false}
 
bool m_visible {true}
 
QRectF boundingRectangle
 
QRectF transformedBoundingRectangle
 
QPainterPath pointShape
 
QPointF position
 
QPointF positionScene
 
Symbol::Style symbolStyle
 
QBrush symbolBrush
 
QPen symbolPen
 
qreal symbolOpacity
 
qreal symbolRotationAngle
 
qreal symbolSize
 
CustomPoint *const q
 

Private Member Functions

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

Detailed Description

File : CustomPointPrivate.h Project : LabPlot

Description : Custom user-defined point on the plot

Copyright : (C) 2015 Ankit Wagadre (wagad.nosp@m.re.a.nosp@m.nkit@.nosp@m.gmai.nosp@m.l.com) Copyright : (C) 2015 Alexander Semke (alexa.nosp@m.nder.nosp@m..semk.nosp@m.e@we.nosp@m.b.de)

  • This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. *
  • This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. *
  • You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA *

Definition at line 34 of file CustomPointPrivate.h.

Constructor & Destructor Documentation

◆ CustomPointPrivate()

CustomPointPrivate::CustomPointPrivate ( CustomPoint owner,
const CartesianPlot p 
)
explicit

Definition at line 217 of file CustomPoint.cpp.

Member Function Documentation

◆ boundingRect()

QRectF CustomPointPrivate::boundingRect ( ) const
override

Returns the outer bounds of the item as a rectangle.

Definition at line 269 of file CustomPoint.cpp.

References transformedBoundingRectangle.

◆ contextMenuEvent()

void CustomPointPrivate::contextMenuEvent ( QGraphicsSceneContextMenuEvent *  event)
overrideprivate

Definition at line 355 of file CustomPoint.cpp.

References CustomPoint::createContextMenu(), and q.

◆ hoverEnterEvent()

void CustomPointPrivate::hoverEnterEvent ( QGraphicsSceneHoverEvent *  )
overrideprivate

Definition at line 359 of file CustomPoint.cpp.

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

◆ hoverLeaveEvent()

void CustomPointPrivate::hoverLeaveEvent ( QGraphicsSceneHoverEvent *  )
overrideprivate

Definition at line 367 of file CustomPoint.cpp.

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

◆ itemChange()

QVariant CustomPointPrivate::itemChange ( GraphicsItemChange  change,
const QVariant &  value 
)
override

◆ mouseReleaseEvent()

void CustomPointPrivate::mouseReleaseEvent ( QGraphicsSceneMouseEvent *  event)
overrideprivate

Definition at line 345 of file CustomPoint.cpp.

References AbstractPlot::coordinateSystem(), plot, q, and suppressRetransform.

◆ name()

QString CustomPointPrivate::name ( ) const

Definition at line 224 of file CustomPoint.cpp.

References AbstractAspect::name(), and q.

◆ paint()

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

◆ recalcShapeAndBoundingRect()

void CustomPointPrivate::recalcShapeAndBoundingRect ( )
virtual

recalculates the outer bounds and the shape of the item.

Definition at line 283 of file CustomPoint.cpp.

References m_visible, Symbol::NoSymbols, Symbol::pathFromStyle(), pointShape, WorksheetElement::shapeFromPath(), symbolPen, symbolRotationAngle, symbolSize, symbolStyle, and transformedBoundingRectangle.

Referenced by retransform().

◆ retransform()

void CustomPointPrivate::retransform ( )

calculates the position and the bounding box of the item/point. Called on geometry or properties changes.

Definition at line 231 of file CustomPoint.cpp.

References AbstractPlot::coordinateSystem(), m_visible, plot, position, positionScene, recalcShapeAndBoundingRect(), suppressItemChangeEvent, and suppressRetransform.

◆ shape()

QPainterPath CustomPointPrivate::shape ( ) const
override

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

Definition at line 276 of file CustomPoint.cpp.

References pointShape.

◆ swapVisible()

bool CustomPointPrivate::swapVisible ( bool  on)

◆ updateData()

void CustomPointPrivate::updateData ( )

◆ updatePosition()

void CustomPointPrivate::updatePosition ( )

Member Data Documentation

◆ boundingRectangle

QRectF CustomPointPrivate::boundingRectangle

Definition at line 53 of file CustomPointPrivate.h.

◆ m_hovered

bool CustomPointPrivate::m_hovered {false}

Definition at line 50 of file CustomPointPrivate.h.

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

◆ m_printing

bool CustomPointPrivate::m_printing {false}

Definition at line 49 of file CustomPointPrivate.h.

Referenced by paint().

◆ m_visible

bool CustomPointPrivate::m_visible {true}

Definition at line 51 of file CustomPointPrivate.h.

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

◆ plot

const CartesianPlot* CustomPointPrivate::plot

Definition at line 38 of file CustomPointPrivate.h.

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

◆ pointShape

QPainterPath CustomPointPrivate::pointShape

Definition at line 55 of file CustomPointPrivate.h.

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

◆ position

QPointF CustomPointPrivate::position

Definition at line 57 of file CustomPointPrivate.h.

Referenced by retransform().

◆ positionScene

QPointF CustomPointPrivate::positionScene

Definition at line 58 of file CustomPointPrivate.h.

Referenced by retransform().

◆ q

CustomPoint* const CustomPointPrivate::q

◆ suppressItemChangeEvent

bool CustomPointPrivate::suppressItemChangeEvent {false}

Definition at line 47 of file CustomPointPrivate.h.

Referenced by itemChange(), and retransform().

◆ suppressRetransform

bool CustomPointPrivate::suppressRetransform {false}

Definition at line 48 of file CustomPointPrivate.h.

Referenced by mouseReleaseEvent(), and retransform().

◆ symbolBrush

QBrush CustomPointPrivate::symbolBrush

Definition at line 62 of file CustomPointPrivate.h.

Referenced by paint().

◆ symbolOpacity

qreal CustomPointPrivate::symbolOpacity

Definition at line 64 of file CustomPointPrivate.h.

Referenced by paint().

◆ symbolPen

QPen CustomPointPrivate::symbolPen

Definition at line 63 of file CustomPointPrivate.h.

Referenced by paint(), and recalcShapeAndBoundingRect().

◆ symbolRotationAngle

qreal CustomPointPrivate::symbolRotationAngle

Definition at line 65 of file CustomPointPrivate.h.

Referenced by recalcShapeAndBoundingRect().

◆ symbolSize

qreal CustomPointPrivate::symbolSize

Definition at line 66 of file CustomPointPrivate.h.

Referenced by recalcShapeAndBoundingRect().

◆ symbolStyle

Symbol::Style CustomPointPrivate::symbolStyle

Definition at line 61 of file CustomPointPrivate.h.

Referenced by paint(), and recalcShapeAndBoundingRect().

◆ transformedBoundingRectangle

QRectF CustomPointPrivate::transformedBoundingRectangle

Definition at line 54 of file CustomPointPrivate.h.

Referenced by boundingRect(), and recalcShapeAndBoundingRect().


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