|
Revision 1572, 0.8 kB
(checked in by arj..@yirdis.nl, 1 year ago)
|
Updated LifelineItem
|
- Property svn:eol-style set to
native
- Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 |
""" |
|---|
| 2 |
CommentLine -- A line that connects a comment to another model element. |
|---|
| 3 |
|
|---|
| 4 |
""" |
|---|
| 5 |
|
|---|
| 6 |
import gobject |
|---|
| 7 |
from gaphor import UML |
|---|
| 8 |
|
|---|
| 9 |
from diagramline import DiagramLine |
|---|
| 10 |
|
|---|
| 11 |
class CommentLineItem(DiagramLine): |
|---|
| 12 |
|
|---|
| 13 |
def __init__(self, id=None): |
|---|
| 14 |
DiagramLine.__init__(self, id) |
|---|
| 15 |
|
|---|
| 16 |
def save (self, save_func): |
|---|
| 17 |
DiagramLine.save(self, save_func) |
|---|
| 18 |
|
|---|
| 19 |
def load (self, name, value): |
|---|
| 20 |
DiagramLine.load(self, name, value) |
|---|
| 21 |
|
|---|
| 22 |
def postload(self): |
|---|
| 23 |
DiagramLine.postload(self) |
|---|
| 24 |
|
|---|
| 25 |
def on_notify_comment_parent(self, comment, pspec): |
|---|
| 26 |
if not comment.parent and self.parent: |
|---|
| 27 |
self.parent.remove(self) |
|---|
| 28 |
|
|---|
| 29 |
def draw(self, context): |
|---|
| 30 |
context.cairo.set_dash((7.0, 5.0), 0) |
|---|
| 31 |
DiagramLine.draw(self, context) |
|---|
| 32 |
|
|---|
| 33 |
|
|---|
| 34 |
|
|---|