Diffstat (limited to 'noncore/settings/netsystemtime') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/netsystemtime/main.cpp | 10 | ||||
-rw-r--r-- | noncore/settings/netsystemtime/mainwindow.cpp | 11 | ||||
-rw-r--r-- | noncore/settings/netsystemtime/mainwindow.h | 3 | ||||
-rw-r--r-- | noncore/settings/netsystemtime/netsystemtime.pro | 7 |
4 files changed, 12 insertions, 19 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 | |||
@@ -29,13 +29,7 @@ | |||
29 | #include "mainwindow.h" | 29 | #include "mainwindow.h" |
30 | 30 | ||
31 | #include <qpe/qpeapplication.h> | 31 | #include <qpe/qpeapplication.h> |
32 | #include <opie/oapplicationfactory.h> | ||
32 | 33 | ||
33 | int main( int argc, char ** argv ) | ||
34 | { | ||
35 | QPEApplication a( argc, argv ); | ||
36 | 34 | ||
37 | MainWindow mw; | 35 | OPIE_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 | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <qpe/config.h> | 39 | #include <qpe/config.h> |
40 | #include <qpe/datebookdb.h> | 40 | #include <qpe/datebookdb.h> |
41 | #include <qpe/qpeapplication.h> | 41 | #include <qpe/qpeapplication.h> |
42 | #include <qpe/qpedialog.h> | ||
42 | 43 | ||
43 | #if ( defined Q_WS_QWS || defined(_WS_QWS_) ) && !defined(QT_NO_COP) | 44 | #if ( defined Q_WS_QWS || defined(_WS_QWS_) ) && !defined(QT_NO_COP) |
44 | #include <qpe/qcopenvelope_qws.h> | 45 | #include <qpe/qcopenvelope_qws.h> |
@@ -50,7 +51,7 @@ | |||
50 | #include <qstring.h> | 51 | #include <qstring.h> |
51 | #include <qtimer.h> | 52 | #include <qtimer.h> |
52 | 53 | ||
53 | MainWindow::MainWindow() | 54 | MainWindow::MainWindow( QWidget *parent , const char *name, bool modal, WFlags f ) |
54 | : QDialog( 0x0, 0x0, TRUE, 0 ) | 55 | : QDialog( 0x0, 0x0, TRUE, 0 ) |
55 | { | 56 | { |
56 | setCaption( tr( "SystemTime" ) ); | 57 | setCaption( tr( "SystemTime" ) ); |
@@ -79,11 +80,10 @@ MainWindow::MainWindow() | |||
79 | mainWidget->setCurrentTab( tr( "Time" ) ); | 80 | mainWidget->setCurrentTab( tr( "Time" ) ); |
80 | layout->addWidget( mainWidget ); | 81 | layout->addWidget( mainWidget ); |
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 | connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), | ||
85 | this, SLOT(slotQCopReceive(const QCString&, const QByteArray&)) ); | 84 | this, SLOT(slotQCopReceive(const QCString&, const QByteArray&)) ); |
86 | 85 | ||
86 | |||
87 | // Create NTP socket | 87 | // Create NTP socket |
88 | ntpSock = new QSocket( this ); | 88 | ntpSock = new QSocket( this ); |
89 | connect( ntpSock, SIGNAL(error(int)),SLOT(slotCheckNtp(int)) ); | 89 | connect( ntpSock, SIGNAL(error(int)),SLOT(slotCheckNtp(int)) ); |
@@ -110,7 +110,8 @@ MainWindow::MainWindow() | |||
110 | slotCheckNtp( -1 ); | 110 | slotCheckNtp( -1 ); |
111 | 111 | ||
112 | // Display app | 112 | // Display app |
113 | showMaximized(); | 113 | //showMaximized(); |
114 | (void)new QPEDialogListener(this); | ||
114 | } | 115 | } |
115 | 116 | ||
116 | MainWindow::~MainWindow() | 117 | MainWindow::~MainWindow() |
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 | |||
@@ -48,8 +48,9 @@ class MainWindow : public QDialog | |||
48 | Q_OBJECT | 48 | Q_OBJECT |
49 | 49 | ||
50 | public: | 50 | public: |
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 | ||
54 | protected: | 55 | protected: |
55 | void accept(); | 56 | void accept(); |
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,6 +1,4 @@ | |||
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 \ |
5 | timetabwidget.h \ | 3 | timetabwidget.h \ |
6 | formattabwidget.h \ | 4 | formattabwidget.h \ |
@@ -17,8 +15,7 @@ SOURCES = main.cpp \ | |||
17 | INCLUDEPATH+= $(OPIEDIR)/include | 15 | INCLUDEPATH+= $(OPIEDIR)/include |
18 | DEPENDPATH+= $(OPIEDIR)/include | 16 | DEPENDPATH+= $(OPIEDIR)/include |
19 | LIBS += -lqpe -lopie | 17 | LIBS += -lqpe -lopie |
20 | INTERFACES= | 18 | |
21 | DESTDIR = $(OPIEDIR)/bin | ||
22 | TARGET = systemtime | 19 | TARGET = systemtime |
23 | 20 | ||
24 | TRANSLATIONS = ../../../i18n/de/systemtime.ts \ | 21 | TRANSLATIONS = ../../../i18n/de/systemtime.ts \ |