Version: 1.0 (using KDE KDE 3.1.4) Installed from: SuSE RPMs OS: Linux I am missing in kstars a way to manually do single time-steps. In order to just cast a quick glance at i.e. the sky as of 24h or 48h before it is not really convenient to use the Set Time dialog - which is totally ok for going to a all new time/date. Starting the clock for exactly (!) just a few steps isn't really easy, also. I could think of two different solutions. 1. A pair of buttons (and keys) which go one step of the currently selected time-step unit forward/backward. I would keep the direction independent of the sign of the time-step. So hitting 'forward' will go forward even if time-step is set to -1 day. 2, Dedicated buttons/keys for going 1 .../hour/day/year/... forward/backward. This is not as flexible as 1 but it is completely independent of the clock's current time-step. Which might be interesting.
This is a good idea, adding to the TODO (look for it sometime after the 3.2 thaw).
CVS commit by harris: Implemented Manual stepping of the clock (wish #65476). Press the "." / ">" key to advance one step forward; press the "," / "<" key to advance one step backward. The stepsize is set by the TimeStep widget in the toolbar. If the clock is running, it will be automatically stopped when one of the manual-step keys is pressed. On my keyboard, "," and "<" appear together on the same key, and "." and ">" are on another key; is that generally true for all keyboards? At this point, there is no GUI way to do the manual-stepping. It would make sense to add these buttons to the TimeStep widget, but it is already pretty complicated. What do you think? CCMAIL: 65476-done@bugs.kde.org CCMAIL: kstars-devel@kde.org M +2 -2 simclock.cpp 1.14 M +1 -1 simclock.h 1.10 M +15 -0 skymapevents.cpp 1.84 --- kdeedu/kstars/kstars/simclock.cpp #1.13:1.14 @@ -103,6 +103,6 @@ void SimClock::setManualMode( bool on ) } -void SimClock::manualTick() { - if ( ManualMode && ManualActive ) { +void SimClock::manualTick( bool force ) { + if ( force || (ManualMode && ManualActive) ) { setUTC( UTC().addSecs( int( Scale ) ) ); julian += Scale / ( 24.*3600. ); --- kdeedu/kstars/kstars/simclock.h #1.9:1.10 @@ -107,5 +107,5 @@ class SimClock : public QObject, public *year is not constant (leap years), so it is better to increment the *year, instead of adding 31 million seconds. */ - void manualTick(); + void manualTick( bool force=false ); signals: --- kdeedu/kstars/kstars/skymapevents.cpp #1.83:1.84 @@ -235,4 +235,19 @@ void SkyMap::keyPressEvent( QKeyEvent *e break; + case Key_Comma: //advance one step backward in time + case Key_Less: + if ( data->clock()->isActive() ) data->clock()->stop(); + data->clock()->setScale( -1.0 * data->clock()->scale() ); //temporarily need negative time step + data->clock()->manualTick( true ); + data->clock()->setScale( -1.0 * data->clock()->scale() ); //reset original sign of time step + update(); + break; + + case Key_Period: //advance one step forward in time + if ( data->clock()->isActive() ) data->clock()->stop(); + data->clock()->manualTick( true ); + update(); + break; + //DUMP_HORIZON /*
> On my keyboard, "," and "<" appear together on the same key, and "." > and ">" are on another key; is that generally true for all keyboards? No, e.g. german keyboards have all the punctuation keys on the same keys (".", ",", ":" and ";" use 2 keys). "<" and ">" are usually located left to where the "z" key on an US layout keyboard is. The key produces "<" unshifted, ">" shifted and "|" when used with AltGr. So "." and "," are in the same location as on the US keyboard, but "<" and ">" are located elsewhere. Judging from the limited subset found on http://www.fingerworks.com/international_layouts.html most european keyboards are organized like that. Patrick
Thank you for the information. I'll update the cod so that only "<" and ">" do the time stepping. regards, Jason On Saturday 21 February 2004 10:36 am, patrick@dreker.de wrote: > ------- You are receiving this mail because: ------- > You are the assignee for the bug, or are watching the assignee. > > http://bugs.kde.org/show_bug.cgi?id=65476 > > > > > ------- Additional Comments From patrick dreker de 2004-02-21 18:36 > ------- > > > On my keyboard, "," and "<" appear together on the same key, and > > "." and ">" are on another key; is that generally true for all > > keyboards? > > No, e.g. german keyboards have all the punctuation keys on the same > keys (".", ",", ":" and ";" use 2 keys). "<" and ">" are usually > located left to where the "z" key on an US layout keyboard is. The > key produces "<" unshifted, ">" shifted and "|" when used with AltGr. > So "." and "," are in the same location as on the US keyboard, but > "<" and ">" are located elsewhere. > > Judging from the limited subset found on > http://www.fingerworks.com/international_layouts.html most european > keyboards are organized like that. > > Patrick