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
|
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
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user