[Uml-devel] branches/work/soc-umbrello/umbrello
Andi Fischer
andi.fischer at hispeed.ch
Tue Sep 25 16:29:22 UTC 2012
SVN commit 1317754 by fischer:
Diff to trunk reduced.
M +11 -10 umlscene.cpp
M +2 -2 umlscene.h
--- branches/work/soc-umbrello/umbrello/umlscene.cpp #1317753:1317754
@@ -1659,6 +1659,7 @@
const int height = rect.y() + rect.height();
QPixmap pixmap(width, height);
QPainter painter(&pixmap);
+ painter.fillRect(0, 0, width, height, Qt::white);
getDiagram(sceneRect(), painter);
QPainter output(&diagram);
output.drawPixmap(QPoint(0, 0), pixmap, rect);
@@ -3003,19 +3004,19 @@
/**
* Event handler for context menu events.
*/
-void UMLScene::contextMenuEvent(UMLSceneContextMenuEvent * event)
+void UMLScene::contextMenuEvent(UMLSceneContextMenuEvent* contextMenuEvent)
{
- UMLWidget* widget = widgetAt(event->scenePos());
+ UMLWidget* widget = widgetAt(contextMenuEvent->scenePos());
if (widget) {
DEBUG(DBG_SRC) << "widget = " << widget->name() << " / type = " << widget->baseTypeStr();
- widget->contextMenuEvent(event);
+ widget->contextMenuEvent(contextMenuEvent);
}
else {
// set the position for the eventually created widget
- setPos(event->scenePos());
+ setPos(contextMenuEvent->scenePos());
- setMenu(event->screenPos());
- event->accept();
+ setMenu(contextMenuEvent->screenPos());
+ contextMenuEvent->accept();
}
}
@@ -3615,10 +3616,10 @@
m_isMouseMovingItems = status;
}
-void UMLScene::drawBackground(QPainter *p, const QRectF &rect)
-{
- QGraphicsScene::drawBackground(p, rect);
-}
+//:TODO:void UMLScene::drawBackground(QPainter *p, const QRectF &rect)
+//:TODO:{
+//:TODO: QGraphicsScene::drawBackground(p, rect);
+//:TODO:}
/**
* Slot for signale sceneRectChanged.
--- branches/work/soc-umbrello/umbrello/umlscene.h #1317753:1317754
@@ -369,7 +369,7 @@
void mousePressEvent(UMLSceneMouseEvent* mouseEvent);
void mouseDoubleClickEvent(UMLSceneMouseEvent* mouseEvent);
void mouseReleaseEvent(UMLSceneMouseEvent* mouseEvent);
- virtual void contextMenuEvent(UMLSceneContextMenuEvent * event);
+ virtual void contextMenuEvent(UMLSceneContextMenuEvent* contextMenuEvent);
/**
* This variable is set/reset by items which would call
@@ -388,7 +388,7 @@
UMLSceneValue& px, UMLSceneValue& py, UMLSceneValue& qx, UMLSceneValue& qy);
void forceUpdateWidgetFontMetrics(QPainter *painter);
- void drawBackground(QPainter *p, const UMLSceneRect& rect);
+//:TODO: void drawBackground(QPainter *p, const UMLSceneRect& rect);
int m_nCollaborationId; ///< Used for creating unique name of collaboration messages.
UMLScenePoint m_Pos;
More information about the umbrello-devel
mailing list