Summary: | manual single-stepping in time | ||
---|---|---|---|
Product: | [Applications] kstars | Reporter: | Stefan H <shuehne> |
Component: | general | Assignee: | kstars |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Stefan H
2003-10-04 12:48:37 UTC
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 |