CVS commit by cfmoro: KDateTable replaced by KDatePicker M +3 -43 dtime.cpp 1.22.4.2 --- kdebase/kcontrol/clock/dtime.cpp #1.22.4.1:1.22.4.2 @@ -50,21 +50,8 @@ Dtime::Dtime(QWidget * parent, const cha QGroupBox* dateBox = new QGroupBox( this, "dateBox" ); - QGridLayout *l1 = new QGridLayout( dateBox, 2, 3, 10 ); - - month = new QComboBox( FALSE, dateBox, "ComboBox_1" ); - connect( month, SIGNAL(activated(int)), SLOT(set_month(int)) ); - // ### HPB Fixme - month->setSizeLimit( 12 ); - l1->addWidget( month, 0, 0 ); - QWhatsThis::add( month, i18n("Here you can change the system date's month.") ); - - year = new QSpinBox( 1970, 3000, 1, dateBox ); - year->setButtonSymbols( QSpinBox::PlusMinus ); - connect(year, SIGNAL(valueChanged(int)), this, SLOT(set_year(int)) ); - l1->addWidget( year, 0, 2 ); - QWhatsThis::add( year, i18n("Here you can change the system date's year.") ); + QVBoxLayout *l1 = new QVBoxLayout( dateBox, 10 ); - cal = new KDateTable( dateBox ); - l1->addMultiCellWidget( cal, 1, 1, 0, 2 ); + cal = new KDatePicker( dateBox ); + l1->addWidget( cal ); QWhatsThis::add( cal, i18n("Here you can change the system date's day of the month.") ); @@ -167,9 +154,4 @@ Dtime::Dtime(QWidget * parent, const cha // ************************************************************* - // ### HPB Fixme - for (int i=1; i<13; i++) - // ### HPB Fixme - month->insertItem(KGlobal::locale()->monthName(i, false /*short*/)); - connect( cal, SIGNAL(dateChanged(QDate)), SLOT(changeDate(QDate))); @@ -181,6 +163,4 @@ Dtime::Dtime(QWidget * parent, const cha { cal->setEnabled(false); - month->setEnabled(false); - year->setEnabled(false); hour->setReadOnly(true); minute->setReadOnly(true); @@ -193,13 +173,4 @@ Dtime::Dtime(QWidget * parent, const cha } -void Dtime::set_year(int y) -{ - // ### HPB Fixme - if ( !date.setYMD(y, date.month(), date.day()) ) - date.setYMD(1970,date.month(),date.day()); - cal->setDate(date); - emit timeChanged(TRUE); -} - void Dtime::set_time() { @@ -221,13 +192,4 @@ void Dtime::changeDate(QDate d) } -void Dtime::set_month(int m) -{ - // ### HPB Fixme - if ( !date.setYMD(date.year(),m+1,date.day()) ) - date.setYMD(date.year(),m+1,1); - cal->setDate(date); - emit timeChanged(TRUE); -} - void Dtime::load() { @@ -235,6 +197,4 @@ void Dtime::load() time = QTime::currentTime(); date = QDate::currentDate(); - month->setCurrentItem(date.month()-1); - year->setValue(date.year()); cal->setDate(date);