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 namespace Plasma
{ {
Widget::Widget(QGraphicsItem *parent, QPointF pos, QSizeF size) class Widget::Private
{
public:
Private() { };
~Private() { };
};
Widget::Widget(QGraphicsItem *parent)
: QGraphicsItem(parent), : QGraphicsItem(parent),
DataVisualization() DataVisualization(),
{ d(new Private)
m_boundingBox = QRectF(0, 0, size.width(), size.height()); {
setPos(pos);
} }
Widget::~Widget() Widget::~Widget()
{ {
} delete d;
QRectF Widget::boundingRect() const
{
return m_boundingBox;
} }
} // Plasma namespace } // Plasma namespace

View File

@ -32,13 +32,12 @@ class KDE_EXPORT Widget : public QGraphicsItem,
public DataVisualization public DataVisualization
{ {
public: public:
Widget(QGraphicsItem *parent, QPointF pos, QSizeF size); Widget(QGraphicsItem *parent = 0);
virtual ~Widget(); virtual ~Widget();
QRectF boundingRect() const; private:
class Private;
protected: Private *const d;
QRectF m_boundingBox;
}; };
} // Plasma namespace } // Plasma namespace