-rw-r--r-- | noncore/tools/clock/clock.cpp | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/noncore/tools/clock/clock.cpp b/noncore/tools/clock/clock.cpp index 0eb2b83..74b7147 100644 --- a/noncore/tools/clock/clock.cpp +++ b/noncore/tools/clock/clock.cpp @@ -201,3 +201,4 @@ Clock::Clock( QWidget * parent, const char * name, WFlags f ) cfg.setGroup( "Mode" ); - int mode = cfg.readBoolEntry( "clockMode");setSwatchMode( mode); + int mode = cfg.readBoolEntry( "clockMode"); + setSwatchMode( mode); modeSelect( mode); @@ -269,2 +270,7 @@ void Clock::startSWatch() { + if(swatch_running) { + stopSWatch(); + return; + } + qDebug("startSWatch()"); swatch_start.start(); @@ -279,2 +285,3 @@ void Clock::stopSWatch() { + qDebug("stopSWatch()"); swatch_totalms += swatch_start.elapsed(); @@ -315,3 +322,3 @@ void Clock::modeSelect( int m ) qDebug("Clock::modeSelect( %d) ", m); - if ( m ) + if ( m != 0 ) { @@ -323,6 +330,13 @@ void Clock::modeSelect( int m ) - if ( !swatch_running ) - t->stop(); +// if(m == 2) { + if ( !swatch_running ) { + t->start( 1000 ); } - else +// else +// { +// stopSWatch(); +// } +// } + } + else //clock mode { |