Skip to content
  • Akarsh Simha's avatar
    Backends separated. Working, unclean, hackish version. · 83df2c8f
    Akarsh Simha authored
    + SkyMap is now a QGraphicsView
    
    + The widget on which all drawing is done is called SkyMapQDraw for
      the Qt version (and will be called SkyMapGLDraw for the GL version).
    
    + SkyMapQDraw and the future SkyMapGLDraw inherit from an abstract
      SkyMapDrawAbstract class which contains common methods that draw
      using QPainter, and allows the reimplementation of paintEvent() or
      paintGL() as is appropriate in the children.
    
    + The SkyMapQDraw is set as the child widget of the
      QGraphicsView::viewport(). This seems to be the typical workaround
      for getting an QGLWidget to work as a non-background widget in a
      QGV. I don't know if there is a more elegant way _that works_. This
      is one of those hackish things.
    
    + SkyMap::forceUpdate() calls a repaint() (for the time being, not
      update()) on the SkyMapQDraw instead of the SkyMap itself. I don't
      know why this is necessary as yet. This is one more of the hackish
      things.
    
    TODO:
    
    1. See if there are less hackish ways of doing things. (But this is
       not on priority for the 4.6 release. If it works, and is reasonably
       neat, I think we should let it in.) If these are actually Qt bugs,
       file them and triage them.
    
    2. Implement the GL backend.
    
    Please let me know what you think. If it's okay, I'll transfer this to
    4.6 after I'm done with the GL stuff. I solicit everyone's response on
    this as soon as possible, since the release is in a very very short
    time from now.
    
    CCMAIL: kstars-devel@kde.org, hdevalence@gmail.com
    
    svn path=/branches/KDE/4.6/kdeedu/kstars/; revision=1210795
    83df2c8f