show an empty area when dropping applets from applet browser to the

panel, making easier to add applets

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=874087
This commit is contained in:
Marco Martin 2008-10-20 18:51:15 +00:00
parent 9ed5641257
commit 63a8fba67c
2 changed files with 13 additions and 0 deletions

View File

@ -430,6 +430,11 @@ void Containment::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
} }
} }
void Containment::showDropZone(const QPoint pos)
{
//Base implementation does nothing, don't put code here
}
void Containment::showContextMenu(const QPointF &containmentPos, const QPoint &screenPos) void Containment::showContextMenu(const QPointF &containmentPos, const QPoint &screenPos)
{ {
d->showContextMenu(mapToScene(containmentPos), screenPos, false); d->showContextMenu(mapToScene(containmentPos), screenPos, false);

View File

@ -315,6 +315,14 @@ class PLASMA_EXPORT Containment : public Applet
*/ */
void showContextMenu(const QPointF &containmentPos, const QPoint &screenPos); void showContextMenu(const QPointF &containmentPos, const QPoint &screenPos);
/**
* Shows a visual clue for drag and drop
* This implementation does nothing, reimplement in containments that needs it
*
* @param pos point where to show the drop target
*/
virtual void showDropZone(const QPoint pos);
Q_SIGNALS: Q_SIGNALS:
/** /**
* This signal is emitted when a new applet is created by the containment * This signal is emitted when a new applet is created by the containment