Bug 107174 - Employ the use of Splines
Summary: Employ the use of Splines
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR wishlist
Target Milestone: 2.12 (KDE 4.12)
Assignee: Andi Fischer
URL:
Keywords:
Depends on: 320463
Blocks:
  Show dependency treegraph
 
Reported: 2005-06-10 16:22 UTC by Justace Clutter
Modified: 2014-01-16 07:22 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.12.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Justace Clutter 2005-06-10 16:22:33 UTC
Version:            (using KDE KDE 3.4.1)
Compiler:          gcc (GCC) 3.4.4 (Gentoo 3.4.4, ssp-3.4.4-1.0, pie-8.7.8) 
OS:                Linux

Currently Umbello uses vectors of stright lines to represent the associations between objects.  I think that it would be great if Umbrello could support a spline style connection.  I originally thought that this would be an easy addition but have since found that QT does not have a nice spline object that can use a pen.  I have since started to make one in the hopes that I can integrate it with Umbrello to give nice smooth lines.  

I can see one or two small problems looming but I think they can be eventually overcome.

What do other people think?  good idea or bad idea?
Comment 1 Justace Clutter 2005-06-11 19:19:15 UTC
So,

   I have done some searching and found out that the new QT4.0 will have the new painting system.  It looks as though the QPainterPath class will allow for a rich set of line options including some sort of spline path that will fill the current needs.  The canvas is going away as of 4.0 but a replacement will be avail in 4.1.  I am not sure of Umbrello's QT4 plans but if the conversion is made to the new paint system then this bug will be fixed by converting the current QCanvasLine's to QPainterPath's.  Could be exciting...

Justace
Comment 2 Ralf Habacker 2013-06-24 22:39:29 UTC
> fixed by converting the current QCanvasLine's to QPainterPath's. 
QCanvasLine has been already migrated to QGraphicsLineItem. 
The resulting work to do is
1. convert AssociationLine::m_lineList a QVector<QPointF>
2. add a ::paint() method which paints a polyline.  
3. add a line type attribute (polyline, spline) setable by AssociationWidget property dialog. 
4. use QPainterPath to display splines when line type = spline is used 

The QVector<QPointF> implementation in umbrello-soc branch  may be used as as base.
Comment 3 Andi Fischer 2013-07-12 08:17:15 UTC
Work started as proposed.
See branch _associationline_refactoring_.
Comment 4 Andi Fischer 2013-08-26 21:35:26 UTC
Associations can now be drawn with different layouts. 
The possibilities, which are set from the popup menu, are 
- direct lines 
- polylines 
- orthogonal lines (only vertical and horizontal) 
- splines 

Single points or segments can be moved. 

The controllers are now integrated into the widgets and therefore deleted. 
This makes the code more readable and maintainable.
Comment 5 Ralf Habacker 2013-11-14 21:49:32 UTC
*** Bug 128352 has been marked as a duplicate of this bug. ***