KPlotting
kplotwidget.cpp
421 QList<KPlotPoint *> pts = pointsUnderPoint(he->pos() - QPoint(leftPadding(), topPadding()) - contentsRect().topLeft());
450 float px = d->pixRect.left() + d->pixRect.width() * (p.x() - d->dataRect.x()) / d->dataRect.width();
451 float py = d->pixRect.top() + d->pixRect.height() * (d->dataRect.y() + d->dataRect.height() - p.y()) / d->dataRect.height();
792 QRect r(int(px) - BIGTICKSIZE, d->pixRect.height() + BIGTICKSIZE, 2 * BIGTICKSIZE, BIGTICKSIZE);
830 QRect r(-2 * BIGTICKSIZE - SMALLTICKSIZE, int(py) - SMALLTICKSIZE, 2 * BIGTICKSIZE, 2 * SMALLTICKSIZE);
926 QRect r(d->pixRect.width() + SMALLTICKSIZE, int(py) - SMALLTICKSIZE, 2 * BIGTICKSIZE, 2 * SMALLTICKSIZE);
Antialiasing
void append(const T &value)
void setTopPadding(int padding)
Set the number of pixels above the plot area.
Definition: kplotwidget.cpp:1016
void maskAlongLine(const QPointF &p1, const QPointF &p2, float value=1.0f)
Indicate that object labels should try to avoid the line joining the two given points (in pixel coord...
Definition: kplotwidget.cpp:470
void showText(const QPoint &pos, const QString &text, QWidget *w)
qreal left() const const
void replacePlotObject(int i, KPlotObject *o)
Replace an item in the KPlotObject list.
Definition: kplotwidget.cpp:303
AlignCenter
const T value(const Key &key) const const
void setPen(const QColor &color)
void setTickLabelsShown(bool b)
Determine whether tick labels will be drawn for this axis.
Definition: kplotaxis.cpp:62
void resetPlotMask()
Reset the mask used for non-overlapping labels so that all regions of the plot area are considered em...
Definition: kplotwidget.cpp:276
ToolTip
void clearSecondaryLimits()
Unset the secondary limits, so the top and right axes show the same tickmarks as the bottom and left ...
Definition: kplotwidget.cpp:208
Encapsulates a point in the plot. A KPlotPoint consists of X and Y coordinates (in Data units),...
Definition: kplotpoint.h:27
Format_ARGB32
int height() const const
pos
virtual bool event(QEvent *e) override
virtual void drawAxes(QPainter *p)
Draws the plot axes and axis labels.
Definition: kplotwidget.cpp:747
void rotate(qreal angle)
int right() const const
void maskRect(const QRectF &r, float value=1.0f)
Indicate that object labels should try to avoid the given rectangle in the plot.
Definition: kplotwidget.cpp:455
QRect toRect() const const
rect
void setPointSize(int pointSize)
qreal x() const const
qreal y() const const
void setClipRect(const QRectF &rectangle, Qt::ClipOperation operation)
void update()
TextSingleLine
virtual void resizeEvent(QResizeEvent *event)
void setBottomPadding(int padding)
Set the number of pixels below the plot area.
Definition: kplotwidget.cpp:1021
QRgb rgb() const const
const QPoint & pos() const const
void setRightPadding(int padding)
Set the number of pixels to the right of the plot area.
Definition: kplotwidget.cpp:1011
int pointSize() const const
int red() const const
int width() const const
RelativeSize
void setAttribute(Qt::WidgetAttribute attribute, bool on)
QRect intersected(const QRect &rectangle) const const
bool contains(const T &value) const const
void drawText(const QPointF &position, const QString &text)
void fillRect(const QRectF &rectangle, const QBrush &brush)
QList< KPlotPoint * > pointsUnderPoint(const QPoint &p) const
Definition: kplotwidget.cpp:401
void paintEvent(QPaintEvent *) override
The paint event handler, executed when update() or repaint() is called.
Definition: kplotwidget.cpp:717
int left() const const
bool begin(QPaintDevice *device)
QRectF boundingRect(const QString &text) const const
int size() const const
int bottom() const const
int top() const const
bool end()
void drawRoundedRect(const QRectF &rect, qreal xRadius, qreal yRadius, Qt::SizeMode mode)
QRgb pixel(int x, int y) const const
void setAutoDeletePlotObjects(bool autoDelete)
Enables auto-deletion of plot objects if autoDelete is true; otherwise auto-deletion is disabled.
Definition: kplotwidget.cpp:258
bool isEmpty() const const
void setAlpha(int alpha)
void removeAllPlotObjects()
Removes all plot objects that were added to the widget.
Definition: kplotwidget.cpp:263
qreal bottom() const const
bool isEmpty() const const
void setSecondaryLimits(double x1, double x2, double y1, double y2)
Reset the secondary data limits, which control the values displayed along the top and right axes.
Definition: kplotwidget.cpp:171
void setBrush(const QBrush &brush)
const QPoint & globalPos() const const
void show()
qreal top() const const
qreal right() const const
void resizeEvent(QResizeEvent *) override
The resize event handler, called when the widget is resized.
Definition: kplotwidget.cpp:433
void setLimits(double x1, double x2, double y1, double y2)
Set new data limits for the plot.
Definition: kplotwidget.cpp:125
void addPlotObjects(const QList< KPlotObject * > &objects)
Add more than one KPlotObject at one time.
Definition: kplotwidget.cpp:237
QPointF center() const const
int height() const const
qreal x() const const
qreal y() const const
void addPlotObject(KPlotObject *object)
Add an item to the list of KPlotObjects to be plotted.
Definition: kplotwidget.cpp:227
void setRed(int red)
virtual void paintEvent(QPaintEvent *) override
QEvent::Type type() const const
qreal width() const const
void drawLine(const QLineF &line)
const QFont & font() const const
void setDefaultPaddings()
Revert all four padding values to -1, so that they will be automatically determined.
Definition: kplotwidget.cpp:1026
QPoint toPoint() const const
void setObjectToolTipShown(bool show)
Toggle the display of a tooltip for point objects.
Definition: kplotwidget.cpp:379
void translate(const QPointF &offset)
QPaintDevice * device() const const
void restore()
void placeLabel(QPainter *painter, KPlotPoint *pp)
Place an object label optimally in the plot.
Definition: kplotwidget.cpp:533
void save()
void moveTop(qreal y)
void setPixRect()
Synchronize the PixRect with the current widget size and padding settings.
Definition: kplotwidget.cpp:440
void moveLeft(qreal x)
void setRenderHint(QPainter::RenderHint hint, bool on)
void setFont(const QFont &font)
void resetPlot()
Clear the object list, reset the data limits, and remove axis labels If auto-delete was not disabled,...
Definition: kplotwidget.cpp:284
T & front()
size
NoBrush
QRgb rgba() const const
void setClipping(bool enable)
void setLeftPadding(int padding)
Set the number of pixels to the left of the plot area.
Definition: kplotwidget.cpp:1006
WA_OpaquePaintEvent
black
QImage copy(const QRect &rectangle) const const
QRect contentsRect() const const
void accept()
void setTickMarks(double x0, double length)
Determine the positions of major and minor tickmarks for this axis.
Definition: kplotaxis.cpp:99
qreal height() const const
void setShowGrid(bool show)
Toggle whether grid lines are drawn at major tickmarks.
Definition: kplotwidget.cpp:373
int width() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Sep 26 2023 03:49:52 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Sep 26 2023 03:49:52 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.