[Uml-devel] Correct line width and color handling
Achim Spangler
Achim.Spangler at mnet-online.de
Thu Jul 8 09:26:03 UTC 2004
Hi,
I was unhappy with the too thin line of the actors in my use case diagrams
( the default pen width of 0 looks bad for my printouts ).
So I searched and fixed the signal handling for line width and color.
Additionally all draw functions, which use a pen are using now using the line
width of the diagram/global ( corresponding to line color ).
Changes:
1) Create drawing pen with line color and line width of UMLWidget
( for _ALL_ pen creations which used the UMLWidget::getLineColour() )
-- e.g.
- p.setPen( UMLWidget::getLineColour() );
+ p.setPen( QPen( UMLWidget::getLineColour(), UMLWidget::getLineWidth() ) );
---
2) Changes for linepath
2.1) Create new linepath functions:
slotLineColorChanged and slotLineWidthChanged
-> both are called with the ID of the changed UMLView ( corresponding to
slot functions of UMLWidget )
2.2) Connect signals sigLineColorChanged and sigLineWidthChanged to the above
functions
2.3) Check in the slot functions, if the ID of the signal corresponds to the
linked UMLView ( if mapping -> call the setXY funcs )
3) Changes to UMLWidget
3.1) Connect slotColorChanged and slotLineWidthChanged to the corresponding
signals
4) Changes to UMLView
4.1) Emit sigLineColorChanged with the ID of this UMLView instance
( and not with new QColor -> now this signal is mapping to the scheme
of the other signals )
4.2) Emit LineWidth signal also with ID
Please check and apply the attached patch.
Maybe a point for discussion:
Could a user be interested in different line width for associations, links
and outlines for elements like actor, note,... ???
I'm not shure. In my opinion an individual change of the line width is only
needed, if the (zoomed ) display of a diagram line is not looking good
enough. But do I oversee some other needs?
-> Maybe we should create a seperated handling for
+ LinePathLineWidth
+ OutlineLineWidth
Bye,
Achim
-------------- next part --------------
A non-text attachment was scrubbed...
Name: LineWidthColorEventHandling.diff
Type: text/x-diff
Size: 27270 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/umbrello-devel/attachments/20040708/3856c52f/attachment.bin>
More information about the umbrello-devel
mailing list