Allow toggling the collapse state of extender items by double clicking the drag handle.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=875202
This commit is contained in:
Rob Scheepmaker 2008-10-23 16:44:40 +00:00
parent 1a63cf107a
commit 32fa54a46d
2 changed files with 8 additions and 0 deletions

View File

@ -623,6 +623,13 @@ void ExtenderItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
}
}
void ExtenderItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
{
if (d->titleRect().contains(event->pos())) {
d->toggleCollapse();
}
}
void ExtenderItem::hoverMoveEvent(QGraphicsSceneHoverEvent *event)
{
if (d->titleRect().contains(event->pos())) {

View File

@ -199,6 +199,7 @@ class PLASMA_EXPORT ExtenderItem : public QGraphicsWidget
void resizeEvent(QGraphicsSceneResizeEvent *event);
void mousePressEvent(QGraphicsSceneMouseEvent *event);
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);
void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);