On 7/26/07, Rob Spearman <rob@digitaliseducation.com> wrote:
On Thu, 2007-07-26 at 17:32 +0200, Fabien Chéreau wrote:
>
>
> On 7/26/07, Rob Spearman <rob@digitaliseducation.com> wrote:
>
>         Few questions:
>
>         Can we define and keep the standard module stack levels
>         constant through
>         releases?  (Is stack level the right term to use?)
>
> I am not sure i see what you mean but the order of drawing should be
> quite similar between releases, especially once the API for v 1.0.0
> will be stabilized.
Yes, I just mean that other module developers or scripts will be able to
know where the standard modules draw so they can code accordingly and
not have things break down the road.  So this should just be defined
with the API docs.

In practice, you don't have to know the real value for a module, just get it when needed with the getCallOrder method.
 
>         I know at our meeting we discussed how individual scripted
>         images need
>         to be at arbitrary levels, but the one module per level idea
>         won't work.
>         I think we need to allow modules to register for drawing at
>         multiple
>         levels.  Do you see any problems with that?
>
> It is currently not possible to register a module for several draw
> methods. But if you need to draw in several stages, you can also
> create 1 module for each stage.
>

Here's a silly example to show the issue.  Spaceship image on launchpad
in front of landscape.  Spaceship takes off and goes off behind the
landscape, or behind a planet, etc.

One module per layer doesn't work in these cases.  The same image
changes levels at different times.  Even images were limited to one
layer each, there would be modules for any possible drawing level
(between the standard modules).  It would be a bit silly.
So I guess I will have to add multi-layer module support.  As long as
the drawing method knows what layer it is called at that should be fine
for drawing.  I imagine it causes problems for the before/after
insertion algorithms though?

You can still create several modules for each layers, 2 or 3 in this case. Of course the modules for the other layers will be very simple, just calling a special draw method from the main ImageMgr module.

One thing which would be more elegant is to create a special method in StelModuleMgr which create these modules for your. Something like CallBackStelModule* StelModuleMgr::createCallBackModule(myValue)
The CallBackStelModule* will then provide a Qt signal to attach to your SLOT.

Fabien

Rob

>
>         What happens when multiple modules want the same level?
>
> With the new algo, their relative position is undefined. Note that as
> suggested Johannes, I used a double value for describing the level, so
> it is almost always possible to insert a module between two others.
>
>
> Fab
>
>         Thanks,
>
>         Rob
>
>         On Thu, 2007-07-26 at 15:02 +0200, Fabien Chéreau wrote:
>         > Hi all,
>         >
>         > I recoded the part of the code used for managing the order
>         of call for
>         > the draw/update/.. operations of the StelModules.
>         > I based my code on an idea that Johannes mention during the
>         lunch at
>         > the developers meeting in ESO. namely each module now return
>         a double
>         > value for each operation, which indicate its order.
>         > The dependencies between modules can now be achieved using
>         the
>         > StelModule::getCallOrder() method.
>         >
>         > Although things seems to work, there may be some drawing
>         order or
>         > event interception errors. please report any strange
>         behaviour.
>         >
>         > Thanks,
>         >
>         > Fabien
>         >
>         -------------------------------------------------------------------------
>         > This SF.net email is sponsored by: Splunk Inc.
>         > Still grepping through log files to find problems?  Stop.
>         > Now Search log events and configuration files using AJAX and
>         a browser.
>         > Download your FREE copy of Splunk now >>
>         http://get.splunk.com/
>         > _______________________________________________
>         Stellarium-pubdevel mailing list
>         Stellarium-pubdevel@lists.sourceforge.net
>         https://lists.sourceforge.net/lists/listinfo/stellarium-pubdevel
>         --
>           Digitalis Education Solutions, Inc.  tel 360.616.8915
>           P.O . Box 2976                        fax 360.616.8917
>           Bremerton, WA
>         98310                  http://digitaliseducation.com
>
>
>
>         -------------------------------------------------------------------------
>         This SF.net email is sponsored by: Splunk Inc.
>         Still grepping through log files to find problems?  Stop.
>         Now Search log events and configuration files using AJAX and a
>         browser.
>         Download your FREE copy of Splunk now >>
>         http://get.splunk.com/
>         _______________________________________________
>         Stellarium-pubdevel mailing list
>         Stellarium-pubdevel@lists.sourceforge.net
>         https://lists.sourceforge.net/lists/listinfo/stellarium-pubdevel
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >>  http://get.splunk.com/
> _______________________________________________ Stellarium-pubdevel mailing list Stellarium-pubdevel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stellarium-pubdevel
--
  Digitalis Education Solutions, Inc.  tel 360.616.8915
  P.O. Box 2976                        fax 360.616.8917
  Bremerton, WA 98310                  http://digitaliseducation.com



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>   http://get.splunk.com/
_______________________________________________
Stellarium-pubdevel mailing list
Stellarium-pubdevel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stellarium-pubdevel