[Uml-devel] branches/work/soc-umbrello/umbrello
Andi Fischer
andi.fischer at hispeed.ch
Sun Nov 25 13:00:43 UTC 2012
SVN commit 1326040 by fischer:
UMLSceneContextMenuEvent removed.
M +1 -1 umlscene.cpp
M +1 -2 umlscene.h
M +1 -1 widgets/floatingtextwidget.cpp
M +1 -1 widgets/floatingtextwidget.h
M +1 -1 widgets/umlwidget.cpp
M +1 -1 widgets/umlwidget.h
M +2 -1 widgets/widget_utils.cpp
M +1 -1 widgets/widgetbase.cpp
M +1 -2 widgets/widgetbase.h
--- branches/work/soc-umbrello/umbrello/umlscene.cpp #1326039:1326040
@@ -2879,7 +2879,7 @@
/**
* Event handler for context menu events.
*/
-void UMLScene::contextMenuEvent(UMLSceneContextMenuEvent* contextMenuEvent)
+void UMLScene::contextMenuEvent(QGraphicsSceneContextMenuEvent* contextMenuEvent)
{
UMLWidget* widget = widgetAt(contextMenuEvent->scenePos());
if (widget) {
--- branches/work/soc-umbrello/umbrello/umlscene.h #1326039:1326040
@@ -68,7 +68,6 @@
// event types
typedef QGraphicsSceneHoverEvent UMLSceneHoverEvent;
-typedef QGraphicsSceneContextMenuEvent UMLSceneContextMenuEvent;
typedef QGraphicsSceneDragDropEvent UMLSceneDragDropEvent;
typedef QGraphicsSceneDragDropEvent UMLSceneDragEnterEvent;
typedef QGraphicsSceneDragDropEvent UMLSceneDragMoveEvent;
@@ -362,7 +361,7 @@
void mousePressEvent(QGraphicsSceneMouseEvent* mouseEvent);
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* mouseEvent);
void mouseReleaseEvent(QGraphicsSceneMouseEvent* mouseEvent);
- virtual void contextMenuEvent(UMLSceneContextMenuEvent* contextMenuEvent);
+ virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent* contextMenuEvent);
/**
* This variable is set/reset by items which would call
--- branches/work/soc-umbrello/umbrello/widgets/floatingtextwidget.cpp #1326039:1326040
@@ -574,7 +574,7 @@
/**
* Event handler for context menu events.
*/
-void FloatingTextWidget::contextMenuEvent(UMLSceneContextMenuEvent *event)
+void FloatingTextWidget::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
{
AssociationWidget *assoc = dynamic_cast<AssociationWidget*>(m_linkWidget);
--- branches/work/soc-umbrello/umbrello/widgets/floatingtextwidget.h #1326039:1326040
@@ -98,7 +98,7 @@
virtual QVariant itemChange(GraphicsItemChange change, const QVariant& newValue);
virtual QVariant attributeChange(WidgetAttributeChange change, const QVariant& oldValue);
- virtual void contextMenuEvent(UMLSceneContextMenuEvent *event);
+ virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
private:
/// The association or message widget we may be linked to.
--- branches/work/soc-umbrello/umbrello/widgets/umlwidget.cpp #1326039:1326040
@@ -413,7 +413,7 @@
* Note: It is public because it is called from UMLScene::contextMenuEvent(event).
* This should not be.
*/
-void UMLWidget::contextMenuEvent(UMLSceneContextMenuEvent * event)
+void UMLWidget::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
{
uDebug() << "widget = " << name() << " / type = " << baseTypeStr();
WidgetBase::contextMenuEvent(event);
--- branches/work/soc-umbrello/umbrello/widgets/umlwidget.h #1326039:1326040
@@ -159,7 +159,7 @@
virtual bool loadFromXMI(QDomElement &qElement);
virtual void saveToXMI(QDomDocument &qDoc, QDomElement &qElement);
- virtual void contextMenuEvent(UMLSceneContextMenuEvent * event);
+ virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent * event);
protected:
virtual QVariant attributeChange(WidgetAttributeChange change, const QVariant& oldValue);
--- branches/work/soc-umbrello/umbrello/widgets/widget_utils.cpp #1326039:1326040
@@ -72,10 +72,11 @@
UMLView *currentView = UMLApp::app()->currentView();
QGraphicsRectItem *rect = new QGraphicsRectItem(p.x() - SIZE / 2,
p.y() - SIZE / 2,
- SIZE, SIZE, 0);
+ SIZE, SIZE);
currentView->umlScene()->addItem(rect);
rect->setBrush( QBrush(Qt::blue) );
rect->setPen( QPen(Qt::blue) );
+ rect->setVisible(true);
return rect;
}
--- branches/work/soc-umbrello/umbrello/widgets/widgetbase.cpp #1326039:1326040
@@ -1073,7 +1073,7 @@
/**
* Reimplemented to show appropriate context menu.
*/
-void WidgetBase::contextMenuEvent(UMLSceneContextMenuEvent *event)
+void WidgetBase::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
{
event->accept();
--- branches/work/soc-umbrello/umbrello/widgets/widgetbase.h #1326039:1326040
@@ -21,7 +21,6 @@
#define WIDGETBASE_H
#include "basictypes.h"
-#include "umlscene.h"
#include <QAction>
#include <QBrush>
@@ -205,7 +204,7 @@
virtual void slotUMLObjectDataChanged();
protected:
- virtual void contextMenuEvent(UMLSceneContextMenuEvent *event);
+ virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
virtual void setupContextMenuActions(ListPopupMenu &menu);
virtual QVariant attributeChange(WidgetAttributeChange change, const QVariant& oldValue);
More information about the umbrello-devel
mailing list