author | alwin <alwin> | 2004-03-02 12:14:15 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-03-02 12:14:15 (UTC) |
commit | 0d59c780513da78033f4d9040475dee9db0256d4 (patch) (side-by-side diff) | |
tree | 503d320b4aa3daae9982082e7b34e3e2c48bdfb7 /libopie/otimepicker.cpp | |
parent | a0981652d61776d70f25980f035748b21339e946 (diff) | |
download | opie-0d59c780513da78033f4d9040475dee9db0256d4.zip opie-0d59c780513da78033f4d9040475dee9db0256d4.tar.gz opie-0d59c780513da78033f4d9040475dee9db0256d4.tar.bz2 |
run the optimize_connect script
the whole cvs is tagged with "before_optimize_connect" if there are problems you
can check the diff (but it had compiled and run here)
-rw-r--r-- | libopie/otimepicker.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libopie/otimepicker.cpp b/libopie/otimepicker.cpp index 1eca7c5..11b80ed 100644 --- a/libopie/otimepicker.cpp +++ b/libopie/otimepicker.cpp @@ -128,102 +128,102 @@ void OTimePicker::setTime( int h, int m ) { * FIXME round minutes to the 5 minute arrangement -zecke */ /** * Method to set the minutes * @param m minutes */ void OTimePicker::setMinute(int m) { QString minute; minute.sprintf("%.2d",m); QValueListIterator<OClickableLabel *> it; for (it=minuteLst.begin(); it!=minuteLst.end(); it++) { if ((*it)->text() == minute) (*it)->setOn(true); else (*it)->setOn(false); } tm.setHMS(tm.hour(),m,0); } /** * Method to set the hour */ void OTimePicker::setHour(int h) { QString hour; hour.sprintf("%.2d",h); QValueListIterator<OClickableLabel *> it; for (it=hourLst.begin(); it!=hourLst.end(); it++) { if ((*it)->text() == hour) (*it)->setOn(true); else (*it)->setOn(false); } tm.setHMS(h,tm.minute(),0); } /** * This is a modal Dialog. * * @param parent The parent widget * @param name The name of the object * @param fl Possible window flags */ OTimePickerDialog::OTimePickerDialog ( QWidget* parent, const char* name, WFlags fl ) : OTimePickerDialogBase (parent , name, true , fl) { - connect ( m_timePicker, SIGNAL( timeChanged( const QTime& ) ), - this, SLOT( setTime ( const QTime& ) ) ); - connect ( minuteField, SIGNAL( textChanged ( const QString& ) ), - this, SLOT ( setMinute ( const QString& ) ) ); - connect ( hourField, SIGNAL( textChanged ( const QString& ) ), - this, SLOT ( setHour ( const QString& ) ) ); + connect ( m_timePicker, SIGNAL( timeChanged(const QTime&) ), + this, SLOT( setTime(const QTime&) ) ); + connect ( minuteField, SIGNAL( textChanged(const QString&) ), + this, SLOT ( setMinute(const QString&) ) ); + connect ( hourField, SIGNAL( textChanged(const QString&) ), + this, SLOT ( setHour(const QString&) ) ); } /** * @return the time */ QTime OTimePickerDialog::time()const { return m_time; } /** * Set the time to time * @param time The time to be set */ void OTimePickerDialog::setTime( const QTime& time ) { m_time = time; m_timePicker->setHour ( time.hour() ); m_timePicker->setMinute( time.minute() ); // Set Textfields if ( time.hour() < 10 ) hourField->setText( "0" + QString::number( time.hour() ) ); else hourField->setText( QString::number( time.hour() ) ); if ( time.minute() < 10 ) minuteField->setText( "0" + QString::number( time.minute() ) ); else minuteField->setText( QString::number( time.minute() ) ); } /** * This method takes the current minute and tries to set hour * to hour. This succeeds if the resulting date is valid * @param hour The hour as a string */ void OTimePickerDialog::setHour ( const QString& hour ) { if ( QTime::isValid ( hour.toInt(), m_time.minute() , 00 ) ){ m_time.setHMS ( hour.toInt(), m_time.minute() , 00 ); setTime ( m_time ); } } |