summaryrefslogtreecommitdiff
path: root/noncore/settings/netsystemtime
authorzecke <zecke>2004-03-14 16:01:52 (UTC)
committer zecke <zecke>2004-03-14 16:01:52 (UTC)
commitf12af18557c8f376f0c6c30e80a85737ff6c592e (patch) (unidiff)
treed60806f34f4ff6af82491579e80c9ef72cd4071e /noncore/settings/netsystemtime
parent13aeeabab5f2a6262b33de83cc9559a49365e325 (diff)
downloadopie-f12af18557c8f376f0c6c30e80a85737ff6c592e.zip
opie-f12af18557c8f376f0c6c30e80a85737ff6c592e.tar.gz
opie-f12af18557c8f376f0c6c30e80a85737ff6c592e.tar.bz2
Make use of ODP
Diffstat (limited to 'noncore/settings/netsystemtime') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/netsystemtime/main.cpp1
-rw-r--r--noncore/settings/netsystemtime/mainwindow.cpp6
-rw-r--r--noncore/settings/netsystemtime/mainwindow.h9
3 files changed, 9 insertions, 7 deletions
diff --git a/noncore/settings/netsystemtime/main.cpp b/noncore/settings/netsystemtime/main.cpp
index 4a2d17c..dbcdc17 100644
--- a/noncore/settings/netsystemtime/main.cpp
+++ b/noncore/settings/netsystemtime/main.cpp
@@ -27,7 +27,8 @@
27*/ 27*/
28 28
29#include "mainwindow.h" 29#include "mainwindow.h"
30 30
31#include <opie2/oapplicationfactory.h> 31#include <opie2/oapplicationfactory.h>
32 32
33using namespace Opie::Core;
33OPIE_EXPORT_APP( OApplicationFactory<MainWindow> ) 34OPIE_EXPORT_APP( OApplicationFactory<MainWindow> )
diff --git a/noncore/settings/netsystemtime/mainwindow.cpp b/noncore/settings/netsystemtime/mainwindow.cpp
index c995d6e..ba96f33 100644
--- a/noncore/settings/netsystemtime/mainwindow.cpp
+++ b/noncore/settings/netsystemtime/mainwindow.cpp
@@ -45,12 +45,14 @@
45#include <qlayout.h> 45#include <qlayout.h>
46#include <qmessagebox.h> 46#include <qmessagebox.h>
47#include <qsocket.h> 47#include <qsocket.h>
48#include <qstring.h> 48#include <qstring.h>
49#include <qtimer.h> 49#include <qtimer.h>
50 50
51using namespace Opie::Ui;
52using namespace Opie::Core;
51MainWindow::MainWindow( QWidget *parent , const char *name, bool modal, WFlags f ) 53MainWindow::MainWindow( QWidget *parent , const char *name, bool modal, WFlags f )
52 : QDialog( 0x0, 0x0, TRUE, 0 ) 54 : QDialog( 0x0, 0x0, TRUE, 0 )
53{ 55{
54 setCaption( tr( "SystemTime" ) ); 56 setCaption( tr( "SystemTime" ) );
55 57
56 QVBoxLayout *layout = new QVBoxLayout( this ); 58 QVBoxLayout *layout = new QVBoxLayout( this );
@@ -185,15 +187,15 @@ void MainWindow::runNTP()
185 ntpTab->addNtpOutput( output ); 187 ntpTab->addNtpOutput( output );
186 } 188 }
187 189
188 if ( !ntpProcess ) 190 if ( !ntpProcess )
189 { 191 {
190 ntpProcess = new OProcess(); 192 ntpProcess = new OProcess();
191 connect( ntpProcess, SIGNAL(receivedStdout(OProcess*,char*,int)), 193 connect( ntpProcess, SIGNAL(receivedStdout(Opie::Core::OProcess*,char*,int)),
192 this, SLOT(slotNtpOutput(OProcess*,char*,int)) ); 194 this, SLOT(slotNtpOutput(OProcess*,char*,int)) );
193 connect( ntpProcess, SIGNAL(processExited(OProcess*)), 195 connect( ntpProcess, SIGNAL(processExited(Opie::Core::OProcess*)),
194 this, SLOT(slotNtpFinished(OProcess*)) ); 196 this, SLOT(slotNtpFinished(OProcess*)) );
195 } 197 }
196 198
197 else 199 else
198 ntpProcess->clearArguments(); 200 ntpProcess->clearArguments();
199 201
diff --git a/noncore/settings/netsystemtime/mainwindow.h b/noncore/settings/netsystemtime/mainwindow.h
index d4a9713..8701803 100644
--- a/noncore/settings/netsystemtime/mainwindow.h
+++ b/noncore/settings/netsystemtime/mainwindow.h
@@ -37,13 +37,12 @@
37class TimeTabWidget; 37class TimeTabWidget;
38class FormatTabWidget; 38class FormatTabWidget;
39class SettingsTabWidget; 39class SettingsTabWidget;
40class NTPTabWidget; 40class NTPTabWidget;
41class PredictTabWidget; 41class PredictTabWidget;
42 42
43using Opie::OTabWidget;
44 43
45class QDateTime; 44class QDateTime;
46class QSocket; 45class QSocket;
47class QTimer; 46class QTimer;
48 47
49class MainWindow : public QDialog 48class MainWindow : public QDialog
@@ -57,24 +56,24 @@ public:
57 56
58protected: 57protected:
59 void accept(); 58 void accept();
60 void reject(); 59 void reject();
61 60
62private: 61private:
63 OTabWidget *mainWidget; 62 Opie::Ui::OTabWidget *mainWidget;
64 63
65 TimeTabWidget *timeTab; 64 TimeTabWidget *timeTab;
66 FormatTabWidget *formatTab; 65 FormatTabWidget *formatTab;
67 SettingsTabWidget *settingsTab; 66 SettingsTabWidget *settingsTab;
68 NTPTabWidget *ntpTab; 67 NTPTabWidget *ntpTab;
69 PredictTabWidget *predictTab; 68 PredictTabWidget *predictTab;
70 69
71 bool ntpTabEnabled; 70 bool ntpTabEnabled;
72 bool predictTabEnabled; 71 bool predictTabEnabled;
73 72
74 OProcess *ntpProcess; 73 Opie::Core::OProcess *ntpProcess;
75 QTimer *ntpTimer; 74 QTimer *ntpTimer;
76 QSocket *ntpSock; 75 QSocket *ntpSock;
77 int ntpDelay; 76 int ntpDelay;
78 bool ntpInteractive; 77 bool ntpInteractive;
79 QString ntpOutput; 78 QString ntpOutput;
80 int _lookupDiff; 79 int _lookupDiff;
@@ -87,13 +86,13 @@ private slots:
87 void slotQCopReceive( const QCString &, const QByteArray & ); 86 void slotQCopReceive( const QCString &, const QByteArray & );
88 void slotDisplayNTPTab( bool ); 87 void slotDisplayNTPTab( bool );
89 void slotDisplayPredictTab( bool ); 88 void slotDisplayPredictTab( bool );
90 void slotGetNTPTime(); 89 void slotGetNTPTime();
91 void slotTimerGetNTPTime(); 90 void slotTimerGetNTPTime();
92 void slotProbeNTPServer(); 91 void slotProbeNTPServer();
93 void slotNtpOutput( OProcess *, char *, int ); 92 void slotNtpOutput( Opie::Core::OProcess *, char *, int );
94 void slotNtpFinished( OProcess* ); 93 void slotNtpFinished( Opie::Core::OProcess* );
95 void slotNTPDelayChanged( int ); 94 void slotNTPDelayChanged( int );
96 void slotCheckNtp( int ); 95 void slotCheckNtp( int );
97}; 96};
98 97
99#endif 98#endif