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 | |||
@@ -60,6 +60,15 @@ SetDateTime::SetDateTime(QWidget *parent, const char *name, WFlags f ) | |||
60 | QVBoxLayout *vb = new QVBoxLayout( FrameSystemTime, 5 ); | 60 | QVBoxLayout *vb = new QVBoxLayout( FrameSystemTime, 5 ); |
61 | QVBoxLayout *vb2 = new QVBoxLayout( FrameSetTime, 5 ); | 61 | QVBoxLayout *vb2 = new QVBoxLayout( FrameSetTime, 5 ); |
62 | 62 | ||
63 | TextLabelMainPredTime = new QLabel( FrameSystemTime ); | ||
64 | vb->addWidget( TextLabelMainPredTime, 1, 0 ); | ||
65 | ButtonSetTime = new QPushButton( FrameSystemTime ); | ||
66 | vb->addWidget( ButtonSetTime, 1, 0 ); | ||
67 | |||
68 | QFrame *hline = new QFrame( FrameSystemTime ); | ||
69 | hline->setFrameStyle( QFrame::HLine | QFrame::Sunken ); | ||
70 | vb->addWidget( hline ); | ||
71 | |||
63 | QHBoxLayout *hb = new QHBoxLayout( vb, -1, "timezone layout" ); | 72 | QHBoxLayout *hb = new QHBoxLayout( vb, -1, "timezone layout" ); |
64 | 73 | ||
65 | QLabel *lblZone = new QLabel( tr( "Time Zone" ), FrameSystemTime, "timezone label" ); | 74 | QLabel *lblZone = new QLabel( tr( "Time Zone" ), FrameSystemTime, "timezone label" ); |
@@ -82,7 +91,7 @@ SetDateTime::SetDateTime(QWidget *parent, const char *name, WFlags f ) | |||
82 | QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); | 91 | QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); |
83 | vb2->addItem( spacer ); | 92 | vb2->addItem( spacer ); |
84 | 93 | ||
85 | QFrame *hline = new QFrame( FrameSystemTime ); | 94 | hline = new QFrame( FrameSystemTime ); |
86 | hline->setFrameStyle( QFrame::HLine | QFrame::Sunken ); | 95 | hline->setFrameStyle( QFrame::HLine | QFrame::Sunken ); |
87 | vb->addWidget( hline ); | 96 | vb->addWidget( hline ); |
88 | 97 | ||
@@ -92,7 +101,6 @@ SetDateTime::SetDateTime(QWidget *parent, const char *name, WFlags f ) | |||
92 | QHBoxLayout *hb1 = new QHBoxLayout( vb ); | 101 | QHBoxLayout *hb1 = new QHBoxLayout( vb ); |
93 | 102 | ||
94 | QLabel *l = new QLabel( tr("Time format"), FrameSystemTime ); | 103 | QLabel *l = new QLabel( tr("Time format"), FrameSystemTime ); |
95 | // l->setAlignment( AlignRight | AlignVCenter ); | ||
96 | hb1->addWidget( l, 1 ); | 104 | hb1->addWidget( l, 1 ); |
97 | 105 | ||
98 | 106 | ||
@@ -177,16 +185,16 @@ SetDateTime::SetDateTime(QWidget *parent, const char *name, WFlags f ) | |||
177 | 185 | ||
178 | vb->addStretch( 0 ); | 186 | vb->addStretch( 0 ); |
179 | 187 | ||
188 | QObject::connect( PushButtonSetManualTime, SIGNAL(clicked()), | ||
189 | this, SLOT(commitTime())); | ||
190 | |||
180 | QObject::connect( tz, SIGNAL( signalNewTz( const QString& ) ), | 191 | QObject::connect( tz, SIGNAL( signalNewTz( const QString& ) ), |
181 | timeButton, SLOT( slotTzChange( const QString& ) ) ); | 192 | timeButton, SLOT( slotTzChange( const QString& ) ) ); |
182 | QObject::connect( tz, SIGNAL( signalNewTz( const QString& ) ), | 193 | QObject::connect( tz, SIGNAL( signalNewTz( const QString& ) ), |
183 | SLOT( tzChange( const QString& ) ) ); | 194 | SLOT( tzChange( const QString& ) ) ); |
184 | QObject::connect( PushButtonSetManualTime, SLOT(clicked()), | ||
185 | SLOT(commitTime())); | ||
186 | // dl = new QPEDialogListener(this); | ||
187 | } | 195 | } |
188 | 196 | ||
189 | void SetDateTime::accept() | 197 | SetDateTime::~SetDateTime() |
190 | { | 198 | { |
191 | 199 | ||
192 | Config config("qpe"); | 200 | Config config("qpe"); |
@@ -264,13 +272,6 @@ void SetDateTime::setTime(QDateTime dt) | |||
264 | QCopEnvelope enableScreenSaver( "QPE/System", "setScreenSaverIntervals(int,int,int)" ); | 272 | QCopEnvelope enableScreenSaver( "QPE/System", "setScreenSaverIntervals(int,int,int)" ); |
265 | enableScreenSaver << -1 << -1 << -1; | 273 | enableScreenSaver << -1 << -1 << -1; |
266 | 274 | ||
267 | // QDialog::accept(); | ||
268 | } | ||
269 | |||
270 | void SetDateTime::done(int r) | ||
271 | { | ||
272 | // QDialog::done(r); | ||
273 | close(); | ||
274 | } | 275 | } |
275 | 276 | ||
276 | void SetDateTime::tzChange( const QString &tz ) | 277 | void SetDateTime::tzChange( const QString &tz ) |