Diffstat (limited to 'noncore/settings/netsystemtime/settime.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/netsystemtime/settime.cpp | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/noncore/settings/netsystemtime/settime.cpp b/noncore/settings/netsystemtime/settime.cpp index 01268c9..2cef6e8 100644 --- a/noncore/settings/netsystemtime/settime.cpp +++ b/noncore/settings/netsystemtime/settime.cpp @@ -59,8 +59,17 @@ SetDateTime::SetDateTime(QWidget *parent, const char *name, WFlags f ) // QVBoxLayout *vb = new QVBoxLayout( this, 5 ); QVBoxLayout *vb = new QVBoxLayout( FrameSystemTime, 5 ); QVBoxLayout *vb2 = new QVBoxLayout( FrameSetTime, 5 ); + TextLabelMainPredTime = new QLabel( FrameSystemTime ); + vb->addWidget( TextLabelMainPredTime, 1, 0 ); + ButtonSetTime = new QPushButton( FrameSystemTime ); + vb->addWidget( ButtonSetTime, 1, 0 ); + + QFrame *hline = new QFrame( FrameSystemTime ); + hline->setFrameStyle( QFrame::HLine | QFrame::Sunken ); + vb->addWidget( hline ); + QHBoxLayout *hb = new QHBoxLayout( vb, -1, "timezone layout" ); QLabel *lblZone = new QLabel( tr( "Time Zone" ), FrameSystemTime, "timezone label" ); lblZone->setMaximumSize( lblZone->sizeHint() ); @@ -81,9 +90,9 @@ SetDateTime::SetDateTime(QWidget *parent, const char *name, WFlags f ) QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); vb2->addItem( spacer ); - QFrame *hline = new QFrame( FrameSystemTime ); + hline = new QFrame( FrameSystemTime ); hline->setFrameStyle( QFrame::HLine | QFrame::Sunken ); vb->addWidget( hline ); Config config("qpe"); @@ -91,9 +100,8 @@ SetDateTime::SetDateTime(QWidget *parent, const char *name, WFlags f ) QHBoxLayout *hb1 = new QHBoxLayout( vb ); QLabel *l = new QLabel( tr("Time format"), FrameSystemTime ); - // l->setAlignment( AlignRight | AlignVCenter ); hb1->addWidget( l, 1 ); ampmCombo = new QComboBox( FrameSystemTime ); @@ -176,18 +184,18 @@ SetDateTime::SetDateTime(QWidget *parent, const char *name, WFlags f ) clockAppletCombo->setCurrentItem( clockApplet ); vb->addStretch( 0 ); + QObject::connect( PushButtonSetManualTime, SIGNAL(clicked()), + this, SLOT(commitTime())); + QObject::connect( tz, SIGNAL( signalNewTz( const QString& ) ), timeButton, SLOT( slotTzChange( const QString& ) ) ); QObject::connect( tz, SIGNAL( signalNewTz( const QString& ) ), SLOT( tzChange( const QString& ) ) ); - QObject::connect( PushButtonSetManualTime, SLOT(clicked()), - SLOT(commitTime())); -// dl = new QPEDialogListener(this); } -void SetDateTime::accept() +SetDateTime::~SetDateTime() { Config config("qpe"); config.setGroup( "Time" ); @@ -263,15 +271,8 @@ void SetDateTime::setTime(QDateTime dt) // Restore screensaver QCopEnvelope enableScreenSaver( "QPE/System", "setScreenSaverIntervals(int,int,int)" ); enableScreenSaver << -1 << -1 << -1; - // QDialog::accept(); -} - -void SetDateTime::done(int r) -{ -// QDialog::done(r); - close(); } void SetDateTime::tzChange( const QString &tz ) { |