Clean up Widget as discussed
svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=638826
This commit is contained in:
parent
736e81e422
commit
fa16f5700c
@ -21,21 +21,24 @@
|
||||
namespace Plasma
|
||||
{
|
||||
|
||||
Widget::Widget(QGraphicsItem *parent, QPointF pos, QSizeF size)
|
||||
: QGraphicsItem(parent),
|
||||
DataVisualization()
|
||||
class Widget::Private
|
||||
{
|
||||
public:
|
||||
Private() { };
|
||||
~Private() { };
|
||||
};
|
||||
|
||||
|
||||
Widget::Widget(QGraphicsItem *parent)
|
||||
: QGraphicsItem(parent),
|
||||
DataVisualization(),
|
||||
d(new Private)
|
||||
{
|
||||
m_boundingBox = QRectF(0, 0, size.width(), size.height());
|
||||
setPos(pos);
|
||||
}
|
||||
|
||||
Widget::~Widget()
|
||||
{
|
||||
}
|
||||
|
||||
QRectF Widget::boundingRect() const
|
||||
{
|
||||
return m_boundingBox;
|
||||
delete d;
|
||||
}
|
||||
|
||||
} // Plasma namespace
|
||||
|
@ -32,13 +32,12 @@ class KDE_EXPORT Widget : public QGraphicsItem,
|
||||
public DataVisualization
|
||||
{
|
||||
public:
|
||||
Widget(QGraphicsItem *parent, QPointF pos, QSizeF size);
|
||||
Widget(QGraphicsItem *parent = 0);
|
||||
virtual ~Widget();
|
||||
|
||||
QRectF boundingRect() const;
|
||||
|
||||
protected:
|
||||
QRectF m_boundingBox;
|
||||
private:
|
||||
class Private;
|
||||
Private *const d;
|
||||
};
|
||||
|
||||
} // Plasma namespace
|
||||
|
Loading…
Reference in New Issue
Block a user