* add getter for targetItem
* add property for targetItem svn path=/trunk/KDE/kdelibs/; revision=1031688
This commit is contained in:
parent
1a94dec4e2
commit
6ccaa814b3
@ -190,6 +190,11 @@ void ItemBackground::setTargetItem(QGraphicsItem *target)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QGraphicsItem *ItemBackground::targetItem() const
|
||||||
|
{
|
||||||
|
return d->target;
|
||||||
|
}
|
||||||
|
|
||||||
bool ItemBackground::eventFilter(QObject *watched, QEvent *event)
|
bool ItemBackground::eventFilter(QObject *watched, QEvent *event)
|
||||||
{
|
{
|
||||||
QGraphicsWidget *targetWidget = static_cast<QGraphicsWidget *>(d->target);
|
QGraphicsWidget *targetWidget = static_cast<QGraphicsWidget *>(d->target);
|
||||||
|
@ -41,6 +41,7 @@ class PLASMA_EXPORT ItemBackground : public QGraphicsWidget
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(QRectF target READ target WRITE setTarget)
|
Q_PROPERTY(QRectF target READ target WRITE setTarget)
|
||||||
|
Q_PROPERTY(QGraphicsItem* targetItem READ targetItem WRITE setTargetItem)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ItemBackground(QGraphicsWidget *parent = 0);
|
ItemBackground(QGraphicsWidget *parent = 0);
|
||||||
@ -63,6 +64,11 @@ public:
|
|||||||
*/
|
*/
|
||||||
void setTargetItem(QGraphicsItem *target);
|
void setTargetItem(QGraphicsItem *target);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the target item, if any
|
||||||
|
*/
|
||||||
|
QGraphicsItem *targetItem() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @reimp from QGraphicsWidget
|
* @reimp from QGraphicsWidget
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user