[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdeedu/kstars/kstars/skycomponents
From: Jason Harris <kstars () 30doradus ! org>
Date: 2005-11-13 4:25:32
Message-ID: 1131855932.292178.14528.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 480080 by harris:
Added "Loading XXX" messages to all SkyComponents, for display in the
KStars splash-screen. I thought for a while today about how best to
handle these messages in a simple way. Here's what I came up with:
Added a function SkyComponent::emitProgressText(QString), which just
calls "parent()->emitProgressText(QString)". So messages get handed up
the Components hierarchy until they reach the root parent Component,
SkyMapComposite. In this class, emitProgressText() has been overridden:
it emits a Signal: progressText(QString).
This Signal is connected to another Signal:
KStarsData::progressText(QString), which already existed and is
connected to KStarsSplash::setMessage(QString).
So, to display a Splashscreen message from any Component, you just have
to add emitProgressText(message). This should happen in the init()
function (or a function called by init()), because the init()'s get
called when the Splashscreen is present.
I added emitProgressMessage() to all Components that I thought needed
them (i.e., not Equator/Ecliptic/Horizon).
Note that I had to make SkyMapComposite a QObject so that it can have a
Signal.
CCMAIL: kstars-devel@kde.org
M +2 -3 asteroidscomponent.cpp
M +2 -3 cometscomponent.cpp
M +0 -1 cometscomponent.h
M +2 -1 constellationboundarycomponent.cpp
M +16 -1 constellationboundarycomponent.h
M +2 -1 constellationlinescomponent.cpp
M +6 -1 constellationlinescomponent.h
M +2 -2 constellationlinescomposite.cpp
M +2 -0 constellationnamescomponent.cpp
M +10 -0 constellationnamescomponent.h
M +2 -0 coordinategridcomponent.cpp
M +2 -0 customcatalogcomponent.cpp
M +0 -10 customcatalogcomponent.h
M +22 -3 deepskycomponent.cpp
M +38 -4 deepskycomponent.h
M +2 -9 milkywaycomponent.cpp
M +17 -15 milkywaycomponent.h
M +4 -1 milkywaycomposite.cpp
M +3 -2 milkywaycomposite.h
M +5 -5 skycomponent.cpp
M +9 -3 skycomponent.h
M +0 -1 skycomposite.h
M +18 -1 skymapcomposite.cpp
M +14 -1 skymapcomposite.h
M +2 -0 solarsystemcomposite.cpp
M +0 -1 solarsystemsinglecomponent.cpp
M +2 -13 starcomponent.cpp
M +32 -10 starcomponent.h
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic