Clean up Widget as discussed

svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=638826
This commit is contained in:
Alexander Wiedenbruch 2007-03-03 13:13:39 +00:00
parent 736e81e422
commit fa16f5700c
2 changed files with 17 additions and 15 deletions

View File

@ -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

View File

@ -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