summaryrefslogtreecommitdiff
authortille <tille>2002-10-31 17:50:26 (UTC)
committer tille <tille>2002-10-31 17:50:26 (UTC)
commit9c511809c55d48db528e6ef97ec9969fa5517381 (patch) (side-by-side diff)
tree84f51a9b842aac6487cfd7b5ea78d3e17e1591a8
parentd955226c2197578f69c510282a4e9ad1ea8fe771 (diff)
downloadopie-9c511809c55d48db528e6ef97ec9969fa5517381.zip
opie-9c511809c55d48db528e6ef97ec9969fa5517381.tar.gz
opie-9c511809c55d48db528e6ef97ec9969fa5517381.tar.bz2
replacement for systemtime now
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/netsystemtime/netsystemtime.pro2
-rw-r--r--noncore/settings/netsystemtime/ntpbase.cpp24
-rw-r--r--noncore/settings/netsystemtime/ntpbase.h8
-rw-r--r--noncore/settings/netsystemtime/ntpbase.ui6
4 files changed, 20 insertions, 20 deletions
diff --git a/noncore/settings/netsystemtime/netsystemtime.pro b/noncore/settings/netsystemtime/netsystemtime.pro
index 0530ea5..3aaf369 100644
--- a/noncore/settings/netsystemtime/netsystemtime.pro
+++ b/noncore/settings/netsystemtime/netsystemtime.pro
@@ -1,26 +1,26 @@
TEMPLATE = app
CONFIG = qt warn_on debug
#CONFIG = qt warn_on release
HEADERS = ntp.h settime.h ntpbase.h
SOURCES = main.cpp ntp.cpp settime.cpp ntpbase.cpp
INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
LIBS += -lqpe -lopie
INTERFACES =
DESTDIR = $(OPIEDIR)/bin
-TARGET = netsystemtime
+TARGET = systemtime
TRANSLATIONS = ../../../i18n/de/netsystemtime.ts \
../../../i18n/en/netsystemtime.ts \
../../../i18n/es/netsystemtime.ts \
../../../i18n/fr/netsystemtime.ts \
../../../i18n/hu/netsystemtime.ts \
../../../i18n/ja/netsystemtime.ts \
../../../i18n/ko/netsystemtime.ts \
../../../i18n/no/netsystemtime.ts \
../../../i18n/pl/netsystemtime.ts \
../../../i18n/pt/netsystemtime.ts \
../../../i18n/pt_BR/netsystemtime.ts \
../../../i18n/sl/netsystemtime.ts \
../../../i18n/zh_CN/netsystemtime.ts \
../../../i18n/zh_TW/netsystemtime.ts
diff --git a/noncore/settings/netsystemtime/ntpbase.cpp b/noncore/settings/netsystemtime/ntpbase.cpp
index c10c6ae..8d44f17 100644
--- a/noncore/settings/netsystemtime/ntpbase.cpp
+++ b/noncore/settings/netsystemtime/ntpbase.cpp
@@ -23,67 +23,67 @@
#include <qwhatsthis.h>
/*
* Constructs a NtpBase which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'
*/
NtpBase::NtpBase( QWidget* parent, const char* name, WFlags fl )
: QWidget( parent, name, fl )
{
if ( !name )
setName( "NtpBase" );
resize( 320, 411 );
setCaption( tr( "Network Time" ) );
NtpBaseLayout = new QGridLayout( this );
NtpBaseLayout->setSpacing( 2 );
NtpBaseLayout->setMargin( 2 );
TabWidgetMain = new QTabWidget( this, "TabWidgetMain" );
tabMain = new QWidget( TabWidgetMain, "tabMain" );
tabMainLayout = new QGridLayout( tabMain );
tabMainLayout->setSpacing( 2 );
tabMainLayout->setMargin( 2 );
- FrameSystemTime = new QFrame( tabMain, "FrameSystemTime" );
- FrameSystemTime->setFrameShape( QFrame::StyledPanel );
- FrameSystemTime->setFrameShadow( QFrame::Raised );
+ FrameSystemTime = new QWidget( tabMain, "FrameSystemTime" );
+ // FrameSystemTime->setFrameShape( QFrame::StyledPanel );
+ //FrameSystemTime->setFrameShadow( QFrame::Raised );
tabMainLayout->addWidget( FrameSystemTime, 0, 0 );
tabNtp = new QWidget( TabWidgetMain, "tabNtp" );
tabNtpLayout = new QGridLayout( tabNtp );
tabNtpLayout->setSpacing( 2 );
tabNtpLayout->setMargin( 1 );
runNtp = new QPushButton( tabNtp, "runNtp" );
runNtp->setText( tr( "Get time from network" ) );
tabNtpLayout->addWidget( runNtp, 1, 0 );
- FrameNtp = new QFrame( tabNtp, "FrameNtp" );
- FrameNtp->setFrameShape( QFrame::StyledPanel );
- FrameNtp->setFrameShadow( QFrame::Raised );
+ FrameNtp = new QWidget( tabNtp, "FrameNtp" );
+ // FrameNtp->setFrameShape( QFrame::StyledPanel );
+ // FrameNtp->setFrameShadow( QFrame::Raised );
FrameNtpLayout = new QGridLayout( FrameNtp );
FrameNtpLayout->setSpacing( 2 );
FrameNtpLayout->setMargin( 2 );
Layout4 = new QVBoxLayout;
Layout4->setSpacing( 6 );
Layout4->setMargin( 0 );
TextLabel1 = new QLabel( FrameNtp, "TextLabel1" );
TextLabel1->setAutoMask( FALSE );
TextLabel1->setText( tr( "Start Time:" ) );
Layout4->addWidget( TextLabel1 );
TextLabelStartTime = new QLabel( FrameNtp, "TextLabelStartTime" );
TextLabelStartTime->setText( tr( "nan" ) );
Layout4->addWidget( TextLabelStartTime );
TextLabel3 = new QLabel( FrameNtp, "TextLabel3" );
TextLabel3->setText( tr( "Time Shift:" ) );
Layout4->addWidget( TextLabel3 );
TextLabelTimeShift = new QLabel( FrameNtp, "TextLabelTimeShift" );
TextLabelTimeShift->setText( tr( "nan" ) );
Layout4->addWidget( TextLabelTimeShift );
@@ -159,51 +159,51 @@ NtpBase::NtpBase( QWidget* parent, const char* name, WFlags fl )
Layout9->addWidget( TextLabelPredTime, 2, 1 );
tabPredictLayout->addLayout( Layout9, 1, 0 );
Layout11 = new QHBoxLayout;
Layout11->setSpacing( 6 );
Layout11->setMargin( 0 );
PushButtonSetPredTime = new QPushButton( tabPredict, "PushButtonSetPredTime" );
PushButtonSetPredTime->setText( tr( "Set predicted time" ) );
Layout11->addWidget( PushButtonSetPredTime );
PushButtonPredict = new QPushButton( tabPredict, "PushButtonPredict" );
PushButtonPredict->setText( tr( "Predict time" ) );
Layout11->addWidget( PushButtonPredict );
tabPredictLayout->addLayout( Layout11, 2, 0 );
TabSettings = new QWidget( TabWidgetMain, "TabSettings" );
TabSettingsLayout = new QGridLayout( TabSettings );
TabSettingsLayout->setSpacing( 2 );
TabSettingsLayout->setMargin( 2 );
- FrameSettings = new QFrame( TabSettings, "FrameSettings" );
- FrameSettings->setFrameShape( QFrame::StyledPanel );
- FrameSettings->setFrameShadow( QFrame::Raised );
+ FrameSettings = new QWidget( TabSettings, "FrameSettings" );
+ // FrameSettings->setFrameShape( QFrame::StyledPanel );
+ // FrameSettings->setFrameShadow( QFrame::Raised );
FrameSettingsLayout = new QVBoxLayout( FrameSettings );
FrameSettingsLayout->setSpacing( 6 );
FrameSettingsLayout->setMargin( 11 );
Layout6 = new QGridLayout;
Layout6->setSpacing( 6 );
Layout6->setMargin( 0 );
TextLabel7_2 = new QLabel( FrameSettings, "TextLabel7_2" );
TextLabel7_2->setText( tr( "Use" ) );
Layout6->addWidget( TextLabel7_2, 0, 0 );
TextLabel2_2 = new QLabel( FrameSettings, "TextLabel2_2" );
TextLabel2_2->setText( tr( "as" ) );
Layout6->addWidget( TextLabel2_2, 0, 2 );
TextLabel1_3 = new QLabel( FrameSettings, "TextLabel1_3" );
TextLabel1_3->setText( tr( "NTP server to get the time from the network." ) );
TextLabel1_3->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter | QLabel::AlignLeft ) );
Layout6->addMultiCellWidget( TextLabel1_3, 1, 1, 0, 1 );
@@ -270,51 +270,51 @@ NtpBase::NtpBase( QWidget* parent, const char* name, WFlags fl )
Layout7->addWidget( TextLabel2, 0, 2 );
TextLabel3_3 = new QLabel( FrameSettings, "TextLabel3_3" );
TextLabel3_3->setText( tr( "a new NTP lookup will be used to predict the time." ) );
TextLabel3_3->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter | QLabel::AlignLeft ) );
Layout7->addMultiCellWidget( TextLabel3_3, 1, 1, 0, 2 );
SpinBoxMinLookupDelay = new QSpinBox( FrameSettings, "SpinBoxMinLookupDelay" );
SpinBoxMinLookupDelay->setWrapping( TRUE );
SpinBoxMinLookupDelay->setMaxValue( 9999999 );
SpinBoxMinLookupDelay->setMinValue( 42 );
SpinBoxMinLookupDelay->setValue( 720 );
Layout7->addWidget( SpinBoxMinLookupDelay, 0, 1 );
FrameSettingsLayout->addLayout( Layout7 );
TabSettingsLayout->addWidget( FrameSettings, 0, 0 );
tabManualSetTime = new QWidget( TabWidgetMain, "tabManualSetTime" );
tabManualSetTimeLayout = new QVBoxLayout( tabManualSetTime );
tabManualSetTimeLayout->setSpacing( 2 );
tabManualSetTimeLayout->setMargin( 2 );
- FrameSetTime = new QFrame( tabManualSetTime, "FrameSetTime" );
- FrameSetTime->setFrameShape( QFrame::StyledPanel );
- FrameSetTime->setFrameShadow( QFrame::Raised );
+ FrameSetTime = new QWidget( tabManualSetTime, "FrameSetTime" );
+ // FrameSetTime->setFrameShape( QFrame::StyledPanel );
+ // FrameSetTime->setFrameShadow( QFrame::Raised );
tabManualSetTimeLayout->addWidget( FrameSetTime );
PushButtonSetManualTime = new QPushButton( tabManualSetTime, "PushButtonSetManualTime" );
PushButtonSetManualTime->setText( tr( "Set time" ) );
tabManualSetTimeLayout->addWidget( PushButtonSetManualTime );
TabWidgetMain->insertTab( tabMain, tr( "Main" ) );
TabWidgetMain->insertTab( tabManualSetTime, tr( "Manual" ) );
TabWidgetMain->insertTab( TabSettings, tr( "Settings" ) );
TabWidgetMain->insertTab( tabPredict, tr( "Predict" ) );
TabWidgetMain->insertTab( tabNtp, tr( "NTP" ) );
NtpBaseLayout->addWidget( TabWidgetMain, 0, 0 );
}
/*
* Destroys the object and frees any allocated resources
*/
NtpBase::~NtpBase()
{
// no need to delete child widgets, Qt does it all for us
}
diff --git a/noncore/settings/netsystemtime/ntpbase.h b/noncore/settings/netsystemtime/ntpbase.h
index a669601..a443495 100644
--- a/noncore/settings/netsystemtime/ntpbase.h
+++ b/noncore/settings/netsystemtime/ntpbase.h
@@ -13,84 +13,84 @@
#include <qwidget.h>
class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
class QCheckBox;
class QComboBox;
class QFrame;
class QLabel;
class QMultiLineEdit;
class QPushButton;
class QSpinBox;
class QTabWidget;
class QTable;
class NtpBase : public QWidget
{
Q_OBJECT
public:
NtpBase( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
~NtpBase();
QTabWidget* TabWidgetMain;
QWidget* tabMain;
- QFrame* FrameSystemTime;
+ QWidget* FrameSystemTime;
QWidget* tabNtp;
QPushButton* runNtp;
- QFrame* FrameNtp;
+ QWidget* FrameNtp;
QLabel* TextLabel1;
QLabel* TextLabelStartTime;
QLabel* TextLabel3;
QLabel* TextLabelTimeShift;
QLabel* TextLabel5;
QLabel* TextLabelNewTime;
QMultiLineEdit* MultiLineEditntpOutPut;
QWidget* tabPredict;
QTable* TableLookups;
QLabel* TextLabelShift;
QLabel* TextLabel4;
QLabel* TextLabelEstimatedShift;
QLabel* TextLabel3_2;
QLabel* Mean_shift_label;
QLabel* TextLabelPredTime;
QPushButton* PushButtonSetPredTime;
QPushButton* PushButtonPredict;
QWidget* TabSettings;
- QFrame* FrameSettings;
+ QWidget* FrameSettings;
QLabel* TextLabel7_2;
QLabel* TextLabel2_2;
QLabel* TextLabel1_3;
QComboBox* ComboNtpSrv;
QCheckBox* CheckBoxAdvSettings;
QFrame* Line1;
QLabel* TextLabel1_2_2;
QLabel* TextLabel2_3;
QLabel* TextLabel3_3_2;
QSpinBox* SpinBoxNtpDelay;
QLabel* TextLabel1_2;
QLabel* TextLabel2;
QLabel* TextLabel3_3;
QSpinBox* SpinBoxMinLookupDelay;
QWidget* tabManualSetTime;
- QFrame* FrameSetTime;
+ QWidget* FrameSetTime;
QPushButton* PushButtonSetManualTime;
protected:
QGridLayout* NtpBaseLayout;
QGridLayout* tabMainLayout;
QGridLayout* tabNtpLayout;
QGridLayout* FrameNtpLayout;
QVBoxLayout* Layout4;
QGridLayout* tabPredictLayout;
QGridLayout* Layout9;
QHBoxLayout* Layout11;
QGridLayout* TabSettingsLayout;
QVBoxLayout* FrameSettingsLayout;
QGridLayout* Layout6;
QGridLayout* Layout7_2;
QGridLayout* Layout7;
QVBoxLayout* tabManualSetTimeLayout;
bool event( QEvent* );
};
#endif // NTPBASE_H
diff --git a/noncore/settings/netsystemtime/ntpbase.ui b/noncore/settings/netsystemtime/ntpbase.ui
index 62f736b..465bba0 100644
--- a/noncore/settings/netsystemtime/ntpbase.ui
+++ b/noncore/settings/netsystemtime/ntpbase.ui
@@ -92,49 +92,49 @@
<name>title</name>
<string>NTP</string>
</attribute>
<grid>
<property stdset="1">
<name>margin</name>
<number>1</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>2</number>
</property>
<widget row="1" column="0" >
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>runNtp</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>Get time from network</string>
</property>
</widget>
<widget row="0" column="0" >
- <class>QFrame</class>
+ <class>QWidget</class>
<property stdset="1">
<name>name</name>
<cstring>FrameNtp</cstring>
</property>
<property stdset="1">
<name>frameShape</name>
<enum>StyledPanel</enum>
</property>
<property stdset="1">
<name>frameShadow</name>
<enum>Raised</enum>
</property>
<property>
<name>layoutMargin</name>
</property>
<property>
<name>layoutSpacing</name>
</property>
<grid>
<property stdset="1">
<name>margin</name>
<number>2</number>
</property>
<property stdset="1">
@@ -437,49 +437,49 @@
</hbox>
</widget>
</grid>
</widget>
<widget>
<class>QWidget</class>
<property stdset="1">
<name>name</name>
<cstring>TabSettings</cstring>
</property>
<attribute>
<name>title</name>
<string>Settings</string>
</attribute>
<grid>
<property stdset="1">
<name>margin</name>
<number>2</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>2</number>
</property>
<widget row="0" column="0" >
- <class>QFrame</class>
+ <class>QWidget</class>
<property stdset="1">
<name>name</name>
<cstring>FrameSettings</cstring>
</property>
<property stdset="1">
<name>frameShape</name>
<enum>StyledPanel</enum>
</property>
<property stdset="1">
<name>frameShadow</name>
<enum>Raised</enum>
</property>
<property>
<name>layoutMargin</name>
</property>
<property>
<name>layoutSpacing</name>
</property>
<vbox>
<property stdset="1">
<name>margin</name>
<number>11</number>
</property>
<property stdset="1">
@@ -788,49 +788,49 @@
</vbox>
</widget>
</grid>
</widget>
<widget>
<class>QWidget</class>
<property stdset="1">
<name>name</name>
<cstring>tabManualSetTime</cstring>
</property>
<attribute>
<name>title</name>
<string>Manual</string>
</attribute>
<vbox>
<property stdset="1">
<name>margin</name>
<number>2</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>2</number>
</property>
<widget>
- <class>QFrame</class>
+ <class>QWidget</class>
<property stdset="1">
<name>name</name>
<cstring>FrameSetTime</cstring>
</property>
<property stdset="1">
<name>frameShape</name>
<enum>StyledPanel</enum>
</property>
<property stdset="1">
<name>frameShadow</name>
<enum>Raised</enum>
</property>
</widget>
<widget>
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>PushButtonSetManualTime</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>Set time</string>
</property>
</widget>