Bug 310283

Summary: Migrate current implementation of it scene item selection to a QGraphicsScene based one
Product: [Applications] umbrello Reporter: Ralf Habacker <ralf.habacker>
Component: generalAssignee: Umbrello Development Group <umbrello-devel>
Status: RESOLVED FIXED    
Severity: wishlist CC: ralf.habacker
Priority: NOR    
Version: SVN   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In: 2.12.80 (KDE 4.12.80)

Description Ralf Habacker 2012-11-18 13:53:03 UTC
Recent implementation of scene item selection is still based on the former scene api.  
This should be migrated to a QGraphicsScene implementation.

Reproducible: Always
Comment 1 Ralf Habacker 2012-11-24 09:28:42 UTC
I opened a development branch for this ticket on https://gitorious.org/umbrello/test/commits/310283 .

Single and multiple widget selection is already working, except for note widgets, which are not selectable. Any hint or fix welcome.
Comment 2 Ralf Habacker 2012-11-25 11:27:16 UTC
SVN commit 1326036 by habacker:

Made QGraphicsObject a common base class of WidgetBase and UMLWidget.


 M  +2 -2      associationwidget.cpp  
 M  +2 -1      associationwidget.h  
 M  +0 -3      enumwidget.h  
 M  +38 -16    umlwidget.cpp  
 M  +11 -17    umlwidget.h  
 M  +31 -1     widgetbase.cpp  
 M  +7 -2      widgetbase.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1326036
Comment 3 Ralf Habacker 2013-11-26 02:04:29 UTC
Git commit 1bef292bafda864caf9183366b19f556f8bc24e3 by Ralf Habacker.
Committed on 25/11/2013 at 21:10.
Pushed by habacker into branch '310283-qgraphicsscene-selection'.

Migrate current implementation of it scene item selection to a QGraphicsScene based one.

M  +7    -18   umbrello/widgets/associationwidget.cpp
M  +1    -4    umbrello/widgets/associationwidget.h
M  +3    -3    umbrello/widgets/messagewidget.cpp
M  +9    -5    umbrello/widgets/umlwidget.cpp
M  +2    -14   umbrello/widgets/umlwidget.h
M  +8    -1    umbrello/widgets/widgetbase.cpp
M  +2    -0    umbrello/widgets/widgetbase.h

http://commits.kde.org/umbrello/1bef292bafda864caf9183366b19f556f8bc24e3
Comment 4 Ralf Habacker 2013-11-26 02:05:45 UTC
reopended because feature is not ready
Comment 5 Ralf Habacker 2013-11-26 02:29:18 UTC
Git commit 9b9682dca8f2b31cc70f684e10f3adf35c8d86ec by Ralf Habacker.
Committed on 26/11/2013 at 02:22.
Pushed by habacker into branch '310283-qgraphicsscene-selection'.

Try to fix widget resizing.

M  +17   -13   umbrello/widgets/umlwidget.cpp

http://commits.kde.org/umbrello/9b9682dca8f2b31cc70f684e10f3adf35c8d86ec
Comment 6 Ralf Habacker 2013-11-26 18:12:19 UTC
Git commit 3d3cc92b4c1bfa3a5671b5c75407fca66cba8c9c by Ralf Habacker.
Committed on 26/11/2013 at 13:50.
Pushed by habacker into branch 'master'.

Provide UMLWidget::paint() with option parameter, it holds the selection and hover state.

M  +15   -15   umbrello/widgets/messagewidget.cpp
M  +5    -5    umbrello/widgets/messagewidget.h

http://commits.kde.org/umbrello/3d3cc92b4c1bfa3a5671b5c75407fca66cba8c9c
Comment 7 Ralf Habacker 2013-11-26 18:55:30 UTC
Git commit fa45c5437b91cce02b98478efe8694b6551ff18e by Ralf Habacker.
Committed on 25/11/2013 at 21:10.
Pushed by habacker into branch 'master'.

Refactor WidgetBase derived classes to use setSelected() and
isSelected() from QGraphicsItem instead of self provided
members/methods.

M  +7    -18   umbrello/widgets/associationwidget.cpp
M  +1    -4    umbrello/widgets/associationwidget.h
M  +3    -3    umbrello/widgets/messagewidget.cpp
M  +8    -5    umbrello/widgets/umlwidget.cpp
M  +2    -14   umbrello/widgets/umlwidget.h
M  +14   -1    umbrello/widgets/widgetbase.cpp
M  +2    -0    umbrello/widgets/widgetbase.h

http://commits.kde.org/umbrello/fa45c5437b91cce02b98478efe8694b6551ff18e