15#include <QGraphicsItem>
16#include <QPainterPath>
42 QGraphicsItem* parent);
56 double fy,
double xOffset,
double yOffset,
double relSize,
57 QGraphicsItem* parent);
61 inline unsigned color()
const {
return m_color; };
68 static void exponent(
double a,
int& iExp,
double& f);
78 {
return (m_normX == fx) && (m_normY == fy); };
87 static bool limits(
double& xMin,
double& xMax,
const double* values,
int n);
93 inline void normalize(
double fx,
double fy) { m_normX = fx; m_normY = fy; };
95 inline double normX()
const {
return m_normX; };
97 inline double normY()
const {
return m_normY; };
111 inline void setColor(
unsigned color) { m_color = color; };
143 inline void setXOffset(
double xOffset) { m_xOffset = xOffset; };
148 inline void setYOffset(
double yOffset) { m_yOffset = yOffset; };
160 void writePlo(KConfigGroup* plo,
bool visible)
const;
162 inline double xOffset()
const {
return m_xOffset; };
164 inline double yOffset()
const {
return m_yOffset; };
174 double length(
const double* x,
const double* y,
int n)
const;
183 void plotArray(QPainter* painter,
const double* x,
const double* y,
190 double m_normX, m_normY, m_xOffset, m_yOffset, dydx, myDashOffset;
192 mutable QPainterPath bPath;
193 mutable QRectF bRect;
Kpl item class.
Definition kplitem.h:42
FillStyle
Fill styles.
Definition kplitem.h:45
Symbol
Symbol types.
Definition kplitem.h:83
Scaled item class.
Definition scaleditem.h:25
void setColor(unsigned color)
Sets color.
Definition scaleditem.h:111
ScaledItem(FillStyle fillStyle, Symbol symbol, unsigned color, double fx, double fy, double xOffset, double yOffset, double relSize, QGraphicsItem *parent)
Constructor.
void setFillStyle(FillStyle style)
Sets fill style.
Definition scaleditem.h:116
void update()
Applies changes and forces redrawing.
static bool limits(double &xMin, double &xMax, const double *values, int n)
Calculates minimum and maximum values of an array.
void normalize(double fx, double fy)
Sets normalization factors.
Definition scaleditem.h:93
void setNormY(double fy)
Sets normalization factor for y values.
Definition scaleditem.h:126
QPixmap pixmap() const
Returns decoration pixmap for item list.
static void exponent(double a, int &iExp, double &f)
Calculates normalization factor.
void setProperties(const QTransform &m)
Sets properties according to transformation matrix.
void setNormX(double fx)
Sets normalization factor for x values.
Definition scaleditem.h:121
Symbol symbol() const
Returns symbol type.
Definition scaleditem.h:150
void setSize()
Sets size according to transformation matrix.
ScaledItem(const ScaledItem &a)
Copy constructor.
virtual ~ScaledItem()
Destructor.
void plotArray(QPainter *painter, const double *x, const double *y, int n) const
Plots array.
bool isNormalized(double fx, double fy) const
Checks if both normalization factors are equal to given values.
Definition scaleditem.h:77
void readPlo(const KConfigGroup *plo, Symbol symbol, unsigned color)
Initializes corresponding to plot file.
double xOffset() const
Returns offset for x values.
Definition scaleditem.h:162
FillStyle fillStyle() const
Returns fill style.
Definition scaleditem.h:70
void updateGeometry()
Updates geometry.
double yOffset() const
Returns offset for y values.
Definition scaleditem.h:164
double normX() const
Returns normalization factor for x values.
Definition scaleditem.h:95
void setYOffset(double yOffset)
Sets offset for y values.
Definition scaleditem.h:148
void setXOffset(double xOffset)
Sets offset for x values.
Definition scaleditem.h:143
void setSymbol(Symbol symbol)
Sets symbol type.
Definition scaleditem.h:138
double normY() const
Returns normalization factor for y values.
Definition scaleditem.h:97
unsigned color() const
Returns color.
Definition scaleditem.h:61
void setProperties()
Sets properties according to transformation matrix.
double length(const double *x, const double *y, int n) const
Calculates line length.
ScaledItem(const KConfigGroup *plo, Symbol symbol, unsigned color, QGraphicsItem *parent)
Constructor.
void writePlo(KConfigGroup *plo, bool visible) const
Writes into plot file.