QGraphicsWidgetPluginImpl.cpp [plain text]
#include "config.h"
#include "QGraphicsWidgetPluginImpl.h"
#include <QGraphicsScene>
#include <QGraphicsWidget>
#ifndef QT_NO_GRAPHICSVIEW
QGraphicsWidgetPluginImpl::~QGraphicsWidgetPluginImpl()
{
m_graphicsWidget->deleteLater();
}
void QGraphicsWidgetPluginImpl::update(const QRect &rect)
{
QGraphicsScene* scene = m_graphicsWidget->scene();
if (scene)
scene->update(rect);
}
void QGraphicsWidgetPluginImpl::setGeometryAndClip(const QRect &geometry, const QRect &, bool)
{
m_graphicsWidget->setGeometry(geometry);
}
void QGraphicsWidgetPluginImpl::setVisible(bool visible)
{
m_graphicsWidget->setVisible(visible);
}
void QGraphicsWidgetPluginImpl::setWidgetParent(QObject* parent)
{
QGraphicsObject* parentItem = qobject_cast<QGraphicsObject*>(parent);
if (parentItem)
m_graphicsWidget->setParentItem(parentItem);
}
QObject* QGraphicsWidgetPluginImpl::handle() const
{
return m_graphicsWidget;
}
#include "moc_QGraphicsWidgetPluginImpl.cpp"
#endif // !defined(QT_NO_GRAPHICSVIEW)