-rw-r--r-- | noncore/settings/netsystemtime/formattabwidget.cpp | 50 | ||||
-rw-r--r-- | noncore/settings/netsystemtime/formattabwidget.h | 50 | ||||
-rw-r--r-- | noncore/settings/netsystemtime/main.cpp | 50 | ||||
-rw-r--r-- | noncore/settings/netsystemtime/mainwindow.cpp | 50 | ||||
-rw-r--r-- | noncore/settings/netsystemtime/mainwindow.h | 50 | ||||
-rw-r--r-- | noncore/settings/netsystemtime/ntptabwidget.cpp | 57 | ||||
-rw-r--r-- | noncore/settings/netsystemtime/ntptabwidget.h | 50 | ||||
-rw-r--r-- | noncore/settings/netsystemtime/predicttabwidget.cpp | 50 | ||||
-rw-r--r-- | noncore/settings/netsystemtime/predicttabwidget.h | 50 | ||||
-rw-r--r-- | noncore/settings/netsystemtime/settingstabwidget.cpp | 50 | ||||
-rw-r--r-- | noncore/settings/netsystemtime/settingstabwidget.h | 50 | ||||
-rw-r--r-- | noncore/settings/netsystemtime/timetabwidget.cpp | 62 | ||||
-rw-r--r-- | noncore/settings/netsystemtime/timetabwidget.h | 50 |
13 files changed, 351 insertions, 318 deletions
diff --git a/noncore/settings/netsystemtime/formattabwidget.cpp b/noncore/settings/netsystemtime/formattabwidget.cpp index 982305b..7d01bff 100644 --- a/noncore/settings/netsystemtime/formattabwidget.cpp +++ b/noncore/settings/netsystemtime/formattabwidget.cpp | |||
@@ -1,58 +1,60 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the OPIE Project | 2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project |
3 | =. | 3 | |
4 | .=l. Copyright (c) 2002 OPIE team <opie@handhelds.org?> | 4 | Copyright (C) Opie Team <opie-devel@handhelds.org> |
5 | .>+-= | 5 | =. |
6 | _;:, .> :=|. This file is free software; you can | 6 | .=l. |
7 | .> <`_, > . <= redistribute it and/or modify it under | 7 | Â Â Â Â Â Â .>+-= |
8 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can |
9 | .="- .-=="i, .._ License as published by the Free Software | 9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under |
10 | - . .-<_> .<> Foundation; either version 2 of the License, | 10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public |
11 | ._= =} : or (at your option) any later version. | 11 | .="- .-=="i, Â Â .._ License as published by the Free Software |
12 | .%`+i> _;_. | 12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, |
13 | .i_,=:_. -<s. This file is distributed in the hope that | 13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. |
14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 14 | Â Â .%`+i> Â Â Â _;_. |
15 | : .. .:, . . . without even the implied warranty of | 15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that |
16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; |
17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | 17 | : .. Â Â .:, Â Â . . . without even the implied warranty of |
18 | ..}^=.= = ; Public License for more details. | 18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | ++= -. .` .: | 19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU |
20 | : = ...= . :.=- You should have received a copy of the GNU | 20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more |
21 | -. .:....=;==+<; General Public License along with this file; | 21 | ++= Â -. Â Â .` Â Â .: details. |
22 | -_. . . )=. = see the file COPYING. If not, write to the | 22 | : Â Â = Â ...= . :.=- |
23 | -- :-=` Free Software Foundation, Inc., | 23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU |
24 | 59 Temple Place - Suite 330, | 24 | Â -_. . . Â )=. Â = Library General Public License along with |
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
25 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
26 | |||
27 | */ | 29 | */ |
28 | 30 | ||
29 | #include "formattabwidget.h" | 31 | #include "formattabwidget.h" |
30 | 32 | ||
31 | #include <qpe/config.h> | 33 | #include <qpe/config.h> |
32 | 34 | ||
33 | #if ( defined Q_WS_QWS || defined(_WS_QWS_) ) && !defined(QT_NO_COP) | 35 | #if ( defined Q_WS_QWS || defined(_WS_QWS_) ) && !defined(QT_NO_COP) |
34 | #include <qpe/qcopenvelope_qws.h> | 36 | #include <qpe/qcopenvelope_qws.h> |
35 | #endif | 37 | #endif |
36 | 38 | ||
37 | #include <qcombobox.h> | 39 | #include <qcombobox.h> |
38 | #include <qlabel.h> | 40 | #include <qlabel.h> |
39 | #include <qlayout.h> | 41 | #include <qlayout.h> |
40 | #include <qscrollview.h> | 42 | #include <qscrollview.h> |
41 | #include <qtimer.h> | 43 | #include <qtimer.h> |
42 | 44 | ||
43 | FormatTabWidget::FormatTabWidget( QWidget *parent ) | 45 | FormatTabWidget::FormatTabWidget( QWidget *parent ) |
44 | : QWidget( parent, 0x0, 0 ) | 46 | : QWidget( parent, 0x0, 0 ) |
45 | { | 47 | { |
46 | QVBoxLayout *tmpvb = new QVBoxLayout( this ); | 48 | QVBoxLayout *tmpvb = new QVBoxLayout( this ); |
47 | QScrollView *sv = new QScrollView( this ); | 49 | QScrollView *sv = new QScrollView( this ); |
48 | tmpvb->addWidget( sv, 0, 0 ); | 50 | tmpvb->addWidget( sv, 0, 0 ); |
49 | sv->setResizePolicy( QScrollView::AutoOneFit ); | 51 | sv->setResizePolicy( QScrollView::AutoOneFit ); |
50 | sv->setFrameStyle( QFrame::NoFrame ); | 52 | sv->setFrameStyle( QFrame::NoFrame ); |
51 | QWidget *container = new QWidget( sv->viewport() ); | 53 | QWidget *container = new QWidget( sv->viewport() ); |
52 | sv->addChild( container ); | 54 | sv->addChild( container ); |
53 | 55 | ||
54 | QGridLayout *layout = new QGridLayout( container ); | 56 | QGridLayout *layout = new QGridLayout( container ); |
55 | layout->setMargin( 2 ); | 57 | layout->setMargin( 2 ); |
56 | layout->setSpacing( 4 ); | 58 | layout->setSpacing( 4 ); |
57 | 59 | ||
58 | // Time format selector | 60 | // Time format selector |
diff --git a/noncore/settings/netsystemtime/formattabwidget.h b/noncore/settings/netsystemtime/formattabwidget.h index e4073e7..171cd5f 100644 --- a/noncore/settings/netsystemtime/formattabwidget.h +++ b/noncore/settings/netsystemtime/formattabwidget.h | |||
@@ -1,58 +1,60 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the OPIE Project | 2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project |
3 | =. | ||
4 | .=l. Copyright (c) 2002 OPIE team <opie@handhelds.org?> | ||
5 | .>+-= | ||
6 | _;:, .> :=|. This file is free software; you can | ||
7 | .> <`_, > . <= redistribute it and/or modify it under | ||
8 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | ||
9 | .="- .-=="i, .._ License as published by the Free Software | ||
10 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
11 | ._= =} : or (at your option) any later version. | ||
12 | .%`+i> _;_. | ||
13 | .i_,=:_. -<s. This file is distributed in the hope that | ||
14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
15 | : .. .:, . . . without even the implied warranty of | ||
16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
18 | ..}^=.= = ; Public License for more details. | ||
19 | ++= -. .` .: | ||
20 | : = ...= . :.=- You should have received a copy of the GNU | ||
21 | -. .:....=;==+<; General Public License along with this file; | ||
22 | -_. . . )=. = see the file COPYING. If not, write to the | ||
23 | -- :-=` Free Software Foundation, Inc., | ||
24 | 59 Temple Place - Suite 330, | ||
25 | Boston, MA 02111-1307, USA. | ||
26 | 3 | ||
4 | Copyright (C) Opie Team <opie-devel@handhelds.org> | ||
5 | =. | ||
6 | .=l. | ||
7 | Â Â Â Â Â Â .>+-= | ||
8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can | ||
9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, Â Â .._ License as published by the Free Software | ||
12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, | ||
13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. | ||
14 | Â Â .%`+i> Â Â Â _;_. | ||
15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that | ||
16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; | ||
17 | : .. Â Â .:, Â Â . . . without even the implied warranty of | ||
18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A | ||
19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU | ||
20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more | ||
21 | ++= Â -. Â Â .` Â Â .: details. | ||
22 | : Â Â = Â ...= . :.=- | ||
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
27 | */ | 29 | */ |
28 | 30 | ||
29 | #ifndef FORMATTABWIDGET_H | 31 | #ifndef FORMATTABWIDGET_H |
30 | #define FORMATTABWIDGET_H | 32 | #define FORMATTABWIDGET_H |
31 | 33 | ||
32 | #include <qpe/timestring.h> | 34 | #include <qpe/timestring.h> |
33 | 35 | ||
34 | #include <qwidget.h> | 36 | #include <qwidget.h> |
35 | 37 | ||
36 | class QComboBox; | 38 | class QComboBox; |
37 | 39 | ||
38 | class FormatTabWidget : public QWidget | 40 | class FormatTabWidget : public QWidget |
39 | { | 41 | { |
40 | Q_OBJECT | 42 | Q_OBJECT |
41 | 43 | ||
42 | public: | 44 | public: |
43 | FormatTabWidget( QWidget * = 0x0 ); | 45 | FormatTabWidget( QWidget * = 0x0 ); |
44 | ~FormatTabWidget(); | 46 | ~FormatTabWidget(); |
45 | 47 | ||
46 | void saveSettings( bool ); | 48 | void saveSettings( bool ); |
47 | 49 | ||
48 | private: | 50 | private: |
49 | QComboBox *cbAmpm; | 51 | QComboBox *cbAmpm; |
50 | QComboBox *cbWeekStart; | 52 | QComboBox *cbWeekStart; |
51 | QComboBox *cbDateFormat; | 53 | QComboBox *cbDateFormat; |
52 | QComboBox *cbAppletFormat; | 54 | QComboBox *cbAppletFormat; |
53 | DateFormat date_formats[4]; | 55 | DateFormat date_formats[4]; |
54 | 56 | ||
55 | signals: | 57 | signals: |
56 | void show12HourTime( int ); | 58 | void show12HourTime( int ); |
57 | void dateFormatChanged( const DateFormat & ); | 59 | void dateFormatChanged( const DateFormat & ); |
58 | void weekStartChanged( int ); | 60 | void weekStartChanged( int ); |
diff --git a/noncore/settings/netsystemtime/main.cpp b/noncore/settings/netsystemtime/main.cpp index dbcdc17..ef1bc8e 100644 --- a/noncore/settings/netsystemtime/main.cpp +++ b/noncore/settings/netsystemtime/main.cpp | |||
@@ -1,34 +1,36 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the OPIE Project | 2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project |
3 | =. | ||
4 | .=l. Copyright (c) 2002 OPIE team <opie@handhelds.org?> | ||
5 | .>+-= | ||
6 | _;:, .> :=|. This file is free software; you can | ||
7 | .> <`_, > . <= redistribute it and/or modify it under | ||
8 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | ||
9 | .="- .-=="i, .._ License as published by the Free Software | ||
10 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
11 | ._= =} : or (at your option) any later version. | ||
12 | .%`+i> _;_. | ||
13 | .i_,=:_. -<s. This file is distributed in the hope that | ||
14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
15 | : .. .:, . . . without even the implied warranty of | ||
16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
18 | ..}^=.= = ; Public License for more details. | ||
19 | ++= -. .` .: | ||
20 | : = ...= . :.=- You should have received a copy of the GNU | ||
21 | -. .:....=;==+<; General Public License along with this file; | ||
22 | -_. . . )=. = see the file COPYING. If not, write to the | ||
23 | -- :-=` Free Software Foundation, Inc., | ||
24 | 59 Temple Place - Suite 330, | ||
25 | Boston, MA 02111-1307, USA. | ||
26 | 3 | ||
4 | Copyright (C) Opie Team <opie-devel@handhelds.org> | ||
5 | =. | ||
6 | .=l. | ||
7 | Â Â Â Â Â Â .>+-= | ||
8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can | ||
9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, Â Â .._ License as published by the Free Software | ||
12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, | ||
13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. | ||
14 | Â Â .%`+i> Â Â Â _;_. | ||
15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that | ||
16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; | ||
17 | : .. Â Â .:, Â Â . . . without even the implied warranty of | ||
18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A | ||
19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU | ||
20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more | ||
21 | ++= Â -. Â Â .` Â Â .: details. | ||
22 | : Â Â = Â ...= . :.=- | ||
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
27 | */ | 29 | */ |
28 | 30 | ||
29 | #include "mainwindow.h" | 31 | #include "mainwindow.h" |
30 | 32 | ||
31 | #include <opie2/oapplicationfactory.h> | 33 | #include <opie2/oapplicationfactory.h> |
32 | 34 | ||
33 | using namespace Opie::Core; | 35 | using namespace Opie::Core; |
34 | OPIE_EXPORT_APP( OApplicationFactory<MainWindow> ) | 36 | OPIE_EXPORT_APP( OApplicationFactory<MainWindow> ) |
diff --git a/noncore/settings/netsystemtime/mainwindow.cpp b/noncore/settings/netsystemtime/mainwindow.cpp index 1f9f8c3..35d4105 100644 --- a/noncore/settings/netsystemtime/mainwindow.cpp +++ b/noncore/settings/netsystemtime/mainwindow.cpp | |||
@@ -1,58 +1,60 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the OPIE Project | 2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project |
3 | =. | 3 | |
4 | .=l. Copyright (c) 2002 OPIE team <opie@handhelds.org?> | 4 | Copyright (C) Opie Team <opie-devel@handhelds.org> |
5 | .>+-= | 5 | =. |
6 | _;:, .> :=|. This file is free software; you can | 6 | .=l. |
7 | .> <`_, > . <= redistribute it and/or modify it under | 7 | Â Â Â Â Â Â .>+-= |
8 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can |
9 | .="- .-=="i, .._ License as published by the Free Software | 9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under |
10 | - . .-<_> .<> Foundation; either version 2 of the License, | 10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public |
11 | ._= =} : or (at your option) any later version. | 11 | .="- .-=="i, Â Â .._ License as published by the Free Software |
12 | .%`+i> _;_. | 12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, |
13 | .i_,=:_. -<s. This file is distributed in the hope that | 13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. |
14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 14 | Â Â .%`+i> Â Â Â _;_. |
15 | : .. .:, . . . without even the implied warranty of | 15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that |
16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; |
17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | 17 | : .. Â Â .:, Â Â . . . without even the implied warranty of |
18 | ..}^=.= = ; Public License for more details. | 18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | ++= -. .` .: | 19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU |
20 | : = ...= . :.=- You should have received a copy of the GNU | 20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more |
21 | -. .:....=;==+<; General Public License along with this file; | 21 | ++= Â -. Â Â .` Â Â .: details. |
22 | -_. . . )=. = see the file COPYING. If not, write to the | 22 | : Â Â = Â ...= . :.=- |
23 | -- :-=` Free Software Foundation, Inc., | 23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU |
24 | 59 Temple Place - Suite 330, | 24 | Â -_. . . Â )=. Â = Library General Public License along with |
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
25 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
26 | |||
27 | */ | 29 | */ |
28 | 30 | ||
29 | #include "mainwindow.h" | 31 | #include "mainwindow.h" |
30 | #include "timetabwidget.h" | 32 | #include "timetabwidget.h" |
31 | #include "formattabwidget.h" | 33 | #include "formattabwidget.h" |
32 | #include "settingstabwidget.h" | 34 | #include "settingstabwidget.h" |
33 | #include "ntptabwidget.h" | 35 | #include "ntptabwidget.h" |
34 | #include "predicttabwidget.h" | 36 | #include "predicttabwidget.h" |
35 | 37 | ||
36 | #include <qpe/config.h> | 38 | #include <qpe/config.h> |
37 | #include <qpe/datebookdb.h> | 39 | #include <qpe/datebookdb.h> |
38 | #include <qpe/qpeapplication.h> | 40 | #include <qpe/qpeapplication.h> |
39 | #include <qpe/qpedialog.h> | 41 | #include <qpe/qpedialog.h> |
40 | 42 | ||
41 | #if ( defined Q_WS_QWS || defined(_WS_QWS_) ) && !defined(QT_NO_COP) | 43 | #if ( defined Q_WS_QWS || defined(_WS_QWS_) ) && !defined(QT_NO_COP) |
42 | #include <qpe/qcopenvelope_qws.h> | 44 | #include <qpe/qcopenvelope_qws.h> |
43 | #endif | 45 | #endif |
44 | 46 | ||
45 | #include <qlayout.h> | 47 | #include <qlayout.h> |
46 | #include <qmessagebox.h> | 48 | #include <qmessagebox.h> |
47 | #include <qsocket.h> | 49 | #include <qsocket.h> |
48 | #include <qstring.h> | 50 | #include <qstring.h> |
49 | #include <qtimer.h> | 51 | #include <qtimer.h> |
50 | 52 | ||
51 | using namespace Opie::Ui; | 53 | using namespace Opie::Ui; |
52 | using namespace Opie::Core; | 54 | using namespace Opie::Core; |
53 | MainWindow::MainWindow( QWidget *parent , const char *name, bool modal, WFlags f ) | 55 | MainWindow::MainWindow( QWidget *parent , const char *name, bool modal, WFlags f ) |
54 | : QDialog( parent, name, modal, f ) | 56 | : QDialog( parent, name, modal, f ) |
55 | { | 57 | { |
56 | setCaption( tr( "SystemTime" ) ); | 58 | setCaption( tr( "SystemTime" ) ); |
57 | 59 | ||
58 | QVBoxLayout *layout = new QVBoxLayout( this ); | 60 | QVBoxLayout *layout = new QVBoxLayout( this ); |
diff --git a/noncore/settings/netsystemtime/mainwindow.h b/noncore/settings/netsystemtime/mainwindow.h index 8701803..0ef24e0 100644 --- a/noncore/settings/netsystemtime/mainwindow.h +++ b/noncore/settings/netsystemtime/mainwindow.h | |||
@@ -1,58 +1,60 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the OPIE Project | 2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project |
3 | =. | 3 | |
4 | .=l. Copyright (c) 2002 OPIE team <opie@handhelds.org?> | 4 | Copyright (C) Opie Team <opie-devel@handhelds.org> |
5 | .>+-= | 5 | =. |
6 | _;:, .> :=|. This file is free software; you can | 6 | .=l. |
7 | .> <`_, > . <= redistribute it and/or modify it under | 7 | Â Â Â Â Â Â .>+-= |
8 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can |
9 | .="- .-=="i, .._ License as published by the Free Software | 9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under |
10 | - . .-<_> .<> Foundation; either version 2 of the License, | 10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public |
11 | ._= =} : or (at your option) any later version. | 11 | .="- .-=="i, Â Â .._ License as published by the Free Software |
12 | .%`+i> _;_. | 12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, |
13 | .i_,=:_. -<s. This file is distributed in the hope that | 13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. |
14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 14 | Â Â .%`+i> Â Â Â _;_. |
15 | : .. .:, . . . without even the implied warranty of | 15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that |
16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; |
17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | 17 | : .. Â Â .:, Â Â . . . without even the implied warranty of |
18 | ..}^=.= = ; Public License for more details. | 18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | ++= -. .` .: | 19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU |
20 | : = ...= . :.=- You should have received a copy of the GNU | 20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more |
21 | -. .:....=;==+<; General Public License along with this file; | 21 | ++= Â -. Â Â .` Â Â .: details. |
22 | -_. . . )=. = see the file COPYING. If not, write to the | 22 | : Â Â = Â ...= . :.=- |
23 | -- :-=` Free Software Foundation, Inc., | 23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU |
24 | 59 Temple Place - Suite 330, | 24 | Â -_. . . Â )=. Â = Library General Public License along with |
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
25 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
26 | |||
27 | */ | 29 | */ |
28 | 30 | ||
29 | #ifndef MAINWINDOW_H | 31 | #ifndef MAINWINDOW_H |
30 | #define MAINWINDOW_H | 32 | #define MAINWINDOW_H |
31 | 33 | ||
32 | #include <qdialog.h> | 34 | #include <qdialog.h> |
33 | 35 | ||
34 | #include <opie2/oprocess.h> | 36 | #include <opie2/oprocess.h> |
35 | #include <opie2/otabwidget.h> | 37 | #include <opie2/otabwidget.h> |
36 | 38 | ||
37 | class TimeTabWidget; | 39 | class TimeTabWidget; |
38 | class FormatTabWidget; | 40 | class FormatTabWidget; |
39 | class SettingsTabWidget; | 41 | class SettingsTabWidget; |
40 | class NTPTabWidget; | 42 | class NTPTabWidget; |
41 | class PredictTabWidget; | 43 | class PredictTabWidget; |
42 | 44 | ||
43 | 45 | ||
44 | class QDateTime; | 46 | class QDateTime; |
45 | class QSocket; | 47 | class QSocket; |
46 | class QTimer; | 48 | class QTimer; |
47 | 49 | ||
48 | class MainWindow : public QDialog | 50 | class MainWindow : public QDialog |
49 | { | 51 | { |
50 | Q_OBJECT | 52 | Q_OBJECT |
51 | 53 | ||
52 | public: | 54 | public: |
53 | MainWindow( QWidget *parent = 0, const char *name = 0, bool modal = FALSE,WFlags f = 0); | 55 | MainWindow( QWidget *parent = 0, const char *name = 0, bool modal = FALSE,WFlags f = 0); |
54 | ~MainWindow(); | 56 | ~MainWindow(); |
55 | static QString appName() { return QString::fromLatin1("systemtime"); } | 57 | static QString appName() { return QString::fromLatin1("systemtime"); } |
56 | 58 | ||
57 | protected: | 59 | protected: |
58 | void accept(); | 60 | void accept(); |
diff --git a/noncore/settings/netsystemtime/ntptabwidget.cpp b/noncore/settings/netsystemtime/ntptabwidget.cpp index 616bc22..16d21cc 100644 --- a/noncore/settings/netsystemtime/ntptabwidget.cpp +++ b/noncore/settings/netsystemtime/ntptabwidget.cpp | |||
@@ -1,111 +1,116 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the OPIE Project | 2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project |
3 | =. | 3 | |
4 | .=l. Copyright (c) 2002 OPIE team <opie@handhelds.org?> | 4 | Copyright (C) Opie Team <opie-devel@handhelds.org> |
5 | .>+-= | 5 | =. |
6 | _;:, .> :=|. This file is free software; you can | 6 | .=l. |
7 | .> <`_, > . <= redistribute it and/or modify it under | 7 | Â Â Â Â Â Â .>+-= |
8 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can |
9 | .="- .-=="i, .._ License as published by the Free Software | 9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under |
10 | - . .-<_> .<> Foundation; either version 2 of the License, | 10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public |
11 | ._= =} : or (at your option) any later version. | 11 | .="- .-=="i, Â Â .._ License as published by the Free Software |
12 | .%`+i> _;_. | 12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, |
13 | .i_,=:_. -<s. This file is distributed in the hope that | 13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. |
14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 14 | Â Â .%`+i> Â Â Â _;_. |
15 | : .. .:, . . . without even the implied warranty of | 15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that |
16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; |
17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | 17 | : .. Â Â .:, Â Â . . . without even the implied warranty of |
18 | ..}^=.= = ; Public License for more details. | 18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | ++= -. .` .: | 19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU |
20 | : = ...= . :.=- You should have received a copy of the GNU | 20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more |
21 | -. .:....=;==+<; General Public License along with this file; | 21 | ++= Â -. Â Â .` Â Â .: details. |
22 | -_. . . )=. = see the file COPYING. If not, write to the | 22 | : Â Â = Â ...= . :.=- |
23 | -- :-=` Free Software Foundation, Inc., | 23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU |
24 | 59 Temple Place - Suite 330, | 24 | Â -_. . . Â )=. Â = Library General Public License along with |
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
25 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
26 | |||
27 | */ | 29 | */ |
28 | 30 | ||
29 | #include "ntptabwidget.h" | 31 | #include "ntptabwidget.h" |
30 | 32 | ||
31 | #include <qpe/resource.h> | 33 | #include <opie2/oresource.h> |
34 | |||
35 | #include <qpe/applnk.h> | ||
32 | 36 | ||
33 | #include <qlabel.h> | 37 | #include <qlabel.h> |
34 | #include <qlayout.h> | 38 | #include <qlayout.h> |
35 | #include <qmultilineedit.h> | 39 | #include <qmultilineedit.h> |
36 | #include <qpushbutton.h> | 40 | #include <qpushbutton.h> |
37 | #include <qscrollview.h> | 41 | #include <qscrollview.h> |
38 | 42 | ||
39 | NTPTabWidget::NTPTabWidget( QWidget *parent ) | 43 | NTPTabWidget::NTPTabWidget( QWidget *parent ) |
40 | : QWidget( parent, 0x0, 0 ) | 44 | : QWidget( parent, 0x0, 0 ) |
41 | { | 45 | { |
42 | QVBoxLayout *tmpvb = new QVBoxLayout( this ); | 46 | QVBoxLayout *tmpvb = new QVBoxLayout( this ); |
43 | QScrollView *sv = new QScrollView( this ); | 47 | QScrollView *sv = new QScrollView( this ); |
44 | tmpvb->addWidget( sv, 0, 0 ); | 48 | tmpvb->addWidget( sv, 0, 0 ); |
45 | sv->setResizePolicy( QScrollView::AutoOneFit ); | 49 | sv->setResizePolicy( QScrollView::AutoOneFit ); |
46 | sv->setFrameStyle( QFrame::NoFrame ); | 50 | sv->setFrameStyle( QFrame::NoFrame ); |
47 | QWidget *container = new QWidget( sv->viewport() ); | 51 | QWidget *container = new QWidget( sv->viewport() ); |
48 | sv->addChild( container ); | 52 | sv->addChild( container ); |
49 | 53 | ||
50 | QGridLayout *layout = new QGridLayout( container ); | 54 | QGridLayout *layout = new QGridLayout( container ); |
51 | layout->setMargin( 2 ); | 55 | layout->setMargin( 2 ); |
52 | layout->setSpacing( 4 ); | 56 | layout->setSpacing( 4 ); |
53 | 57 | ||
54 | // Start time | 58 | // Start time |
55 | layout->addWidget( new QLabel( tr( "Start time" ), container ), 0, 0 ); | 59 | layout->addWidget( new QLabel( tr( "Start time" ), container ), 0, 0 ); |
56 | lblStartTime = new QLabel( tr( "n/a" ), container ); | 60 | lblStartTime = new QLabel( tr( "n/a" ), container ); |
57 | layout->addWidget( lblStartTime, 0, 1 ); | 61 | layout->addWidget( lblStartTime, 0, 1 ); |
58 | 62 | ||
59 | // Time shift | 63 | // Time shift |
60 | layout->addWidget( new QLabel( tr( "Time shift" ), container ), 1, 0 ); | 64 | layout->addWidget( new QLabel( tr( "Time shift" ), container ), 1, 0 ); |
61 | lblTimeShift = new QLabel( tr( "n/a" ), container ); | 65 | lblTimeShift = new QLabel( tr( "n/a" ), container ); |
62 | layout->addWidget( lblTimeShift, 1, 1 ); | 66 | layout->addWidget( lblTimeShift, 1, 1 ); |
63 | 67 | ||
64 | // New time | 68 | // New time |
65 | layout->addWidget( new QLabel( tr( "New time" ), container ), 2, 0 ); | 69 | layout->addWidget( new QLabel( tr( "New time" ), container ), 2, 0 ); |
66 | lblNewTime = new QLabel( tr( "n/a" ), container ); | 70 | lblNewTime = new QLabel( tr( "n/a" ), container ); |
67 | layout->addWidget( lblNewTime, 2, 1 ); | 71 | layout->addWidget( lblNewTime, 2, 1 ); |
68 | 72 | ||
69 | // NTP output display | 73 | // NTP output display |
70 | mleNtpOutput = new QMultiLineEdit( container ); | 74 | mleNtpOutput = new QMultiLineEdit( container ); |
71 | QFont font( mleNtpOutput->font() ); | 75 | QFont font( mleNtpOutput->font() ); |
72 | font.setPointSize( 7 ); | 76 | font.setPointSize( 7 ); |
73 | mleNtpOutput->setFont( font ); | 77 | mleNtpOutput->setFont( font ); |
74 | mleNtpOutput->setWordWrap( QMultiLineEdit::WidgetWidth ); | 78 | mleNtpOutput->setWordWrap( QMultiLineEdit::WidgetWidth ); |
75 | layout->addMultiCellWidget( mleNtpOutput, 3, 3, 0, 1 ); | 79 | layout->addMultiCellWidget( mleNtpOutput, 3, 3, 0, 1 ); |
76 | 80 | ||
77 | // Set NTP time button | 81 | // Set NTP time button |
78 | m_ntpBtn = new QPushButton( Resource::loadPixmap( "netsystemtime/ntptab" ), | 82 | m_ntpBtn = new QPushButton( Opie::Core::OResource::loadPixmap( "netsystemtime/ntptab", Opie::Core::OResource::SmallIcon ), |
79 | tr( "Get time from the network" ), container ); | 83 | tr( "Get time from the network" ), container ); |
84 | m_ntpBtn->setMinimumHeight( AppLnk::smallIconSize()+4 ); | ||
80 | connect( m_ntpBtn, SIGNAL(clicked()), this, SIGNAL(getNTPTime()) ); | 85 | connect( m_ntpBtn, SIGNAL(clicked()), this, SIGNAL(getNTPTime()) ); |
81 | layout->addMultiCellWidget( m_ntpBtn, 4, 4, 0, 1 ); | 86 | layout->addMultiCellWidget( m_ntpBtn, 4, 4, 0, 1 ); |
82 | } | 87 | } |
83 | 88 | ||
84 | NTPTabWidget::~NTPTabWidget() | 89 | NTPTabWidget::~NTPTabWidget() |
85 | { | 90 | { |
86 | } | 91 | } |
87 | 92 | ||
88 | void NTPTabWidget::setStartTime( const QString &str ) | 93 | void NTPTabWidget::setStartTime( const QString &str ) |
89 | { | 94 | { |
90 | lblStartTime->setText( str ); | 95 | lblStartTime->setText( str ); |
91 | } | 96 | } |
92 | 97 | ||
93 | void NTPTabWidget::setTimeShift( const QString &str ) | 98 | void NTPTabWidget::setTimeShift( const QString &str ) |
94 | { | 99 | { |
95 | lblTimeShift->setText( str ); | 100 | lblTimeShift->setText( str ); |
96 | } | 101 | } |
97 | 102 | ||
98 | void NTPTabWidget::setNewTime( const QString &str ) | 103 | void NTPTabWidget::setNewTime( const QString &str ) |
99 | { | 104 | { |
100 | lblNewTime->setText( str ); | 105 | lblNewTime->setText( str ); |
101 | } | 106 | } |
102 | 107 | ||
103 | void NTPTabWidget::addNtpOutput( const QString &str ) | 108 | void NTPTabWidget::addNtpOutput( const QString &str ) |
104 | { | 109 | { |
105 | mleNtpOutput->append( str ); | 110 | mleNtpOutput->append( str ); |
106 | mleNtpOutput->setCursorPosition( mleNtpOutput->numLines() + 1, 0, FALSE ); | 111 | mleNtpOutput->setCursorPosition( mleNtpOutput->numLines() + 1, 0, FALSE ); |
107 | } | 112 | } |
108 | 113 | ||
109 | void NTPTabWidget::setNTPBtnEnabled( bool enabled ) | 114 | void NTPTabWidget::setNTPBtnEnabled( bool enabled ) |
110 | { | 115 | { |
111 | m_ntpBtn->setEnabled( enabled ); | 116 | m_ntpBtn->setEnabled( enabled ); |
diff --git a/noncore/settings/netsystemtime/ntptabwidget.h b/noncore/settings/netsystemtime/ntptabwidget.h index f05482e..a7dd02e 100644 --- a/noncore/settings/netsystemtime/ntptabwidget.h +++ b/noncore/settings/netsystemtime/ntptabwidget.h | |||
@@ -1,58 +1,60 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the OPIE Project | 2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project |
3 | =. | ||
4 | .=l. Copyright (c) 2002 OPIE team <opie@handhelds.org?> | ||
5 | .>+-= | ||
6 | _;:, .> :=|. This file is free software; you can | ||
7 | .> <`_, > . <= redistribute it and/or modify it under | ||
8 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | ||
9 | .="- .-=="i, .._ License as published by the Free Software | ||
10 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
11 | ._= =} : or (at your option) any later version. | ||
12 | .%`+i> _;_. | ||
13 | .i_,=:_. -<s. This file is distributed in the hope that | ||
14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
15 | : .. .:, . . . without even the implied warranty of | ||
16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
18 | ..}^=.= = ; Public License for more details. | ||
19 | ++= -. .` .: | ||
20 | : = ...= . :.=- You should have received a copy of the GNU | ||
21 | -. .:....=;==+<; General Public License along with this file; | ||
22 | -_. . . )=. = see the file COPYING. If not, write to the | ||
23 | -- :-=` Free Software Foundation, Inc., | ||
24 | 59 Temple Place - Suite 330, | ||
25 | Boston, MA 02111-1307, USA. | ||
26 | 3 | ||
4 | Copyright (C) Opie Team <opie-devel@handhelds.org> | ||
5 | =. | ||
6 | .=l. | ||
7 | Â Â Â Â Â Â .>+-= | ||
8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can | ||
9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, Â Â .._ License as published by the Free Software | ||
12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, | ||
13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. | ||
14 | Â Â .%`+i> Â Â Â _;_. | ||
15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that | ||
16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; | ||
17 | : .. Â Â .:, Â Â . . . without even the implied warranty of | ||
18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A | ||
19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU | ||
20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more | ||
21 | ++= Â -. Â Â .` Â Â .: details. | ||
22 | : Â Â = Â ...= . :.=- | ||
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
27 | */ | 29 | */ |
28 | 30 | ||
29 | #ifndef NTPTABWIDGET_H | 31 | #ifndef NTPTABWIDGET_H |
30 | #define NTPTABWIDGET_H | 32 | #define NTPTABWIDGET_H |
31 | 33 | ||
32 | #include <qwidget.h> | 34 | #include <qwidget.h> |
33 | 35 | ||
34 | class QLabel; | 36 | class QLabel; |
35 | class QMultiLineEdit; | 37 | class QMultiLineEdit; |
36 | class QPushButton; | 38 | class QPushButton; |
37 | 39 | ||
38 | class NTPTabWidget : public QWidget | 40 | class NTPTabWidget : public QWidget |
39 | { | 41 | { |
40 | Q_OBJECT | 42 | Q_OBJECT |
41 | 43 | ||
42 | public: | 44 | public: |
43 | NTPTabWidget( QWidget * = 0x0 ); | 45 | NTPTabWidget( QWidget * = 0x0 ); |
44 | ~NTPTabWidget(); | 46 | ~NTPTabWidget(); |
45 | 47 | ||
46 | void setStartTime( const QString & ); | 48 | void setStartTime( const QString & ); |
47 | void setTimeShift( const QString & ); | 49 | void setTimeShift( const QString & ); |
48 | void setNewTime( const QString & ); | 50 | void setNewTime( const QString & ); |
49 | void addNtpOutput( const QString & ); | 51 | void addNtpOutput( const QString & ); |
50 | void setNTPBtnEnabled( bool enabled ); | 52 | void setNTPBtnEnabled( bool enabled ); |
51 | 53 | ||
52 | private: | 54 | private: |
53 | QLabel *lblStartTime; | 55 | QLabel *lblStartTime; |
54 | QLabel *lblTimeShift; | 56 | QLabel *lblTimeShift; |
55 | QLabel *lblNewTime; | 57 | QLabel *lblNewTime; |
56 | QMultiLineEdit *mleNtpOutput; | 58 | QMultiLineEdit *mleNtpOutput; |
57 | QPushButton *m_ntpBtn; | 59 | QPushButton *m_ntpBtn; |
58 | 60 | ||
diff --git a/noncore/settings/netsystemtime/predicttabwidget.cpp b/noncore/settings/netsystemtime/predicttabwidget.cpp index c706add..98e0afd 100644 --- a/noncore/settings/netsystemtime/predicttabwidget.cpp +++ b/noncore/settings/netsystemtime/predicttabwidget.cpp | |||
@@ -1,58 +1,60 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the OPIE Project | 2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project |
3 | =. | 3 | |
4 | .=l. Copyright (c) 2002 OPIE team <opie@handhelds.org?> | 4 | Copyright (C) Opie Team <opie-devel@handhelds.org> |
5 | .>+-= | 5 | =. |
6 | _;:, .> :=|. This file is free software; you can | 6 | .=l. |
7 | .> <`_, > . <= redistribute it and/or modify it under | 7 | Â Â Â Â Â Â .>+-= |
8 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can |
9 | .="- .-=="i, .._ License as published by the Free Software | 9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under |
10 | - . .-<_> .<> Foundation; either version 2 of the License, | 10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public |
11 | ._= =} : or (at your option) any later version. | 11 | .="- .-=="i, Â Â .._ License as published by the Free Software |
12 | .%`+i> _;_. | 12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, |
13 | .i_,=:_. -<s. This file is distributed in the hope that | 13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. |
14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 14 | Â Â .%`+i> Â Â Â _;_. |
15 | : .. .:, . . . without even the implied warranty of | 15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that |
16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; |
17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | 17 | : .. Â Â .:, Â Â . . . without even the implied warranty of |
18 | ..}^=.= = ; Public License for more details. | 18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | ++= -. .` .: | 19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU |
20 | : = ...= . :.=- You should have received a copy of the GNU | 20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more |
21 | -. .:....=;==+<; General Public License along with this file; | 21 | ++= Â -. Â Â .` Â Â .: details. |
22 | -_. . . )=. = see the file COPYING. If not, write to the | 22 | : Â Â = Â ...= . :.=- |
23 | -- :-=` Free Software Foundation, Inc., | 23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU |
24 | 59 Temple Place - Suite 330, | 24 | Â -_. . . Â )=. Â = Library General Public License along with |
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
25 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
26 | |||
27 | */ | 29 | */ |
28 | 30 | ||
29 | #include "predicttabwidget.h" | 31 | #include "predicttabwidget.h" |
30 | 32 | ||
31 | #include <qpe/config.h> | 33 | #include <qpe/config.h> |
32 | #include <qpe/timeconversion.h> | 34 | #include <qpe/timeconversion.h> |
33 | 35 | ||
34 | #include <qlabel.h> | 36 | #include <qlabel.h> |
35 | #include <qlayout.h> | 37 | #include <qlayout.h> |
36 | #include <qpushbutton.h> | 38 | #include <qpushbutton.h> |
37 | #include <qscrollview.h> | 39 | #include <qscrollview.h> |
38 | #include <qtable.h> | 40 | #include <qtable.h> |
39 | 41 | ||
40 | #include <stdlib.h> | 42 | #include <stdlib.h> |
41 | 43 | ||
42 | PredictTabWidget::PredictTabWidget( QWidget *parent ) | 44 | PredictTabWidget::PredictTabWidget( QWidget *parent ) |
43 | : QWidget( parent, 0x0, 0 ) | 45 | : QWidget( parent, 0x0, 0 ) |
44 | { | 46 | { |
45 | /* | 47 | /* |
46 | QVBoxLayout *tmpvb = new QVBoxLayout( this ); | 48 | QVBoxLayout *tmpvb = new QVBoxLayout( this ); |
47 | QScrollView *sv = new QScrollView( this ); | 49 | QScrollView *sv = new QScrollView( this ); |
48 | tmpvb->addWidget( sv, 0, 0 ); | 50 | tmpvb->addWidget( sv, 0, 0 ); |
49 | sv->setResizePolicy( QScrollView::AutoOneFit ); | 51 | sv->setResizePolicy( QScrollView::AutoOneFit ); |
50 | sv->setFrameStyle( QFrame::NoFrame ); | 52 | sv->setFrameStyle( QFrame::NoFrame ); |
51 | QWidget *container = new QWidget( sv->viewport() ); | 53 | QWidget *container = new QWidget( sv->viewport() ); |
52 | sv->addChild( container ); | 54 | sv->addChild( container ); |
53 | */ | 55 | */ |
54 | 56 | ||
55 | QGridLayout *layout = new QGridLayout( this ); | 57 | QGridLayout *layout = new QGridLayout( this ); |
56 | layout->setMargin( 2 ); | 58 | layout->setMargin( 2 ); |
57 | layout->setSpacing( 4 ); | 59 | layout->setSpacing( 4 ); |
58 | 60 | ||
diff --git a/noncore/settings/netsystemtime/predicttabwidget.h b/noncore/settings/netsystemtime/predicttabwidget.h index da1d8ed..a0f1073 100644 --- a/noncore/settings/netsystemtime/predicttabwidget.h +++ b/noncore/settings/netsystemtime/predicttabwidget.h | |||
@@ -1,58 +1,60 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the OPIE Project | 2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project |
3 | =. | ||
4 | .=l. Copyright (c) 2002 OPIE team <opie@handhelds.org?> | ||
5 | .>+-= | ||
6 | _;:, .> :=|. This file is free software; you can | ||
7 | .> <`_, > . <= redistribute it and/or modify it under | ||
8 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | ||
9 | .="- .-=="i, .._ License as published by the Free Software | ||
10 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
11 | ._= =} : or (at your option) any later version. | ||
12 | .%`+i> _;_. | ||
13 | .i_,=:_. -<s. This file is distributed in the hope that | ||
14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
15 | : .. .:, . . . without even the implied warranty of | ||
16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
18 | ..}^=.= = ; Public License for more details. | ||
19 | ++= -. .` .: | ||
20 | : = ...= . :.=- You should have received a copy of the GNU | ||
21 | -. .:....=;==+<; General Public License along with this file; | ||
22 | -_. . . )=. = see the file COPYING. If not, write to the | ||
23 | -- :-=` Free Software Foundation, Inc., | ||
24 | 59 Temple Place - Suite 330, | ||
25 | Boston, MA 02111-1307, USA. | ||
26 | 3 | ||
4 | Copyright (C) Opie Team <opie-devel@handhelds.org> | ||
5 | =. | ||
6 | .=l. | ||
7 | Â Â Â Â Â Â .>+-= | ||
8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can | ||
9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, Â Â .._ License as published by the Free Software | ||
12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, | ||
13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. | ||
14 | Â Â .%`+i> Â Â Â _;_. | ||
15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that | ||
16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; | ||
17 | : .. Â Â .:, Â Â . . . without even the implied warranty of | ||
18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A | ||
19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU | ||
20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more | ||
21 | ++= Â -. Â Â .` Â Â .: details. | ||
22 | : Â Â = Â ...= . :.=- | ||
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
27 | */ | 29 | */ |
28 | 30 | ||
29 | #ifndef PREDICTTABWIDGET_H | 31 | #ifndef PREDICTTABWIDGET_H |
30 | #define PREDICTTABWIDGET_H | 32 | #define PREDICTTABWIDGET_H |
31 | 33 | ||
32 | #include <qdatetime.h> | 34 | #include <qdatetime.h> |
33 | #include <qstring.h> | 35 | #include <qstring.h> |
34 | #include <qwidget.h> | 36 | #include <qwidget.h> |
35 | 37 | ||
36 | class QLabel; | 38 | class QLabel; |
37 | class QTable; | 39 | class QTable; |
38 | 40 | ||
39 | class PredictTabWidget : public QWidget | 41 | class PredictTabWidget : public QWidget |
40 | { | 42 | { |
41 | Q_OBJECT | 43 | Q_OBJECT |
42 | 44 | ||
43 | public: | 45 | public: |
44 | PredictTabWidget( QWidget * = 0x0 ); | 46 | PredictTabWidget( QWidget * = 0x0 ); |
45 | ~PredictTabWidget(); | 47 | ~PredictTabWidget(); |
46 | 48 | ||
47 | void setShiftPerSec( int ); | 49 | void setShiftPerSec( int ); |
48 | 50 | ||
49 | private: | 51 | private: |
50 | QTable *tblLookups; | 52 | QTable *tblLookups; |
51 | QLabel *lblDrift; | 53 | QLabel *lblDrift; |
52 | QLabel *lblDiff; | 54 | QLabel *lblDiff; |
53 | QLabel *lblPredicted; | 55 | QLabel *lblPredicted; |
54 | 56 | ||
55 | float _shiftPerSec; | 57 | float _shiftPerSec; |
56 | QString tz; | 58 | QString tz; |
57 | QDateTime predictedTime; | 59 | QDateTime predictedTime; |
58 | 60 | ||
diff --git a/noncore/settings/netsystemtime/settingstabwidget.cpp b/noncore/settings/netsystemtime/settingstabwidget.cpp index 9315d2e..3bb0ec3 100644 --- a/noncore/settings/netsystemtime/settingstabwidget.cpp +++ b/noncore/settings/netsystemtime/settingstabwidget.cpp | |||
@@ -1,58 +1,60 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the OPIE Project | 2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project |
3 | =. | 3 | |
4 | .=l. Copyright (c) 2002 OPIE team <opie@handhelds.org?> | 4 | Copyright (C) Opie Team <opie-devel@handhelds.org> |
5 | .>+-= | 5 | =. |
6 | _;:, .> :=|. This file is free software; you can | 6 | .=l. |
7 | .> <`_, > . <= redistribute it and/or modify it under | 7 | Â Â Â Â Â Â .>+-= |
8 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can |
9 | .="- .-=="i, .._ License as published by the Free Software | 9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under |
10 | - . .-<_> .<> Foundation; either version 2 of the License, | 10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public |
11 | ._= =} : or (at your option) any later version. | 11 | .="- .-=="i, Â Â .._ License as published by the Free Software |
12 | .%`+i> _;_. | 12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, |
13 | .i_,=:_. -<s. This file is distributed in the hope that | 13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. |
14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 14 | Â Â .%`+i> Â Â Â _;_. |
15 | : .. .:, . . . without even the implied warranty of | 15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that |
16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; |
17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | 17 | : .. Â Â .:, Â Â . . . without even the implied warranty of |
18 | ..}^=.= = ; Public License for more details. | 18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | ++= -. .` .: | 19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU |
20 | : = ...= . :.=- You should have received a copy of the GNU | 20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more |
21 | -. .:....=;==+<; General Public License along with this file; | 21 | ++= Â -. Â Â .` Â Â .: details. |
22 | -_. . . )=. = see the file COPYING. If not, write to the | 22 | : Â Â = Â ...= . :.=- |
23 | -- :-=` Free Software Foundation, Inc., | 23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU |
24 | 59 Temple Place - Suite 330, | 24 | Â -_. . . Â )=. Â = Library General Public License along with |
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
25 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
26 | |||
27 | */ | 29 | */ |
28 | 30 | ||
29 | #include "settingstabwidget.h" | 31 | #include "settingstabwidget.h" |
30 | 32 | ||
31 | #include <qpe/config.h> | 33 | #include <qpe/config.h> |
32 | #include <qpe/qpeapplication.h> | 34 | #include <qpe/qpeapplication.h> |
33 | 35 | ||
34 | #include <qcheckbox.h> | 36 | #include <qcheckbox.h> |
35 | #include <qcombobox.h> | 37 | #include <qcombobox.h> |
36 | #include <qlabel.h> | 38 | #include <qlabel.h> |
37 | #include <qlayout.h> | 39 | #include <qlayout.h> |
38 | #include <qscrollview.h> | 40 | #include <qscrollview.h> |
39 | #include <qspinbox.h> | 41 | #include <qspinbox.h> |
40 | 42 | ||
41 | SettingsTabWidget::SettingsTabWidget( QWidget *parent ) | 43 | SettingsTabWidget::SettingsTabWidget( QWidget *parent ) |
42 | : QWidget( parent, 0x0, 0 ) | 44 | : QWidget( parent, 0x0, 0 ) |
43 | { | 45 | { |
44 | QVBoxLayout *tmpvb = new QVBoxLayout( this ); | 46 | QVBoxLayout *tmpvb = new QVBoxLayout( this ); |
45 | QScrollView *sv = new QScrollView( this ); | 47 | QScrollView *sv = new QScrollView( this ); |
46 | tmpvb->addWidget( sv, 0, 0 ); | 48 | tmpvb->addWidget( sv, 0, 0 ); |
47 | sv->setResizePolicy( QScrollView::AutoOneFit ); | 49 | sv->setResizePolicy( QScrollView::AutoOneFit ); |
48 | sv->setFrameStyle( QFrame::NoFrame ); | 50 | sv->setFrameStyle( QFrame::NoFrame ); |
49 | QWidget *container = new QWidget( sv->viewport() ); | 51 | QWidget *container = new QWidget( sv->viewport() ); |
50 | sv->addChild( container ); | 52 | sv->addChild( container ); |
51 | 53 | ||
52 | QGridLayout *layout = new QGridLayout( container ); | 54 | QGridLayout *layout = new QGridLayout( container ); |
53 | layout->setMargin( 2 ); | 55 | layout->setMargin( 2 ); |
54 | layout->setSpacing( 4 ); | 56 | layout->setSpacing( 4 ); |
55 | 57 | ||
56 | // Time server selector | 58 | // Time server selector |
57 | layout->addWidget( new QLabel( tr( "Time server" ), container ), 0, 0 ); | 59 | layout->addWidget( new QLabel( tr( "Time server" ), container ), 0, 0 ); |
58 | cbTimeServer = new QComboBox( TRUE, container ); | 60 | cbTimeServer = new QComboBox( TRUE, container ); |
diff --git a/noncore/settings/netsystemtime/settingstabwidget.h b/noncore/settings/netsystemtime/settingstabwidget.h index 2901bb3..9578245 100644 --- a/noncore/settings/netsystemtime/settingstabwidget.h +++ b/noncore/settings/netsystemtime/settingstabwidget.h | |||
@@ -1,58 +1,60 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the OPIE Project | 2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project |
3 | =. | ||
4 | .=l. Copyright (c) 2002 OPIE team <opie@handhelds.org?> | ||
5 | .>+-= | ||
6 | _;:, .> :=|. This file is free software; you can | ||
7 | .> <`_, > . <= redistribute it and/or modify it under | ||
8 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | ||
9 | .="- .-=="i, .._ License as published by the Free Software | ||
10 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
11 | ._= =} : or (at your option) any later version. | ||
12 | .%`+i> _;_. | ||
13 | .i_,=:_. -<s. This file is distributed in the hope that | ||
14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
15 | : .. .:, . . . without even the implied warranty of | ||
16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
18 | ..}^=.= = ; Public License for more details. | ||
19 | ++= -. .` .: | ||
20 | : = ...= . :.=- You should have received a copy of the GNU | ||
21 | -. .:....=;==+<; General Public License along with this file; | ||
22 | -_. . . )=. = see the file COPYING. If not, write to the | ||
23 | -- :-=` Free Software Foundation, Inc., | ||
24 | 59 Temple Place - Suite 330, | ||
25 | Boston, MA 02111-1307, USA. | ||
26 | 3 | ||
4 | Copyright (C) Opie Team <opie-devel@handhelds.org> | ||
5 | =. | ||
6 | .=l. | ||
7 | Â Â Â Â Â Â .>+-= | ||
8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can | ||
9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, Â Â .._ License as published by the Free Software | ||
12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, | ||
13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. | ||
14 | Â Â .%`+i> Â Â Â _;_. | ||
15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that | ||
16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; | ||
17 | : .. Â Â .:, Â Â . . . without even the implied warranty of | ||
18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A | ||
19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU | ||
20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more | ||
21 | ++= Â -. Â Â .` Â Â .: details. | ||
22 | : Â Â = Â ...= . :.=- | ||
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
27 | */ | 29 | */ |
28 | 30 | ||
29 | #ifndef SETTINGSTABWIDGET_H | 31 | #ifndef SETTINGSTABWIDGET_H |
30 | #define SETTINGSTABWIDGET_H | 32 | #define SETTINGSTABWIDGET_H |
31 | 33 | ||
32 | #include <qwidget.h> | 34 | #include <qwidget.h> |
33 | 35 | ||
34 | class QCheckBox; | 36 | class QCheckBox; |
35 | class QComboBox; | 37 | class QComboBox; |
36 | class QSpinBox; | 38 | class QSpinBox; |
37 | 39 | ||
38 | class SettingsTabWidget : public QWidget | 40 | class SettingsTabWidget : public QWidget |
39 | { | 41 | { |
40 | Q_OBJECT | 42 | Q_OBJECT |
41 | 43 | ||
42 | public: | 44 | public: |
43 | SettingsTabWidget( QWidget * = 0x0 ); | 45 | SettingsTabWidget( QWidget * = 0x0 ); |
44 | ~SettingsTabWidget(); | 46 | ~SettingsTabWidget(); |
45 | 47 | ||
46 | void saveSettings(); | 48 | void saveSettings(); |
47 | QString ntpServer(); | 49 | QString ntpServer(); |
48 | 50 | ||
49 | private: | 51 | private: |
50 | QComboBox *cbTimeServer; | 52 | QComboBox *cbTimeServer; |
51 | QSpinBox *sbNtpDelay; | 53 | QSpinBox *sbNtpDelay; |
52 | QSpinBox *sbPredictDelay; | 54 | QSpinBox *sbPredictDelay; |
53 | QCheckBox *chNtpTab; | 55 | QCheckBox *chNtpTab; |
54 | QCheckBox *chPredictTab; | 56 | QCheckBox *chPredictTab; |
55 | 57 | ||
56 | signals: | 58 | signals: |
57 | void ntpDelayChanged( int ); | 59 | void ntpDelayChanged( int ); |
58 | void displayNTPTab( bool ); | 60 | void displayNTPTab( bool ); |
diff --git a/noncore/settings/netsystemtime/timetabwidget.cpp b/noncore/settings/netsystemtime/timetabwidget.cpp index 905461f..bcfbdf7 100644 --- a/noncore/settings/netsystemtime/timetabwidget.cpp +++ b/noncore/settings/netsystemtime/timetabwidget.cpp | |||
@@ -1,66 +1,70 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the OPIE Project | 2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project |
3 | =. | 3 | |
4 | .=l. Copyright (c) 2002 OPIE team <opie@handhelds.org?> | 4 | Copyright (C) Opie Team <opie-devel@handhelds.org> |
5 | .>+-= | 5 | =. |
6 | _;:, .> :=|. This file is free software; you can | 6 | .=l. |
7 | .> <`_, > . <= redistribute it and/or modify it under | 7 | Â Â Â Â Â Â .>+-= |
8 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can |
9 | .="- .-=="i, .._ License as published by the Free Software | 9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under |
10 | - . .-<_> .<> Foundation; either version 2 of the License, | 10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public |
11 | ._= =} : or (at your option) any later version. | 11 | .="- .-=="i, Â Â .._ License as published by the Free Software |
12 | .%`+i> _;_. | 12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, |
13 | .i_,=:_. -<s. This file is distributed in the hope that | 13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. |
14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 14 | Â Â .%`+i> Â Â Â _;_. |
15 | : .. .:, . . . without even the implied warranty of | 15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that |
16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; |
17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | 17 | : .. Â Â .:, Â Â . . . without even the implied warranty of |
18 | ..}^=.= = ; Public License for more details. | 18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | ++= -. .` .: | 19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU |
20 | : = ...= . :.=- You should have received a copy of the GNU | 20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more |
21 | -. .:....=;==+<; General Public License along with this file; | 21 | ++= Â -. Â Â .` Â Â .: details. |
22 | -_. . . )=. = see the file COPYING. If not, write to the | 22 | : Â Â = Â ...= . :.=- |
23 | -- :-=` Free Software Foundation, Inc., | 23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU |
24 | 59 Temple Place - Suite 330, | 24 | Â -_. . . Â )=. Â = Library General Public License along with |
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
25 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
26 | |||
27 | */ | 29 | */ |
28 | 30 | ||
29 | #include "timetabwidget.h" | 31 | #include "timetabwidget.h" |
30 | 32 | ||
33 | #include <opie2/oresource.h> | ||
34 | |||
35 | #include <qpe/applnk.h> | ||
31 | #include <qpe/config.h> | 36 | #include <qpe/config.h> |
32 | #include <qpe/datebookmonth.h> | 37 | #include <qpe/datebookmonth.h> |
33 | #include <qpe/global.h> | 38 | #include <qpe/global.h> |
34 | #include <qpe/resource.h> | ||
35 | #include <qpe/tzselect.h> | 39 | #include <qpe/tzselect.h> |
36 | 40 | ||
37 | #if ( defined Q_WS_QWS || defined(_WS_QWS_) ) && !defined(QT_NO_COP) | 41 | #if ( defined Q_WS_QWS || defined(_WS_QWS_) ) && !defined(QT_NO_COP) |
38 | #include <qpe/qcopenvelope_qws.h> | 42 | #include <qpe/qcopenvelope_qws.h> |
39 | #endif | 43 | #endif |
40 | 44 | ||
41 | #include <qcombobox.h> | 45 | #include <qcombobox.h> |
42 | #include <qdatetime.h> | 46 | #include <qdatetime.h> |
43 | #include <qframe.h> | 47 | #include <qframe.h> |
44 | #include <qlabel.h> | 48 | #include <qlabel.h> |
45 | #include <qlayout.h> | 49 | #include <qlayout.h> |
46 | #include <qpushbutton.h> | 50 | #include <qpushbutton.h> |
47 | #include <qscrollview.h> | 51 | #include <qscrollview.h> |
48 | #include <qspinbox.h> | 52 | #include <qspinbox.h> |
49 | 53 | ||
50 | #include <stdlib.h> | 54 | #include <stdlib.h> |
51 | #include <sys/time.h> | 55 | #include <sys/time.h> |
52 | 56 | ||
53 | static const int ValueAM = 0; | 57 | static const int ValueAM = 0; |
54 | static const int ValuePM = 1; | 58 | static const int ValuePM = 1; |
55 | 59 | ||
56 | TimeTabWidget::TimeTabWidget( QWidget *parent ) | 60 | TimeTabWidget::TimeTabWidget( QWidget *parent ) |
57 | : QWidget( parent, 0x0, 0 ) | 61 | : QWidget( parent, 0x0, 0 ) |
58 | { | 62 | { |
59 | // Synchronize HW clock to systemtime | 63 | // Synchronize HW clock to systemtime |
60 | // This app will update systemtime | 64 | // This app will update systemtime |
61 | // - if Cancel is clicked, will reset systemtime to HW clock's time | 65 | // - if Cancel is clicked, will reset systemtime to HW clock's time |
62 | // - if Ok is clicked, will leave systemtime as is | 66 | // - if Ok is clicked, will leave systemtime as is |
63 | system("/sbin/hwclock --systohc --utc"); | 67 | system("/sbin/hwclock --systohc --utc"); |
64 | 68 | ||
65 | QVBoxLayout *tmpvb = new QVBoxLayout( this ); | 69 | QVBoxLayout *tmpvb = new QVBoxLayout( this ); |
66 | QScrollView *sv = new QScrollView( this ); | 70 | QScrollView *sv = new QScrollView( this ); |
@@ -80,72 +84,74 @@ TimeTabWidget::TimeTabWidget( QWidget *parent ) | |||
80 | sbHour->setWrapping( TRUE ); | 84 | sbHour->setWrapping( TRUE ); |
81 | layout->addMultiCellWidget( sbHour, 2, 2, 0, 1 ); | 85 | layout->addMultiCellWidget( sbHour, 2, 2, 0, 1 ); |
82 | 86 | ||
83 | // Minutes | 87 | // Minutes |
84 | layout->addMultiCellWidget( new QLabel( tr( "Minute" ), container ), 1, 1, 2, 3 ); | 88 | layout->addMultiCellWidget( new QLabel( tr( "Minute" ), container ), 1, 1, 2, 3 ); |
85 | sbMin = new QSpinBox( container ); | 89 | sbMin = new QSpinBox( container ); |
86 | sbMin->setWrapping( TRUE ); | 90 | sbMin->setWrapping( TRUE ); |
87 | sbMin->setMinValue( 0 ); | 91 | sbMin->setMinValue( 0 ); |
88 | sbMin->setMaxValue( 59 ); | 92 | sbMin->setMaxValue( 59 ); |
89 | layout->addMultiCellWidget( sbMin, 2, 2, 2, 3 ); | 93 | layout->addMultiCellWidget( sbMin, 2, 2, 2, 3 ); |
90 | 94 | ||
91 | // AM/PM | 95 | // AM/PM |
92 | cbAmpm = new QComboBox( container ); | 96 | cbAmpm = new QComboBox( container ); |
93 | cbAmpm->insertItem( tr( "AM" ), ValueAM ); | 97 | cbAmpm->insertItem( tr( "AM" ), ValueAM ); |
94 | cbAmpm->insertItem( tr( "PM" ), ValuePM ); | 98 | cbAmpm->insertItem( tr( "PM" ), ValuePM ); |
95 | layout->addMultiCellWidget( cbAmpm, 2, 2, 4, 5 ); | 99 | layout->addMultiCellWidget( cbAmpm, 2, 2, 4, 5 ); |
96 | 100 | ||
97 | // Date | 101 | // Date |
98 | layout->addWidget( new QLabel( tr( "Date" ), container ), 4, 0 ); | 102 | layout->addWidget( new QLabel( tr( "Date" ), container ), 4, 0 ); |
99 | btnDate = new DateButton( TRUE, container ); | 103 | btnDate = new DateButton( TRUE, container ); |
100 | layout->addMultiCellWidget( btnDate, 4, 4, 1, 5 ); | 104 | layout->addMultiCellWidget( btnDate, 4, 4, 1, 5 ); |
101 | 105 | ||
102 | // Timezone | 106 | // Timezone |
103 | layout->addMultiCellWidget( new QLabel( tr( "Time zone" ), container ), 6, 6, 0, 1 ); | 107 | layout->addMultiCellWidget( new QLabel( tr( "Time zone" ), container ), 6, 6, 0, 1 ); |
104 | selTimeZone = new TimeZoneSelector( container ); | 108 | selTimeZone = new TimeZoneSelector( container ); |
105 | connect( selTimeZone, SIGNAL(signalNewTz(const QString&)), this, SLOT(slotTZChanged(const QString&)) ); | 109 | connect( selTimeZone, SIGNAL(signalNewTz(const QString&)), this, SLOT(slotTZChanged(const QString&)) ); |
106 | layout->addMultiCellWidget( selTimeZone, 6, 6, 2, 5 ); | 110 | layout->addMultiCellWidget( selTimeZone, 6, 6, 2, 5 ); |
107 | 111 | ||
108 | // Space filler | 112 | // Space filler |
109 | layout->addItem( new QSpacerItem( 1, 1, QSizePolicy::Minimum, QSizePolicy::Expanding ), 7, 0 ); | 113 | layout->addItem( new QSpacerItem( 1, 1, QSizePolicy::Minimum, QSizePolicy::Expanding ), 7, 0 ); |
110 | 114 | ||
111 | // Set NTP time button | 115 | // Set NTP time button |
112 | m_ntpBtn = new QPushButton( Resource::loadPixmap( "netsystemtime/ntptab" ), | 116 | m_ntpBtn = new QPushButton( Opie::Core::OResource::loadPixmap( "netsystemtime/ntptab", Opie::Core::OResource::SmallIcon ), |
113 | tr( "Get time from the network" ), container ); | 117 | tr( "Get time from the network" ), container ); |
118 | m_ntpBtn->setMinimumHeight( AppLnk::smallIconSize()+4 ); | ||
114 | connect( m_ntpBtn, SIGNAL(clicked()), this, SIGNAL(getNTPTime()) ); | 119 | connect( m_ntpBtn, SIGNAL(clicked()), this, SIGNAL(getNTPTime()) ); |
115 | layout->addMultiCellWidget( m_ntpBtn, 8, 8, 0, 5 ); | 120 | layout->addMultiCellWidget( m_ntpBtn, 8, 8, 0, 5 ); |
116 | 121 | ||
117 | // Set predicted time button | 122 | // Set predicted time button |
118 | QPushButton *pb = new QPushButton( Resource::loadPixmap( "netsystemtime/predicttab" ), tr( "Set predicted time" ), | 123 | QPushButton *pb = new QPushButton( Opie::Core::OResource::loadPixmap( "netsystemtime/predicttab", Opie::Core::OResource::SmallIcon ), |
119 | container ); | 124 | tr( "Set predicted time" ), container ); |
125 | pb->setMinimumHeight( AppLnk::smallIconSize()+4 ); | ||
120 | connect( pb, SIGNAL(clicked()), this, SIGNAL(getPredictedTime()) ); | 126 | connect( pb, SIGNAL(clicked()), this, SIGNAL(getPredictedTime()) ); |
121 | layout->addMultiCellWidget( pb, 9, 9, 0, 5 ); | 127 | layout->addMultiCellWidget( pb, 9, 9, 0, 5 ); |
122 | 128 | ||
123 | // Space filler at bottom of widget | 129 | // Space filler at bottom of widget |
124 | layout->addItem( new QSpacerItem( 1, 1, QSizePolicy::Minimum, QSizePolicy::Expanding ), 10, 0 ); | 130 | layout->addItem( new QSpacerItem( 1, 1, QSizePolicy::Minimum, QSizePolicy::Expanding ), 10, 0 ); |
125 | 131 | ||
126 | // Initialize values | 132 | // Initialize values |
127 | Config config( "locale" ); | 133 | Config config( "locale" ); |
128 | config.setGroup( "Location" ); | 134 | config.setGroup( "Location" ); |
129 | selTimeZone->setCurrentZone( config.readEntry( "Timezone", "America/New_York" ) ); | 135 | selTimeZone->setCurrentZone( config.readEntry( "Timezone", "America/New_York" ) ); |
130 | use12HourTime = FALSE; | 136 | use12HourTime = FALSE; |
131 | setDateTime( QDateTime::currentDateTime() ); | 137 | setDateTime( QDateTime::currentDateTime() ); |
132 | } | 138 | } |
133 | 139 | ||
134 | TimeTabWidget::~TimeTabWidget() | 140 | TimeTabWidget::~TimeTabWidget() |
135 | { | 141 | { |
136 | } | 142 | } |
137 | 143 | ||
138 | void TimeTabWidget::saveSettings( bool commit ) | 144 | void TimeTabWidget::saveSettings( bool commit ) |
139 | { | 145 | { |
140 | if ( commit ) | 146 | if ( commit ) |
141 | { | 147 | { |
142 | // Set timezone and announce to world | 148 | // Set timezone and announce to world |
143 | QString tz = selTimeZone->currentZone(); | 149 | QString tz = selTimeZone->currentZone(); |
144 | Config config("locale"); | 150 | Config config("locale"); |
145 | config.setGroup( "Location" ); | 151 | config.setGroup( "Location" ); |
146 | config.writeEntry( "Timezone", tz ); | 152 | config.writeEntry( "Timezone", tz ); |
147 | setenv( "TZ", tz, 1 ); | 153 | setenv( "TZ", tz, 1 ); |
148 | QCopEnvelope setTimeZone( "QPE/System", "timeChange(QString)" ); | 154 | QCopEnvelope setTimeZone( "QPE/System", "timeChange(QString)" ); |
149 | setTimeZone << tz; | 155 | setTimeZone << tz; |
150 | 156 | ||
151 | // If controls have a valid date & time, update systemtime | 157 | // If controls have a valid date & time, update systemtime |
diff --git a/noncore/settings/netsystemtime/timetabwidget.h b/noncore/settings/netsystemtime/timetabwidget.h index 949535d..4674c5c8 100644 --- a/noncore/settings/netsystemtime/timetabwidget.h +++ b/noncore/settings/netsystemtime/timetabwidget.h | |||
@@ -1,58 +1,60 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the OPIE Project | 2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project |
3 | =. | ||
4 | .=l. Copyright (c) 2002 OPIE team <opie@handhelds.org?> | ||
5 | .>+-= | ||
6 | _;:, .> :=|. This file is free software; you can | ||
7 | .> <`_, > . <= redistribute it and/or modify it under | ||
8 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | ||
9 | .="- .-=="i, .._ License as published by the Free Software | ||
10 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
11 | ._= =} : or (at your option) any later version. | ||
12 | .%`+i> _;_. | ||
13 | .i_,=:_. -<s. This file is distributed in the hope that | ||
14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
15 | : .. .:, . . . without even the implied warranty of | ||
16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
18 | ..}^=.= = ; Public License for more details. | ||
19 | ++= -. .` .: | ||
20 | : = ...= . :.=- You should have received a copy of the GNU | ||
21 | -. .:....=;==+<; General Public License along with this file; | ||
22 | -_. . . )=. = see the file COPYING. If not, write to the | ||
23 | -- :-=` Free Software Foundation, Inc., | ||
24 | 59 Temple Place - Suite 330, | ||
25 | Boston, MA 02111-1307, USA. | ||
26 | 3 | ||
4 | Copyright (C) Opie Team <opie-devel@handhelds.org> | ||
5 | =. | ||
6 | .=l. | ||
7 | Â Â Â Â Â Â .>+-= | ||
8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can | ||
9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, Â Â .._ License as published by the Free Software | ||
12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, | ||
13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. | ||
14 | Â Â .%`+i> Â Â Â _;_. | ||
15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that | ||
16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; | ||
17 | : .. Â Â .:, Â Â . . . without even the implied warranty of | ||
18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A | ||
19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU | ||
20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more | ||
21 | ++= Â -. Â Â .` Â Â .: details. | ||
22 | : Â Â = Â ...= . :.=- | ||
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
27 | */ | 29 | */ |
28 | 30 | ||
29 | #ifndef TIMETABWIDGET_H | 31 | #ifndef TIMETABWIDGET_H |
30 | #define TIMETABWIDGET_H | 32 | #define TIMETABWIDGET_H |
31 | 33 | ||
32 | #include <qwidget.h> | 34 | #include <qwidget.h> |
33 | 35 | ||
34 | class DateButton; | 36 | class DateButton; |
35 | class DateFormat; | 37 | class DateFormat; |
36 | class QComboBox; | 38 | class QComboBox; |
37 | class QDateTime; | 39 | class QDateTime; |
38 | class QPushButton; | 40 | class QPushButton; |
39 | class QSpinBox; | 41 | class QSpinBox; |
40 | class TimeZoneSelector; | 42 | class TimeZoneSelector; |
41 | 43 | ||
42 | class TimeTabWidget : public QWidget | 44 | class TimeTabWidget : public QWidget |
43 | { | 45 | { |
44 | Q_OBJECT | 46 | Q_OBJECT |
45 | 47 | ||
46 | public: | 48 | public: |
47 | TimeTabWidget( QWidget * = 0l ); | 49 | TimeTabWidget( QWidget * = 0l ); |
48 | ~TimeTabWidget(); | 50 | ~TimeTabWidget(); |
49 | 51 | ||
50 | void saveSettings( bool ); | 52 | void saveSettings( bool ); |
51 | void setDateTime( const QDateTime & ); | 53 | void setDateTime( const QDateTime & ); |
52 | void setNTPBtnEnabled( bool enabled ); | 54 | void setNTPBtnEnabled( bool enabled ); |
53 | 55 | ||
54 | private: | 56 | private: |
55 | QSpinBox *sbHour; | 57 | QSpinBox *sbHour; |
56 | QSpinBox *sbMin; | 58 | QSpinBox *sbMin; |
57 | QComboBox *cbAmpm; | 59 | QComboBox *cbAmpm; |
58 | DateButton *btnDate; | 60 | DateButton *btnDate; |