summaryrefslogtreecommitdiff
path: root/noncore/settings/netsystemtime
authormickeyl <mickeyl>2003-10-29 17:22:08 (UTC)
committer mickeyl <mickeyl>2003-10-29 17:22:08 (UTC)
commit35615947e11575a61456c8483e7f6d67fe59d5ed (patch) (unidiff)
tree89f834a50b5070767ca0f9c8a90d044f075a9131 /noncore/settings/netsystemtime
parent80fc44ae81d88c4cee5ea160818881acb2422a62 (diff)
downloadopie-35615947e11575a61456c8483e7f6d67fe59d5ed.zip
opie-35615947e11575a61456c8483e7f6d67fe59d5ed.tar.gz
opie-35615947e11575a61456c8483e7f6d67fe59d5ed.tar.bz2
merge noncore/settings/* except networksettings for which tille volunteered (thanks)
Diffstat (limited to 'noncore/settings/netsystemtime') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/netsystemtime/main.cpp10
-rw-r--r--noncore/settings/netsystemtime/mainwindow.cpp25
-rw-r--r--noncore/settings/netsystemtime/mainwindow.h3
-rw-r--r--noncore/settings/netsystemtime/netsystemtime.pro7
4 files changed, 19 insertions, 26 deletions
diff --git a/noncore/settings/netsystemtime/main.cpp b/noncore/settings/netsystemtime/main.cpp
index 4b20a61..da98eee 100644
--- a/noncore/settings/netsystemtime/main.cpp
+++ b/noncore/settings/netsystemtime/main.cpp
@@ -31,11 +31,5 @@
31#include <qpe/qpeapplication.h> 31#include <qpe/qpeapplication.h>
32#include <opie/oapplicationfactory.h>
32 33
33int main( int argc, char ** argv )
34{
35 QPEApplication a( argc, argv );
36 34
37 MainWindow mw; 35OPIE_EXPORT_APP( OApplicationFactory<MainWindow> )
38 a.showMainWidget( &mw );
39
40 return a.exec();
41}
diff --git a/noncore/settings/netsystemtime/mainwindow.cpp b/noncore/settings/netsystemtime/mainwindow.cpp
index 2d240ba..66e1ca3 100644
--- a/noncore/settings/netsystemtime/mainwindow.cpp
+++ b/noncore/settings/netsystemtime/mainwindow.cpp
@@ -41,2 +41,3 @@
41#include <qpe/qpeapplication.h> 41#include <qpe/qpeapplication.h>
42#include <qpe/qpedialog.h>
42 43
@@ -52,3 +53,3 @@
52 53
53MainWindow::MainWindow() 54MainWindow::MainWindow( QWidget *parent , const char *name, bool modal, WFlags f )
54 : QDialog( 0x0, 0x0, TRUE, 0 ) 55 : QDialog( 0x0, 0x0, TRUE, 0 )
@@ -68,3 +69,3 @@ MainWindow::MainWindow()
68 69
69 // Add tab widgets 70 // Add tab widgets
70 mainWidget->addTab( timeTab = new TimeTabWidget( mainWidget ), "netsystemtime/DateTime", tr( "Time" ) ); 71 mainWidget->addTab( timeTab = new TimeTabWidget( mainWidget ), "netsystemtime/DateTime", tr( "Time" ) );
@@ -81,6 +82,5 @@ MainWindow::MainWindow()
81 82
82 // Create QCOP channel 83 connect( qApp, SIGNAL(appMessage(const QCString&, const QByteArray&)),
83 QCopChannel *channel = new QCopChannel( "QPE/Application/netsystemtime", this ); 84 this, SLOT(slotQCopReceive(const QCString&, const QByteArray&)) );
84 connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), 85
85 this, SLOT(slotQCopReceive(const QCString&, const QByteArray&)) );
86 86
@@ -112,3 +112,4 @@ MainWindow::MainWindow()
112 // Display app 112 // Display app
113 showMaximized(); 113 //showMaximized();
114 (void)new QPEDialogListener(this);
114} 115}
@@ -167,3 +168,3 @@ void MainWindow::runNTP()
167 QString msg = tr( "You asked for a delay of %1 minutes, but only %2 minutes elapsed since last lookup.<br>Continue?" ).arg( QString::number( ntpDelay ) ).arg( QString::number( _lookupDiff / 60 ) ); 168 QString msg = tr( "You asked for a delay of %1 minutes, but only %2 minutes elapsed since last lookup.<br>Continue?" ).arg( QString::number( ntpDelay ) ).arg( QString::number( _lookupDiff / 60 ) );
168 169
169 switch ( 170 switch (
@@ -200,4 +201,4 @@ void MainWindow::runNTP()
200 ntpProcess->clearArguments(); 201 ntpProcess->clearArguments();
201 202
202 *ntpProcess << "ntpdate" << srv; 203 *ntpProcess << "ntpdate" << srv;
203 bool ret = ntpProcess->start( OProcess::NotifyOnExit, OProcess::AllOutput ); 204 bool ret = ntpProcess->start( OProcess::NotifyOnExit, OProcess::AllOutput );
@@ -299,3 +300,3 @@ void MainWindow::slotNtpFinished( OProcess *p )
299 QDateTime dt = QDateTime::currentDateTime(); 300 QDateTime dt = QDateTime::currentDateTime();
300 301
301 // Verify run was successful 302 // Verify run was successful
@@ -340,3 +341,3 @@ void MainWindow::slotNtpFinished( OProcess *p )
340 output = tr( "%1 seconds").arg(QString::number( timeShift )); 341 output = tr( "%1 seconds").arg(QString::number( timeShift ));
341 342
342 // Display information on time server tab 343 // Display information on time server tab
diff --git a/noncore/settings/netsystemtime/mainwindow.h b/noncore/settings/netsystemtime/mainwindow.h
index fa94335..1cdbc1a 100644
--- a/noncore/settings/netsystemtime/mainwindow.h
+++ b/noncore/settings/netsystemtime/mainwindow.h
@@ -50,4 +50,5 @@ class MainWindow : public QDialog
50public: 50public:
51 MainWindow(); 51 MainWindow( QWidget *parent = 0, const char *name = 0, bool modal = FALSE,WFlags f = 0);
52 ~MainWindow(); 52 ~MainWindow();
53 static QString appName() { return QString::fromLatin1("systemtime"); }
53 54
diff --git a/noncore/settings/netsystemtime/netsystemtime.pro b/noncore/settings/netsystemtime/netsystemtime.pro
index 7a12dd1..2140f2e 100644
--- a/noncore/settings/netsystemtime/netsystemtime.pro
+++ b/noncore/settings/netsystemtime/netsystemtime.pro
@@ -1,4 +1,2 @@
1 TEMPLATE= app 1 CONFIG = qt warn_on release quick-app
2 CONFIG = qt warn_on debug
3 #CONFIG = qt warn_on release
4 HEADERS = mainwindow.h \ 2 HEADERS = mainwindow.h \
@@ -19,4 +17,3 @@ DEPENDPATH += $(OPIEDIR)/include
19 LIBS += -lqpe -lopie 17 LIBS += -lqpe -lopie
20 INTERFACES= 18
21 DESTDIR = $(OPIEDIR)/bin
22 TARGET = systemtime 19 TARGET = systemtime