Changeset 410

Show
Ignore:
Timestamp:
Thu May 22 13:55:40 2008
Author:
Brian
Message:

Change auto layout to use graphic objects instead of report rows. Bring ORM diagram meta-model documentation together.

Files:

Legend:

Unmodified
Added
Removed
Modified
  • scripts/trunk/ORM/Install ORM Meta-Model Reports.py

    r404 r410  
    32 32     # It will either add them or update them if they already exist.  
    33 33  
    34   #       Report  
    35   #           set it so that data.py won't manage the rows - done  
    36    
    37   #       ReportRow - all diagram objects are represented as a report row  
    38   #       - ID  
    39   #       - ReportID  
    40   #       - PosX      # these refer to the center of the object (the target of arrows pointing to the object)  
    41   #       - PosY  
    42   #                   # this line connects these two objects, follow each end if it is moved  
    43   #       - NodeAID   # these are pointers to other ReportRow objects that are the ends of a connector  
    44   #       - NodeBID  
    45   #       - OffsetX   # Text that is displayed offset from the main object (that text is separately moveable)  
    46   #       - OffsetY   # needed for role, probably not for reading  
    47   #       - Moveable  # can this object be moved with the mouse - is this needed????  
    48   #       - FollowID  # if this ID is moved, follow it - is this needed? - maybe - for reading?  
      34 # -------------------  
      35 # this first section descibes the orm model objects. the graphic objects are described later  
    49 36  
    50 37 #       ORMObject  
     
    264 251 # --------------------------  
    265 252  
      253 #       Report  
      254 #           set it so that data.py won't manage the rows - done  
      255  
      256 #       GraphicObject - all diagram objects are represented as a graphic object  
      257 #       - ID  
      258 #       - ReportID  
      259 #       - PosX      # these refer to the center of the object (the target of arrows pointing to the object)  
      260 #       - PosY  
      261 #                   # this line connects these two objects, follow each end if it is moved  
      262 #       - NodeAID   # these are pointers to other ReportRow objects that are the ends of a connector  
      263 #       - NodeBID  
      264 #       - OffsetX   # Text that is displayed offset from the main object (that text is separately moveable)  
      265 #       - OffsetY   # needed for role, probably not for reading  
      266 #       - Moveable  # can this object be moved with the mouse - is this needed????  
      267 #       - FollowID  # if this ID is moved, follow it - is this needed? - maybe - for reading?  
      268  
    266 269 ### instead of a report object, it might be better just to use the good old report row?  
    267 270 ##    rt = { 'Name': 'ORM Report Objects', 'TableA': 'ORMReportObject', 'TableB': None, 'Also': None, 'AllOrEach': 'each',  
  • scripts/trunk/ORM/Auto Layout of ORM Model.py

    r370 r410  
    165 165 '''  
    166 166     # make a list of all shapes in the report  
    167       all_shapes = report.GetList('ReportRow')  # report rows that point to this report  
      167     all_shapes = report.GetList('GraphicObject')  # report rows that point to this report  
      168 ##    db = report.db  
      169 ##    all_shapes = [ db.GetObject('GraphicObject', x) for x in Data.SearchByColumn(db.Database['GraphicObject'], {'ReportID': report.ID}) ]  
    168 170         # don't care about order? or links?  
    169 171         # we could sort the list?  
     
    195 197         r.SetRelation(10)  
    196 198         nodes_to_relation[min(id1,id2), max(id1,id2)] = r  
    197       r.SetRelation(10)  
      199 ##    r.SetRelation(10)   ## should this be commented out?  
    197 199  
    198 200     if debug: print '--------- xref ---------\n', nodes_to_relation     
     
    667 669 ##        return  
    668 670  
    669       db = Data._db  # will get objects from this database  
      671     db = Data.DBObject  # will get objects from this database  
    669 671     report = db.GetObject('Report',rowid)  
    670 672  
    671 673     result = DynamicLayout( report )  
    672 674     if debug: print 'result code %d' % result  
    673       all_shapes = report.GetList('ReportRow')  # report rows that point to this report  
      675 ##    db = report.db  
      676 ##    all_shapes = [ db.GetObject('GraphicObject', x) for x in Data.SearchByColumn(db.Database['GraphicObject'], {'ReportID': report.ID}) ]  
      677     all_shapes = report.GetList('GraphicObject')  # report rows that point to this report  
    674 678         # don't care about order? or links?  
    675 679         # we could sort the list?