Skip to content
  • Dominique Devriese's avatar
    large refactoring.. · e7126255
    Dominique Devriese authored
    Important changes are that:
    Object is split up into three parts:
    * ObjectImp is a class that does represents the Object's data. It does
      the drawing, stuff like contains() etc.
    * ObjectType is a class that calcs ObjectImp's from a certain number
      of parents..
    * Object itself now is a simple class that contains one ObjectImp and
      one ObjectType, some data like width, color etc., and that forwards
      requests to one of the above..
    
    Another set of changes is the representation of types.  The type class
    is split up into:
    1 a GUIAction class that is Kig's equivalent of a KAction.  Will
      prolly make this inherit KAction directly, instead of havind that
      done by a special KigAction
    2 a Constructible class.  This represents something that wants a
      certain number of args of certain types, and constructs some objects
      with them..
    3 well, ObjectType above does part of the work previously done by the
      Type class, namely drawPrelim and friends..
    
    The rest of the changes adapt the rest of kig to the new design.
    
    These changes are mainly for two things:
    1 cleanup of the code: there was quite some boilerplate code and undue
      templates in kig, that are now removed.  E.g. the artificial
      difference between drawPrelim and calc+draw is gone..
    2 necessary for the clean implementation new features:
      e.g. transformations of a circle can dynamically change type to
      conic when the transformation at hand is not a homothety,
      i'll add a bool enabled to constructibles some time in the future,
      so they can be disabled by the user ( e.g. some people have asked me
      for kig to only show ruler-compass stuff ), i'm thinking of adding
      scripting to kig some time in the future, and i think the current
      design allows this to be done easily...
    
    The redesign is mostly done, and what remains to be done is to
    reenable the things i disabled in the process of doing the change..
    1 i still need to hook up the GUIActions to the kigDocument again, so
      you actually see them
    2 file loading/saving is disabled
    3 macro's are disabled
    4 locuses are disabled
    5 transformations aren't finished
    6 i need to make sure that i haven't changed any i18n'able strings
      when that wasn't necessary..
    
    Because those things aren't finished yet, I'm putting this all in a
    new make_it_cool branch, where i can finish these things before they
    break HEAD..  I'd also feel more comfortable with this stuff in CVS,
    where it's harder to accidentally delete or something like that ;)
    
    Well, I think that about sums it up..
    
    CCMAIL:paolini@dmf.unicatt.it
    
    Maurizio, I'm just CC'ing you to let you know what i'm doing, if you
    want, you can take a look at the new code, but it still needs a lot of
    work, and kig doesn't actually do anything useful atm ;)
    
    cheers
    domi
    
    svn path=/branches/make_kdeedu_cool/kdeedu/kig/; revision=201478
    e7126255