• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

Analitza

  • Analitza
  • Plotter2D
Public Member Functions | Protected Member Functions | List of all members
Analitza::Plotter2D Class Referenceabstract
AnalitzaPlot

#include <plotter2d.h>

Inheritance diagram for Analitza::Plotter2D:
Inheritance graph
[legend]

Public Member Functions

 Plotter2D (const QSizeF &size)
 
virtual ~Plotter2D ()
 
AngleMode angleMode () const
 
bool autoGridStyle () const
 
QColor backgroundColor () const
 
QRectF currentViewport () const
 
QColor gridColor () const
 
bool keepAspectRatio () const
 
QRectF lastViewport () const
 
QAbstractItemModel * model () const
 
void moveViewport (const QPoint &delta)
 
ScaleMode scaleMode () const
 
void setAngleMode (AngleMode am)
 
void setAutoGridStyle (bool autogs)
 
void setBackgroundColor (const QColor &color)
 
void setGridColor (const QColor &color)
 
void setGridStyleHint (GridStyle suggestedgs)
 
void setKeepAspectRatio (bool ar)
 
void setModel (QAbstractItemModel *f)
 
void setScaleMode (ScaleMode sm)
 
void setShowAxes (Qt::Orientations o)
 
void setShowGrid (bool show)
 
void setShowMinorGrid (bool mt)
 
void setShowMinorTicks (bool mt)
 
void setShowPolarAngles (bool pt)
 
void setShowPolarAxis (bool pt)
 
void setShowTickLabels (Qt::Orientations o)
 
void setShowTicks (Qt::Orientations o)
 
void setViewport (const QRectF &vp, bool repaint=true)
 
void setXAxisLabel (const QString &label)
 
void setYAxisLabel (const QString &label)
 
bool showGrid () const
 
Qt::Orientations ticksShown () const
 
void updateFunctions (const QModelIndex &parent, int start, int end)
 
void zoomIn (bool repaint=true)
 
void zoomOut (bool repaint=true)
 

Protected Member Functions

QPair< QPointF, QString > calcImage (const QPointF &ndp) const
 
virtual int currentFunction () const =0
 
virtual void drawFunctions (QPaintDevice *qpd)
 
virtual void drawGrid (QPaintDevice *qpd)
 
virtual void forceRepaint ()=0
 
QPointF fromWidget (const QPoint &p) const
 
QRectF lastUserViewport () const
 
virtual void modelChanged ()=0
 
QRectF normalizeUserViewport (const QRectF uvp)
 
void scaleViewport (qreal scale, const QPoint &center, bool repaint=true)
 
void setPaintedSize (const QSize &size)
 
QLineF slope (const QPointF &dp) const
 
QPointF toViewport (const QPoint &mv) const
 
QPointF toWidget (const QPointF &) const
 
QLineF toWidget (const QLineF &) const
 
void updateScale (bool repaint)
 
virtual void viewportChanged ()=0
 

Detailed Description

Render 2D plots.

This class uses QPainter as backend for drawing plots. The default value of showGrid is true. The default grid color is Qt::lightGray. The default background color is Qt::white. The default value of autoGridStyle is true.

Definition at line 55 of file plotter2d.h.

Constructor & Destructor Documentation

Analitza::Plotter2D::Plotter2D ( const QSizeF &  size)
virtual Analitza::Plotter2D::~Plotter2D ( )
virtual

Member Function Documentation

AngleMode Analitza::Plotter2D::angleMode ( ) const
inline

Definition at line 125 of file plotter2d.h.

bool Analitza::Plotter2D::autoGridStyle ( ) const
inline

Returns whether we will change automatically the grid style based on the curent plot.

Definition at line 86 of file plotter2d.h.

QColor Analitza::Plotter2D::backgroundColor ( ) const
inline

Definition at line 80 of file plotter2d.h.

QPair<QPointF, QString> Analitza::Plotter2D::calcImage ( const QPointF &  ndp) const
protected
virtual int Analitza::Plotter2D::currentFunction ( ) const
protectedpure virtual
QRectF Analitza::Plotter2D::currentViewport ( ) const
inline

Definition at line 108 of file plotter2d.h.

virtual void Analitza::Plotter2D::drawFunctions ( QPaintDevice *  qpd)
protectedvirtual
virtual void Analitza::Plotter2D::drawGrid ( QPaintDevice *  qpd)
protectedvirtual
virtual void Analitza::Plotter2D::forceRepaint ( )
protectedpure virtual
QPointF Analitza::Plotter2D::fromWidget ( const QPoint &  p) const
protected
QColor Analitza::Plotter2D::gridColor ( ) const
inline

Definition at line 75 of file plotter2d.h.

bool Analitza::Plotter2D::keepAspectRatio ( ) const
inline

Sets whether it is keeping the aspect ratio (1:1 grid).

Definition at line 95 of file plotter2d.h.

QRectF Analitza::Plotter2D::lastUserViewport ( ) const
inlineprotected

