Revision 75ecf39...

Go back to digest for 15th April 2012

Features in Educational

Akarsh Simha committed changes in [kstars] /:

The sorting by meridian transit time / observation time for an
observation session is not the same as a simple QTime compare.

Any observation session starts at sunset and stops at sunrise --
midnight is not the starting point. So the objects that should be
observed first are those which transit meridian just after 12 PM. So
the correct sorting procedure would place 12 PM first, followed by 1
PM and so on till 11 PM, followed by 12 AM and so on till 11:59 AM.

This sorting is achieved easily by sorting the time + 12 hours instead
of the time itself. Since QTime wraps around after 24 hours, this
works well.

This commit introduces this by:

1. Creating a SessionSortFilterProxyModel, subclassed from
QSortFilterProxyModel, reimplementing lessThan()

2. Using this sort model rather than the default one for the session
planner.

File Changes

Added 2 files
  • /tools
  •   kstars/sessionsortfilterproxymodel.cpp
  •   kstars/sessionsortfilterproxymodel.h
Modified 2 files
  •   kstars/CMakeLists.txt
  •   kstars/tools/observinglist.cpp
4 files changed in total