author | sandman <sandman> | 2002-08-30 20:51:50 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-08-30 20:51:50 (UTC) |
commit | 8c26b7fe6b3afc8c3de2ee48bfb50bb041dadede (patch) (side-by-side diff) | |
tree | fbfb5ee6813ddade91cfdb7ab360b7e1295b666a | |
parent | 2606de50e126ba6da310d9fbab8581c35ddd1223 (diff) | |
download | opie-8c26b7fe6b3afc8c3de2ee48bfb50bb041dadede.zip opie-8c26b7fe6b3afc8c3de2ee48bfb50bb041dadede.tar.gz opie-8c26b7fe6b3afc8c3de2ee48bfb50bb041dadede.tar.bz2 |
Clock now works with liquid without drawing "interesting" patterns
(also reformated the file with astyle)
-rw-r--r-- | noncore/tools/clock/clock.cpp | 66 |
1 files changed, 43 insertions, 23 deletions
diff --git a/noncore/tools/clock/clock.cpp b/noncore/tools/clock/clock.cpp index e3621d9..5b901c1 100644 --- a/noncore/tools/clock/clock.cpp +++ b/noncore/tools/clock/clock.cpp @@ -115,8 +115,14 @@ Clock::Clock( QWidget * parent, const char * name, WFlags f ) - set = new QPushButton ( controls ); - set->setMaximumSize(50,30); - gl->addWidget( set, 0, 1 ); - set->setText( tr( "Start" ) ); - set->setEnabled( FALSE ); - grp->insert( set ); + set + = new QPushButton ( controls ); + set + ->setMaximumSize( 50, 30 ); + gl->addWidget( set + , 0, 1 ); + set + ->setText( tr( "Start" ) ); + set + ->setEnabled( FALSE ); + grp->insert( set + ); @@ -142,3 +148,4 @@ Clock::Clock( QWidget * parent, const char * name, WFlags f ) - connect( set, SIGNAL( pressed() ), SLOT( slotSet() ) ); + connect( set + , SIGNAL( pressed() ), SLOT( slotSet() ) ); connect( reset, SIGNAL( clicked() ), SLOT( slotReset() ) ); @@ -173,3 +180,4 @@ Clock::Clock( QWidget * parent, const char * name, WFlags f ) snoozeBtn->show(); - } else { + } + else { alarmOffBtn->setText( tr( "Alarm Is Off" ) ); @@ -202,3 +210,4 @@ void Clock::updateClock() ampmLabel->show(); - } else { + } + else { s.sprintf( "%2d%c%02d", tm.hour(), ':', tm.minute() ); @@ -210,3 +219,4 @@ void Clock::updateClock() date->setText( TimeString::longDateString( QDate::currentDate() ) ); - } else { + } + else { QTime swatch_time; @@ -243,3 +253,4 @@ void Clock::slotSet() swatch_totalms += swatch_start.elapsed(); - set->setText( tr( "Start" ) ); + set + ->setText( tr( "Start" ) ); t->stop(); @@ -248,5 +259,7 @@ void Clock::slotSet() updateClock(); - } else { + } + else { swatch_start.start(); - set->setText( tr( "Stop" ) ); + set + ->setText( tr( "Stop" ) ); t->start( 1000 ); @@ -275,3 +288,4 @@ void Clock::modeSelect( int m ) lcd->setMinimumWidth( lcd->sizeHint().width() ); - set->setEnabled( TRUE ); + set + ->setEnabled( TRUE ); reset->setEnabled( TRUE ); @@ -281,6 +295,8 @@ void Clock::modeSelect( int m ) t->stop(); - } else { + } + else { lcd->setNumDigits( 5 ); lcd->setMinimumWidth( lcd->sizeHint().width() ); - set->setEnabled( FALSE ); + set + ->setEnabled( FALSE ); reset->setEnabled( FALSE ); @@ -344,3 +360,4 @@ void Clock::slotToggleAlarm() alarmOff(); - } else { + } + else { config.writeEntry("clockAlarmSet","TRUE"); @@ -382,3 +399,3 @@ void Clock::alarmOff() -void Clock::appMessage(const QCString& msg, const QByteArray& data) +void Clock::appMessage( const QCString& msg, const QByteArray& /*data*/ ) { @@ -395,3 +412,4 @@ void Clock::appMessage(const QCString& msg, const QByteArray& data) e<<config.readEntry("mp3File",""); - } else { + } + else { @@ -413,3 +431,4 @@ void Clock::timerEvent( QTimerEvent *e ) stop++; - } else { + } + else { stop = 0; @@ -449,4 +468,4 @@ void AnalogClock::drawContents( QPainter *p ) - if ( clear && prevTime.secsTo(currTime) > 1 ) { - p->eraseRect( rect() ); + if ( clear ) { + erase( rect() ); return; @@ -507,3 +526,4 @@ QPoint AnalogClock::rotate( QPoint c, QPoint p, int a ) -void Clock::slotAdjustTime() { +void Clock::slotAdjustTime() +{ QCopEnvelope e("QPE/System", "execute(QString)"); |