The signalplotter needs to know when it is resized. Otherwise the plots are too short for the current width.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=757903
This commit is contained in:
parent
454d824d4f
commit
84f2fad73e
@ -516,6 +516,13 @@ QPixmap SignalPlotter::getSnapshotImage(uint w, uint height)
|
||||
return image;
|
||||
}
|
||||
|
||||
void SignalPlotter::setGeometry(const QRectF &geometry)
|
||||
{
|
||||
// First update our size, then update the data buffers accordingly.
|
||||
Widget::setGeometry(geometry);
|
||||
updateDataBuffers();
|
||||
}
|
||||
|
||||
void SignalPlotter::paintWidget(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
||||
{
|
||||
Q_UNUSED(option);
|
||||
|
@ -410,6 +410,12 @@ public:
|
||||
*/
|
||||
QPixmap getSnapshotImage(uint width, uint height);
|
||||
|
||||
/**
|
||||
* Overwritten to be notified of size changes. Needed to update the
|
||||
* data buffers that are used to store the samples.
|
||||
*/
|
||||
virtual void setGeometry(const QRectF &geometry);
|
||||
|
||||
protected:
|
||||
void updateDataBuffers();
|
||||
void calculateNiceRange();
|
||||
|
Loading…
Reference in New Issue
Block a user