Diffstat (limited to 'noncore/settings/netsystemtime') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/netsystemtime/main.cpp | 10 | ||||
-rw-r--r-- | noncore/settings/netsystemtime/mainwindow.cpp | 25 | ||||
-rw-r--r-- | noncore/settings/netsystemtime/mainwindow.h | 3 | ||||
-rw-r--r-- | noncore/settings/netsystemtime/netsystemtime.pro | 7 |
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 @@ #include <qpe/qpeapplication.h> +#include <opie/oapplicationfactory.h> -int main( int argc, char ** argv ) -{ - QPEApplication a( argc, argv ); - MainWindow mw; - a.showMainWidget( &mw ); - - return a.exec(); -} +OPIE_EXPORT_APP( OApplicationFactory<MainWindow> ) 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 @@ #include <qpe/qpeapplication.h> +#include <qpe/qpedialog.h> @@ -52,3 +53,3 @@ -MainWindow::MainWindow() +MainWindow::MainWindow( QWidget *parent , const char *name, bool modal, WFlags f ) : QDialog( 0x0, 0x0, TRUE, 0 ) @@ -68,3 +69,3 @@ MainWindow::MainWindow() - // Add tab widgets + // Add tab widgets mainWidget->addTab( timeTab = new TimeTabWidget( mainWidget ), "netsystemtime/DateTime", tr( "Time" ) ); @@ -81,6 +82,5 @@ MainWindow::MainWindow() - // Create QCOP channel - QCopChannel *channel = new QCopChannel( "QPE/Application/netsystemtime", this ); - connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), - this, SLOT(slotQCopReceive(const QCString&, const QByteArray&)) ); + connect( qApp, SIGNAL(appMessage(const QCString&, const QByteArray&)), + this, SLOT(slotQCopReceive(const QCString&, const QByteArray&)) ); + @@ -112,3 +112,4 @@ MainWindow::MainWindow() // Display app - showMaximized(); + //showMaximized(); + (void)new QPEDialogListener(this); } @@ -167,3 +168,3 @@ void MainWindow::runNTP() 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 ) ); - + switch ( @@ -200,4 +201,4 @@ void MainWindow::runNTP() ntpProcess->clearArguments(); - - *ntpProcess << "ntpdate" << srv; + + *ntpProcess << "ntpdate" << srv; bool ret = ntpProcess->start( OProcess::NotifyOnExit, OProcess::AllOutput ); @@ -299,3 +300,3 @@ void MainWindow::slotNtpFinished( OProcess *p ) QDateTime dt = QDateTime::currentDateTime(); - + // Verify run was successful @@ -340,3 +341,3 @@ void MainWindow::slotNtpFinished( OProcess *p ) output = tr( "%1 seconds").arg(QString::number( timeShift )); - + // 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 public: - MainWindow(); + MainWindow( QWidget *parent = 0, const char *name = 0, bool modal = FALSE,WFlags f = 0); ~MainWindow(); + static QString appName() { return QString::fromLatin1("systemtime"); } 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 @@ -TEMPLATE = app -CONFIG = qt warn_on debug -#CONFIG = qt warn_on release +CONFIG = qt warn_on release quick-app HEADERS = mainwindow.h \ @@ -19,4 +17,3 @@ DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe -lopie -INTERFACES = -DESTDIR = $(OPIEDIR)/bin + TARGET = systemtime |