KDEUI
kplotwidget.cpp
Go to the documentation of this file.
380 QList<KPlotPoint*> pts = pointsUnderPoint( he->pos() - QPoint( leftPadding(), topPadding() ) - contentsRect().topLeft() );
407 float px = d->pixRect.left() + d->pixRect.width() * ( p.x() - d->dataRect.x() ) / d->dataRect.width();
408 float py = d->pixRect.top() + d->pixRect.height() * ( d->dataRect.y() + d->dataRect.height() - p.y() ) / d->dataRect.height();
864 QRect r( d->pixRect.width() + SMALLTICKSIZE, int(py)-SMALLTICKSIZE, 2*BIGTICKSIZE, 2*SMALLTICKSIZE );
void setBottomPadding(int padding)
Set the number of pixels below the plot area.
Definition: kplotwidget.cpp:959
void maskRect(const QRectF &r, float value=1.0)
Indicate that object labels should try to avoid the given rectangle in the plot.
Definition: kplotwidget.cpp:412
void setPointSize(int pointSize)
Type type() const
QRect toRect() const
bool end()
void fillRect(const QRectF &rectangle, const QBrush &brush)
void setRenderHint(RenderHint hint, bool on)
void setPixRect()
Synchronize the PixRect with the current widget size and padding settings.
Definition: kplotwidget.cpp:398
void draw(QPainter *p, KPlotWidget *pw)
Draw this KPlotObject on the given QPainter.
Definition: kplotobject.cpp:233
int right() const
QRect contentsRect() const
qreal x() const
qreal y() const
virtual void paintEvent(QPaintEvent *)
The paint event handler, executed when update() or repaint() is called.
Definition: kplotwidget.cpp:667
void setShowGrid(bool show)
Toggle whether grid lines are drawn at major tickmarks.
Definition: kplotwidget.cpp:334
QList< KPlotPoint * > pointsUnderPoint(const QPoint &p) const
Definition: kplotwidget.cpp:362
const QFont & font() const
int topPadding() const
void setClipping(bool enable)
void maskAlongLine(const QPointF &p1, const QPointF &p2, float value=1.0)
Indicate that object labels should try to avoid the line joining the two given points (in pixel coord...
Definition: kplotwidget.cpp:427
int y() const
void save()
const QPoint & pos() const
void setAttribute(Qt::WidgetAttribute attribute, bool on)
void setAlpha(int alpha)
qreal top() const
int height() const
virtual void drawAxes(QPainter *p)
Draws the plot axes and axis labels.
Definition: kplotwidget.cpp:695
void rotate(qreal angle)
void drawLine(const QLineF &line)
QImage copy(const QRect &rectangle) const
void setRed(int red)
void showText(const QPoint &pos, const QString &text, QWidget *w)
qreal left() const
void update()
int size() const
void resetPlotMask()
Reset the mask used for non-overlapping labels so that all regions of the plot area are considered em...
Definition: kplotwidget.cpp:249
void clearSecondaryLimits()
Unset the secondary limits, so the top and right axes show the same tickmarks as the bottom and left ...
Definition: kplotwidget.cpp:192
void resize(int w, int h)
void setMinimumSize(const QSize &)
QColor backgroundColor() const
void removeAllPlotObjects()
Remove and delete all items from the list of KPlotObjects.
Definition: kplotwidget.cpp:239
void setFont(const QFont &font)
QRgb pixel(int x, int y) const
int leftPadding() const
int count(const T &value) const
qreal x() const
qreal y() const
int bottomPadding() const
void append(const T &value)
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:169
void addPlotObjects(const QList< KPlotObject * > &objects)
Add more than one KPlotObject at one time.
Definition: kplotwidget.cpp:219
int x() const
virtual void paintEvent(QPaintEvent *)
int top() const
QRgb rgb() const
int red() const
void setPen(const QColor &color)
const QPoint & globalPos() const
int width() const
int left() const
bool isEmpty() const
QPaintDevice * device() const
QPoint pos() const
void moveLeft(qreal x)
void setBrush(const QBrush &brush)
void drawText(const QPointF &position, const QString &text)
void setObjectToolTipShown(bool show)
Toggle the display of a tooltip for point objects.
Definition: kplotwidget.cpp:339
T & front()
void placeLabel(QPainter *painter, KPlotPoint *pp)
Place an object label optimally in the plot.
Definition: kplotwidget.cpp:489
QRect intersected(const QRect &rectangle) const
void setTickLabelsShown(bool b)
Determine whether tick labels will be drawn for this axis.
Definition: kplotaxis.cpp:76
void drawRoundRect(const QRectF &r, int xRnd, int yRnd)
QRect rect() const
const T value(const Key &key) const
void accept()
int rightPadding() const
void setDefaultPaddings()
Revert all four padding values to -1, so that they will be automatically determined.
Definition: kplotwidget.cpp:964
bool contains(const T &value) const
void restore()
QColor gridColor() const
void setLeftPadding(int padding)
Set the number of pixels to the left of the plot area.
Definition: kplotwidget.cpp:944
int width() const
qreal width() const
void setClipRect(const QRectF &rectangle, Qt::ClipOperation operation)
void setTickMarks(double x0, double length)
Determine the positions of major and minor tickmarks for this axis.
Definition: kplotaxis.cpp:113
QPoint toPoint() const
void resetPlot()
Clear the object list, reset the data limits, and remove axis labels.
Definition: kplotwidget.cpp:256
void replacePlotObject(int i, KPlotObject *o)
Replace an item in the KPlotObject list.
Definition: kplotwidget.cpp:272
int bottom() const
QPoint topLeft() const
void translate(const QPointF &offset)
static QDebug kWarning(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
qreal height() const
int height() const
void show()
void setTopPadding(int padding)
Set the number of pixels above the plot area.
Definition: kplotwidget.cpp:954
virtual void resizeEvent(QResizeEvent *event)
virtual void resizeEvent(QResizeEvent *)
The resize event handler, called when the widget is resized.
Definition: kplotwidget.cpp:392
void moveTop(qreal y)
bool begin(QPaintDevice *device)
void setLimits(double x1, double x2, double y1, double y2)
Set new data limits for the plot.
Definition: kplotwidget.cpp:135
QColor foregroundColor() const
void setRightPadding(int padding)
Set the number of pixels to the right of the plot area.
Definition: kplotwidget.cpp:949
virtual bool event(QEvent *e)
int pointSize() const
QRgb rgba() const
void addPlotObject(KPlotObject *object)
Add an item to the list of KPlotObjects to be plotted.
Definition: kplotwidget.cpp:210
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:00 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:00 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.