Diffstat (limited to 'noncore/settings/netsystemtime/mainwindow.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/netsystemtime/mainwindow.h | 75 |
1 files changed, 39 insertions, 36 deletions
diff --git a/noncore/settings/netsystemtime/mainwindow.h b/noncore/settings/netsystemtime/mainwindow.h index 1cdbc1a..d4a9713 100644 --- a/noncore/settings/netsystemtime/mainwindow.h +++ b/noncore/settings/netsystemtime/mainwindow.h | |||
@@ -30,67 +30,70 @@ | |||
30 | #define MAINWINDOW_H | 30 | #define MAINWINDOW_H |
31 | 31 | ||
32 | #include <qdialog.h> | 32 | #include <qdialog.h> |
33 | 33 | ||
34 | #include <opie2/oprocess.h> | ||
35 | #include <opie2/otabwidget.h> | ||
36 | |||
34 | class TimeTabWidget; | 37 | class TimeTabWidget; |
35 | class FormatTabWidget; | 38 | class FormatTabWidget; |
36 | class SettingsTabWidget; | 39 | class SettingsTabWidget; |
37 | class NTPTabWidget; | 40 | class NTPTabWidget; |
38 | class PredictTabWidget; | 41 | class PredictTabWidget; |
39 | 42 | ||
40 | class OProcess; | 43 | using Opie::OTabWidget; |
41 | class OTabWidget; | 44 | |
42 | class QDateTime; | 45 | class QDateTime; |
43 | class QSocket; | 46 | class QSocket; |
44 | class QTimer; | 47 | class QTimer; |
45 | 48 | ||
46 | class MainWindow : public QDialog | 49 | class MainWindow : public QDialog |
47 | { | 50 | { |
48 | Q_OBJECT | 51 | Q_OBJECT |
49 | 52 | ||
50 | public: | 53 | public: |
51 | MainWindow( QWidget *parent = 0, const char *name = 0, bool modal = FALSE,WFlags f = 0); | 54 | MainWindow( QWidget *parent = 0, const char *name = 0, bool modal = FALSE,WFlags f = 0); |
52 | ~MainWindow(); | 55 | ~MainWindow(); |
53 | static QString appName() { return QString::fromLatin1("systemtime"); } | 56 | static QString appName() { return QString::fromLatin1("systemtime"); } |
54 | 57 | ||
55 | protected: | 58 | protected: |
56 | void accept(); | 59 | void accept(); |
57 | void reject(); | 60 | void reject(); |
58 | 61 | ||
59 | private: | 62 | private: |
60 | OTabWidget *mainWidget; | 63 | OTabWidget *mainWidget; |
61 | 64 | ||
62 | TimeTabWidget *timeTab; | 65 | TimeTabWidget *timeTab; |
63 | FormatTabWidget *formatTab; | 66 | FormatTabWidget *formatTab; |
64 | SettingsTabWidget *settingsTab; | 67 | SettingsTabWidget *settingsTab; |
65 | NTPTabWidget *ntpTab; | 68 | NTPTabWidget *ntpTab; |
66 | PredictTabWidget *predictTab; | 69 | PredictTabWidget *predictTab; |
67 | 70 | ||
68 | bool ntpTabEnabled; | 71 | bool ntpTabEnabled; |
69 | bool predictTabEnabled; | 72 | bool predictTabEnabled; |
70 | 73 | ||
71 | OProcess *ntpProcess; | 74 | OProcess *ntpProcess; |
72 | QTimer *ntpTimer; | 75 | QTimer *ntpTimer; |
73 | QSocket *ntpSock; | 76 | QSocket *ntpSock; |
74 | int ntpDelay; | 77 | int ntpDelay; |
75 | bool ntpInteractive; | 78 | bool ntpInteractive; |
76 | QString ntpOutput; | 79 | QString ntpOutput; |
77 | int _lookupDiff; | 80 | int _lookupDiff; |
78 | 81 | ||
79 | void runNTP(); | 82 | void runNTP(); |
80 | bool ntpDelayElapsed(); | 83 | bool ntpDelayElapsed(); |
81 | 84 | ||
82 | private slots: | 85 | private slots: |
83 | void slotSetTime( const QDateTime & ); | 86 | void slotSetTime( const QDateTime & ); |
84 | void slotQCopReceive( const QCString &, const QByteArray & ); | 87 | void slotQCopReceive( const QCString &, const QByteArray & ); |
85 | void slotDisplayNTPTab( bool ); | 88 | void slotDisplayNTPTab( bool ); |
86 | void slotDisplayPredictTab( bool ); | 89 | void slotDisplayPredictTab( bool ); |
87 | void slotGetNTPTime(); | 90 | void slotGetNTPTime(); |
88 | void slotTimerGetNTPTime(); | 91 | void slotTimerGetNTPTime(); |
89 | void slotProbeNTPServer(); | 92 | void slotProbeNTPServer(); |
90 | void slotNtpOutput( OProcess *, char *, int ); | 93 | void slotNtpOutput( OProcess *, char *, int ); |
91 | void slotNtpFinished( OProcess* ); | 94 | void slotNtpFinished( OProcess* ); |
92 | void slotNTPDelayChanged( int ); | 95 | void slotNTPDelayChanged( int ); |
93 | void slotCheckNtp( int ); | 96 | void slotCheckNtp( int ); |
94 | }; | 97 | }; |
95 | 98 | ||
96 | #endif | 99 | #endif |