summaryrefslogtreecommitdiff
path: root/noncore/settings/netsystemtime
Side-by-side diff
Diffstat (limited to 'noncore/settings/netsystemtime') (more/less context) (show 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
@@ -21,13 +21,14 @@
 -.   .:....=;==+<; 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.
*/
#include "mainwindow.h"
#include <opie2/oapplicationfactory.h>
+using namespace Opie::Core;
OPIE_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
@@ -39,24 +39,26 @@
#include <qpe/qpedialog.h>
#if ( defined Q_WS_QWS || defined(_WS_QWS_) ) && !defined(QT_NO_COP)
#include <qpe/qcopenvelope_qws.h>
#endif
#include <qlayout.h>
#include <qmessagebox.h>
#include <qsocket.h>
#include <qstring.h>
#include <qtimer.h>
+using namespace Opie::Ui;
+using namespace Opie::Core;
MainWindow::MainWindow( QWidget *parent , const char *name, bool modal, WFlags f )
: QDialog( 0x0, 0x0, TRUE, 0 )
{
setCaption( tr( "SystemTime" ) );
QVBoxLayout *layout = new QVBoxLayout( this );
layout->setMargin( 2 );
layout->setSpacing( 4 );
// Create main tabbed control
mainWidget = new OTabWidget( this );
@@ -179,27 +181,27 @@ void MainWindow::runNTP()
// Send information to time server tab if enabled
if ( ntpTabEnabled )
{
ntpTab->setStartTime( QDateTime::currentDateTime().toString() );
QString output = tr( "Running:\nntpdate " );
output.append( srv );
ntpTab->addNtpOutput( output );
}
if ( !ntpProcess )
{
ntpProcess = new OProcess();
- connect( ntpProcess, SIGNAL(receivedStdout(OProcess*,char*,int)),
+ connect( ntpProcess, SIGNAL(receivedStdout(Opie::Core::OProcess*,char*,int)),
this, SLOT(slotNtpOutput(OProcess*,char*,int)) );
- connect( ntpProcess, SIGNAL(processExited(OProcess*)),
+ connect( ntpProcess, SIGNAL(processExited(Opie::Core::OProcess*)),
this, SLOT(slotNtpFinished(OProcess*)) );
}
else
ntpProcess->clearArguments();
*ntpProcess << "ntpdate" << srv;
bool ret = ntpProcess->start( OProcess::NotifyOnExit, OProcess::AllOutput );
if ( !ret )
{
QMessageBox::critical( this, tr( "Error" ), tr( "Error while getting time from network." ) );
if ( ntpTabEnabled )
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
@@ -31,69 +31,68 @@
#include <qdialog.h>
#include <opie2/oprocess.h>
#include <opie2/otabwidget.h>
class TimeTabWidget;
class FormatTabWidget;
class SettingsTabWidget;
class NTPTabWidget;
class PredictTabWidget;
-using Opie::OTabWidget;
class QDateTime;
class QSocket;
class QTimer;
class MainWindow : public QDialog
{
Q_OBJECT
public:
MainWindow( QWidget *parent = 0, const char *name = 0, bool modal = FALSE,WFlags f = 0);
~MainWindow();
static QString appName() { return QString::fromLatin1("systemtime"); }
protected:
void accept();
void reject();
private:
- OTabWidget *mainWidget;
+ Opie::Ui::OTabWidget *mainWidget;
TimeTabWidget *timeTab;
FormatTabWidget *formatTab;
SettingsTabWidget *settingsTab;
NTPTabWidget *ntpTab;
PredictTabWidget *predictTab;
bool ntpTabEnabled;
bool predictTabEnabled;
- OProcess *ntpProcess;
+ Opie::Core::OProcess *ntpProcess;
QTimer *ntpTimer;
QSocket *ntpSock;
int ntpDelay;
bool ntpInteractive;
QString ntpOutput;
int _lookupDiff;
void runNTP();
bool ntpDelayElapsed();
private slots:
void slotSetTime( const QDateTime & );
void slotQCopReceive( const QCString &, const QByteArray & );
void slotDisplayNTPTab( bool );
void slotDisplayPredictTab( bool );
void slotGetNTPTime();
void slotTimerGetNTPTime();
void slotProbeNTPServer();
- void slotNtpOutput( OProcess *, char *, int );
- void slotNtpFinished( OProcess* );
+ void slotNtpOutput( Opie::Core::OProcess *, char *, int );
+ void slotNtpFinished( Opie::Core::OProcess* );
void slotNTPDelayChanged( int );
void slotCheckNtp( int );
};
#endif