Revision 722230

Go back to digest for 7th October 2007

Features in Educational

Jason Harris committed changes in /trunk/KDE/kdeedu/kstars/kstars:

Printing the sky map now works.

This is a pretty extensive change, but almost all of it was a simple refactoring. Namely, instead of passing a "scale" argument to dozens of draw-related functions, the scale is now a member variable of SkyMap.

As a reminder, the scale factor is always 1.0, unless we are printing.
Then the scale factor is determined by the properties of the printer.
Essentially, it's the ratio of the width (or height) of the printer's QPaintDevice to that of the SkyMap widget.

This is a nice change, because few people knew what scale was for, so now we don't have to pass a mysterious argument all over the codebase.

Most of the changes in this commit involve the removal of the scale argument from various functions.

Also, I am using QPrinter and QPrintDialog instead of KPrinter, because from what I've read, KPrinter will probably not be ready for KDE-4.0.

File Changes

Modified 57 files
  • /trunk/KDE/kdeedu/kstars/kstars
  •   /kstarsdcop.cpp
  •   /skymap.cpp
  •   /skymap.h
  •   /skymapdraw.cpp
  •   /starobject.cpp
  •   /starobject.h
  •   /skycomponents/asteroidscomponent.cpp
  •   /skycomponents/asteroidscomponent.h
  •   /skycomponents/cometscomponent.cpp
  •   /skycomponents/cometscomponent.h
  •   /skycomponents/constellationnamescomponent.cpp
  •   /skycomponents/constellationnamescomponent.h
  •   /skycomponents/customcatalogcomponent.cpp
  •   /skycomponents/customcatalogcomponent.h
  •   /skycomponents/deepskycomponent.cpp
  •   /skycomponents/deepskycomponent.h
  •   /skycomponents/ecliptic.cpp
  •   /skycomponents/ecliptic.h
  •   /skycomponents/equator.cpp
  •   /skycomponents/equator.h
  •   /skycomponents/horizoncomponent.cpp
  •   /skycomponents/horizoncomponent.h
  •   /skycomponents/jupitermoonscomponent.cpp
  •   /skycomponents/jupitermoonscomponent.h
  •   /skycomponents/linelistcomponent.cpp
  •   /skycomponents/linelistcomponent.h
  •   /skycomponents/linelistindex.cpp
  •   /skycomponents/linelistindex.h
  •   /skycomponents/linelistlabel.cpp
  •   /skycomponents/linelistlabel.h
  •   /skycomponents/listcomponent.h
  •   /skycomponents/milkyway.cpp
  •   /skycomponents/milkyway.h
  •   /skycomponents/noprecessindex.cpp
  •   /skycomponents/noprecessindex.h
  •   /skycomponents/pointlistcomponent.h
  •   /skycomponents/satellitecomponent.cpp
  •   /skycomponents/satellitecomponent.h
  •   /skycomponents/singlecomponent.h
  •   /skycomponents/skycomponent.cpp
  •   /skycomponents/skycomponent.h
  •   /skycomponents/skycomposite.cpp
  •   /skycomponents/skycomposite.h
  •   /skycomponents/skylabeler.cpp
  •   /skycomponents/skylabeler.h
  •   /skycomponents/skymapcomposite.cpp
  •   /skycomponents/skymapcomposite.h
  •   /skycomponents/skymesh.cpp
  •   /skycomponents/skymesh.h
  •   /skycomponents/solarsystemcomposite.cpp
  •   /skycomponents/solarsystemcomposite.h
  •   /skycomponents/solarsystemlistcomponent.cpp
  •   /skycomponents/solarsystemlistcomponent.h
  •   /skycomponents/solarsystemsinglecomponent.cpp
  •   /skycomponents/solarsystemsinglecomponent.h
  •   /skycomponents/starcomponent.cpp
  •   /skycomponents/starcomponent.h
57 files changed in total