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)  

AbstractCoordinateSystem Class Referenceabstract

Base class of all worksheet coordinate systems. More...

#include <AbstractCoordinateSystem.h>

Inheritance diagram for AbstractCoordinateSystem:
[legend]

Classes

class  LineClipResult
 

Public Types

enum class  MappingFlag {
  DefaultMapping = 0x00 , SuppressPageClipping = 0x01 , MarkGaps = 0x02 , Limit = 0x04 ,
  SuppressPageClippingY = 0x08
}
 

Public Member Functions

 AbstractCoordinateSystem (AbstractPlot *)
 
virtual ~AbstractCoordinateSystem ()
 
virtual QVector< QPointF > mapLogicalToScene (const QVector< QPointF > &, MappingFlags flags=MappingFlag::DefaultMapping) const =0
 
virtual QPointF mapLogicalToScene (QPointF, MappingFlags flags=MappingFlag::DefaultMapping) const =0
 
virtual QVector< QLineF > mapLogicalToScene (const QVector< QLineF > &, MappingFlags flags=MappingFlag::DefaultMapping) const =0
 
virtual QVector< QPointF > mapSceneToLogical (const QVector< QPointF > &, MappingFlags flags=MappingFlag::DefaultMapping) const =0
 
virtual QPointF mapSceneToLogical (QPointF, MappingFlags flags=MappingFlag::DefaultMapping) const =0
 

Static Public Member Functions

static bool clipLineToRect (QLineF *line, const QRectF &rect, LineClipResult *clipResult=nullptr)
 Line clipping using the Cohen-Sutherland algorithm. More...
 

Detailed Description

Base class of all worksheet coordinate systems.

File : AbstractCoordinateSystem.cpp Project : LabPlot

Description : Base class of all worksheet coordinate systems.

Copyright : (C) 2009 Tilman Benkert (thzs@.nosp@m.gmx..nosp@m.net) Copyright : (C) 2012-2014 Alexander Semke (alexa.nosp@m.nder.nosp@m..semk.nosp@m.e@we.nosp@m.b.de) Copyright : (C) 2020 Stefan Gerlach (stefa.nosp@m.n.ge.nosp@m.rlach.nosp@m.@uni.nosp@m..kn)

  • 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 40 of file AbstractCoordinateSystem.h.

Member Enumeration Documentation

◆ MappingFlag

Enumerator
DefaultMapping 
SuppressPageClipping 
MarkGaps 
Limit 
SuppressPageClippingY 

Definition at line 42 of file AbstractCoordinateSystem.h.

Constructor & Destructor Documentation

◆ AbstractCoordinateSystem()

AbstractCoordinateSystem::AbstractCoordinateSystem ( AbstractPlot plot)
explicit

Definition at line 46 of file AbstractCoordinateSystem.cpp.

◆ ~AbstractCoordinateSystem()

AbstractCoordinateSystem::~AbstractCoordinateSystem ( )
virtualdefault

Member Function Documentation

◆ clipLineToRect()

bool AbstractCoordinateSystem::clipLineToRect ( QLineF *  line,
const QRectF &  rect,
LineClipResult clipResult = nullptr 
)
static

Line clipping using the Cohen-Sutherland algorithm.

This is a modified version of clipLine() from Qt 4.5's qpaintengine_x11.cpp.

Parameters
lineThe line to clip.
rectThe rect to clip to.
clipResultPointer to an object describing which parts where clipped (may be NULL).
Returns
false if line is completely outside, otherwise true

Definition at line 96 of file AbstractCoordinateSystem.cpp.

References Origin::Bottom, Origin::Left, nsl_math_round_places(), AbstractCoordinateSystem::LineClipResult::reset(), Origin::Right, Origin::Top, AbstractCoordinateSystem::LineClipResult::xClippedLeft, AbstractCoordinateSystem::LineClipResult::xClippedRight, AbstractCoordinateSystem::LineClipResult::yClippedBottom, and AbstractCoordinateSystem::LineClipResult::yClippedTop.

Referenced by CartesianCoordinateSystem::mapLogicalToScene().

◆ mapLogicalToScene() [1/3]

virtual QVector<QLineF> AbstractCoordinateSystem::mapLogicalToScene ( const QVector< QLineF > &  ,
MappingFlags  flags = MappingFlag::DefaultMapping 
) const
pure virtual

Implemented in CartesianCoordinateSystem.

◆ mapLogicalToScene() [2/3]

virtual QVector<QPointF> AbstractCoordinateSystem::mapLogicalToScene ( const QVector< QPointF > &  ,
MappingFlags  flags = MappingFlag::DefaultMapping 
) const
pure virtual

◆ mapLogicalToScene() [3/3]

virtual QPointF AbstractCoordinateSystem::mapLogicalToScene ( QPointF  ,
MappingFlags  flags = MappingFlag::DefaultMapping 
) const
pure virtual

Implemented in CartesianCoordinateSystem.

◆ mapSceneToLogical() [1/2]

virtual QVector<QPointF> AbstractCoordinateSystem::mapSceneToLogical ( const QVector< QPointF > &  ,
MappingFlags  flags = MappingFlag::DefaultMapping 
) const
pure virtual

Implemented in CartesianCoordinateSystem.

◆ mapSceneToLogical() [2/2]

virtual QPointF AbstractCoordinateSystem::mapSceneToLogical ( QPointF  ,
MappingFlags  flags = MappingFlag::DefaultMapping 
) const
pure virtual

Implemented in CartesianCoordinateSystem.


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