summaryrefslogtreecommitdiff
path: root/noncore/settings/netsystemtime/timetabwidget.cpp
authordrw <drw>2005-02-23 16:14:09 (UTC)
committer drw <drw>2005-02-23 16:14:09 (UTC)
commite5b1e010c321ba1edac704f9d668df75b22fd074 (patch) (side-by-side diff)
treec76221c7d8292f66ef05040721edf816a04fbeba /noncore/settings/netsystemtime/timetabwidget.cpp
parent30857db6ca3f355aa3d50b59f03a13c82f265af2 (diff)
downloadopie-e5b1e010c321ba1edac704f9d668df75b22fd074.zip
opie-e5b1e010c321ba1edac704f9d668df75b22fd074.tar.gz
opie-e5b1e010c321ba1edac704f9d668df75b22fd074.tar.bz2
Fix UI to prevent error dialog from displaying when it shouldn't
Diffstat (limited to 'noncore/settings/netsystemtime/timetabwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/netsystemtime/timetabwidget.cpp57
1 files changed, 31 insertions, 26 deletions
diff --git a/noncore/settings/netsystemtime/timetabwidget.cpp b/noncore/settings/netsystemtime/timetabwidget.cpp
index 3cc127d..905461f 100644
--- a/noncore/settings/netsystemtime/timetabwidget.cpp
+++ b/noncore/settings/netsystemtime/timetabwidget.cpp
@@ -1,26 +1,26 @@
/*
-                This file is part of the OPIE Project
+ This file is part of the OPIE Project
=.
-             .=l. Copyright (c) 2002 OPIE team <opie@handhelds.org?>
-           .>+-=
- _;:,     .>    :=|. This file is free software; you can
-.> <`_,   >  .   <= redistribute it and/or modify it under
-:`=1 )Y*s>-.--   : the terms of the GNU General Public
-.="- .-=="i,     .._ License as published by the Free Software
- - .   .-<_>     .<> Foundation; either version 2 of the License,
-     ._= =}       : or (at your option) any later version.
-    .%`+i>       _;_.
-    .i_,=:_.      -<s. This file is distributed in the hope that
-     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
-    : ..    .:,     . . . without even the implied warranty of
-    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
-  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General
-..}^=.=       =       ; Public License for more details.
-++=   -.     .`     .:
- :     =  ...= . :.=- You should have received a copy of the GNU
- -.   .:....=;==+<; General Public License along with this file;
-  -_. . .   )=.  = see the file COPYING. If not, write to the
-    --        :-=` Free Software Foundation, Inc.,
+ .=l. Copyright (c) 2002 OPIE team <opie@handhelds.org?>
+ .>+-=
+_;:, .> :=|. This file is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU General Public
+.="- .-=="i, .._ License as published by the Free Software
+- . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This file is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General
+..}^=.= = ; Public License for more details.
+++= -. .` .:
+: = ...= . :.=- You should have received a copy of the GNU
+-. .:....=;==+<; General Public License along with this file;
+ -_. . . )=. = see the file COPYING. If not, write to the
+ -- :-=` Free Software Foundation, Inc.,
59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
@@ -109,13 +109,13 @@ TimeTabWidget::TimeTabWidget( QWidget *parent )
layout->addItem( new QSpacerItem( 1, 1, QSizePolicy::Minimum, QSizePolicy::Expanding ), 7, 0 );
// Set NTP time button
- QPushButton *pb = new QPushButton( Resource::loadPixmap( "netsystemtime/ntptab" ),
- tr( "Get time from the network" ), container );
- connect( pb, SIGNAL(clicked()), this, SIGNAL(getNTPTime()) );
- layout->addMultiCellWidget( pb, 8, 8, 0, 5 );
+ m_ntpBtn = new QPushButton( Resource::loadPixmap( "netsystemtime/ntptab" ),
+ tr( "Get time from the network" ), container );
+ connect( m_ntpBtn, SIGNAL(clicked()), this, SIGNAL(getNTPTime()) );
+ layout->addMultiCellWidget( m_ntpBtn, 8, 8, 0, 5 );
// Set predicted time button
- pb = new QPushButton( Resource::loadPixmap( "netsystemtime/predicttab" ), tr( "Set predicted time" ),
+ QPushButton *pb = new QPushButton( Resource::loadPixmap( "netsystemtime/predicttab" ), tr( "Set predicted time" ),
container );
connect( pb, SIGNAL(clicked()), this, SIGNAL(getPredictedTime()) );
layout->addMultiCellWidget( pb, 9, 9, 0, 5 );
@@ -192,6 +192,11 @@ void TimeTabWidget::setDateTime( const QDateTime &dt )
btnDate->setDate( dt.date() );
}
+void TimeTabWidget::setNTPBtnEnabled( bool enabled )
+{
+ m_ntpBtn->setEnabled( enabled );
+}
+
void TimeTabWidget::setSystemTime( const QDateTime &dt )
{
// Set system clock