Definition at line 155 of file plotter2d.h.

QRectF Analitza::Plotter2D::lastViewport ( ) const
inline

Definition at line 111 of file plotter2d.h.

QAbstractItemModel* Analitza::Plotter2D::model ( ) const
inline

Definition at line 101 of file plotter2d.h.

virtual void Analitza::Plotter2D::modelChanged ( )
protectedpure virtual
void Analitza::Plotter2D::moveViewport ( const QPoint &  delta)

Moves the viewport delta.

QRectF Analitza::Plotter2D::normalizeUserViewport ( const QRectF  uvp)
protected
ScaleMode Analitza::Plotter2D::scaleMode ( ) const
inline

Definition at line 121 of file plotter2d.h.

void Analitza::Plotter2D::scaleViewport ( qreal  scale,
const QPoint &  center,
bool  repaint = true 
)
protected
void Analitza::Plotter2D::setAngleMode ( AngleMode  am)
inline

Definition at line 124 of file plotter2d.h.

void Analitza::Plotter2D::setAutoGridStyle ( bool  autogs)
inline

If true then we ignore the grid style suggested by setGridStyleHint, if false then we use as grid style the hint.

Definition at line 83 of file plotter2d.h.

void Analitza::Plotter2D::setBackgroundColor ( const QColor &  color)
inline

Definition at line 77 of file plotter2d.h.

void Analitza::Plotter2D::setGridColor ( const QColor &  color)
inline

Definition at line 72 of file plotter2d.h.

void Analitza::Plotter2D::setGridStyleHint ( GridStyle  suggestedgs)

Sets the suggested grid style.

Only works if autoGridStyle is false. Note that we only accept CoordinateSystem::Cartesian or CoordinateSystem::Polar.

void Analitza::Plotter2D::setKeepAspectRatio ( bool  ar)

Sets whether it has to keep the aspect ratio (1:1 grid).

void Analitza::Plotter2D::setModel ( QAbstractItemModel *  f)
void Analitza::Plotter2D::setPaintedSize ( const QSize &  size)
protected
void Analitza::Plotter2D::setScaleMode ( ScaleMode  sm)
inline

Definition at line 120 of file plotter2d.h.

void Analitza::Plotter2D::setShowAxes ( Qt::Orientations  o)
inline

Definition at line 136 of file plotter2d.h.

void Analitza::Plotter2D::setShowGrid ( bool  show)
inline

Sets whether we will draw the grid.

Definition at line 65 of file plotter2d.h.

void Analitza::Plotter2D::setShowMinorGrid ( bool  mt)
inline

Definition at line 67 of file plotter2d.h.

void Analitza::Plotter2D::setShowMinorTicks ( bool  mt)
inline

Definition at line 130 of file plotter2d.h.

void Analitza::Plotter2D::setShowPolarAngles ( bool  pt)
inline

Definition at line 134 of file plotter2d.h.

void Analitza::Plotter2D::setShowPolarAxis ( bool  pt)
inline

Definition at line 133 of file plotter2d.h.

void Analitza::Plotter2D::setShowTickLabels ( Qt::Orientations  o)
inline

Definition at line 128 of file plotter2d.h.

void Analitza::Plotter2D::setShowTicks ( Qt::Orientations  o)
inline

Definition at line 127 of file plotter2d.h.

void Analitza::Plotter2D::setViewport ( const QRectF &  vp,
bool  repaint = true 
)

Sets the graph's viewport to v.

void Analitza::Plotter2D::setXAxisLabel ( const QString &  label)
void Analitza::Plotter2D::setYAxisLabel ( const QString &  label)
bool Analitza::Plotter2D::showGrid ( ) const
inline

Returns whether we have chosen to draw the grid.

Definition at line 70 of file plotter2d.h.

QLineF Analitza::Plotter2D::slope ( const QPointF &  dp) const
protected
Qt::Orientations Analitza::Plotter2D::ticksShown ( ) const
inline

Definition at line 138 of file plotter2d.h.

QPointF Analitza::Plotter2D::toViewport ( const QPoint &  mv) const
protected
QPointF Analitza::Plotter2D::toWidget ( const QPointF &  ) const
protected
QLineF Analitza::Plotter2D::toWidget ( const QLineF &  ) const
protected
void Analitza::Plotter2D::updateFunctions ( const QModelIndex &  parent,
int  start,
int  end 
)

Force the functions from start to end to be recalculated.

void Analitza::Plotter2D::updateScale ( bool  repaint)
protected
virtual void Analitza::Plotter2D::viewportChanged ( )
protectedpure virtual
void Analitza::Plotter2D::zoomIn ( bool  repaint = true)

Zooms in to the Viewport center.

void Analitza::Plotter2D::zoomOut ( bool  repaint = true)

Zooms out taken ref center too.


The documentation for this class was generated from the following file:
  • plotter2d.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:11:37 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Analitza

Skip menu "Analitza"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal