summaryrefslogtreecommitdiff
path: root/noncore/settings/netsystemtime/settime.cpp
authortille <tille>2002-10-21 19:18:53 (UTC)
committer tille <tille>2002-10-21 19:18:53 (UTC)
commit95a908dba86f7588e3130094e7d292f3df6a3a42 (patch) (side-by-side diff)
treeed84d7763b33a6ae95fbbafa54262aca56fc4d4e /noncore/settings/netsystemtime/settime.cpp
parentc3eedd530dc9675caa4ce98d1c0814ba61a746ed (diff)
downloadopie-95a908dba86f7588e3130094e7d292f3df6a3a42.zip
opie-95a908dba86f7588e3130094e7d292f3df6a3a42.tar.gz
opie-95a908dba86f7588e3130094e7d292f3df6a3a42.tar.bz2
now working...
desiger 3 is much more useable -> ui file gone ;)
Diffstat (limited to 'noncore/settings/netsystemtime/settime.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/netsystemtime/settime.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/noncore/settings/netsystemtime/settime.cpp b/noncore/settings/netsystemtime/settime.cpp
index f6e02d5..949fcb3 100644
--- a/noncore/settings/netsystemtime/settime.cpp
+++ b/noncore/settings/netsystemtime/settime.cpp
@@ -39,74 +39,74 @@
#include <qcheckbox.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qradiobutton.h>
#include <qspinbox.h>
#include <qtoolbutton.h>
#include <qwindowsystem_qws.h>
#include <qcombobox.h>
#include <sys/time.h>
#include <time.h>
#include <stdlib.h>
#include <stdio.h>
SetDateTime::SetDateTime(QWidget *parent, const char *name, WFlags f )
: NtpBase( parent, name, f )
{
// setCaption( tr("Set System Time") );
// QVBoxLayout *vb = new QVBoxLayout( this, 5 );
QVBoxLayout *vb = new QVBoxLayout( FrameSystemTime, 5 );
QVBoxLayout *vb2 = new QVBoxLayout( FrameSetTime, 5 );
-# TextLabelMainPredTime = new QLabel( FrameSystemTime );
-# vb->addWidget( TextLabelMainPredTime, 1, 0 );
+ TextLabelMainPredTime = new QLabel( FrameSystemTime );
+ vb->addWidget( TextLabelMainPredTime, 1, 0 );
QHBoxLayout *hb = new QHBoxLayout( vb, -1, "timezone layout" );
QLabel *lblZone = new QLabel( tr( "Time Zone" ), FrameSystemTime, "timezone label" );
lblZone->setMaximumSize( lblZone->sizeHint() );
hb->addWidget( lblZone );
tz = new TimeZoneSelector( FrameSystemTime, "Timezone choices" );
tz->setMinimumSize( tz->sizeHint() );
hb->addWidget( tz );
timeButton = new SetTime( FrameSetTime );
vb2->addWidget( timeButton );
QHBoxLayout *db = new QHBoxLayout( vb2 );
QLabel *dateLabel = new QLabel( tr("Date"), FrameSetTime );
db->addWidget( dateLabel, 1 );
dateButton = new DateButton( TRUE, FrameSetTime );
db->addWidget( dateButton, 2 );
QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
vb2->addItem( spacer );
- hline = new QFrame( FrameSystemTime );
+ QFrame *hline = new QFrame( FrameSystemTime );
hline->setFrameStyle( QFrame::HLine | QFrame::Sunken );
vb->addWidget( hline );
Config config("qpe");
config.setGroup( "Time" );
QHBoxLayout *hb1 = new QHBoxLayout( vb );
QLabel *l = new QLabel( tr("Time format"), FrameSystemTime );
hb1->addWidget( l, 1 );
ampmCombo = new QComboBox( FrameSystemTime );
ampmCombo->insertItem( tr("24 hour"), 0 );
ampmCombo->insertItem( tr("12 hour"), 1 );
hb1->addWidget( ampmCombo, 2 );
int show12hr = config.readBoolEntry("AMPM") ? 1 : 0;
ampmCombo->setCurrentItem( show12hr );
timeButton->show12hourTime( show12hr );
connect(ampmCombo, SIGNAL(activated(int)),
timeButton, SLOT(show12hourTime(int)));
@@ -158,49 +158,49 @@ SetDateTime::SetDateTime(QWidget *parent, const char *name, WFlags f )
currentdf = 3;
dateFormatCombo->insertItem( tr( date_formats[3].toNumberString() ) );
dateFormatCombo->setCurrentItem( currentdf );
dateButton->setDateFormat( df );
connect( dateFormatCombo, SIGNAL( activated(int)),
SLOT(formatChanged(int)));
QHBoxLayout *hb4 = new QHBoxLayout( vb );
l = new QLabel( tr("Applet format" ), FrameSystemTime );
hb4->addWidget( l, 1 );
clockAppletCombo = new QComboBox( FrameSystemTime );
clockAppletCombo->insertItem( tr("hh:mm"), 0 );
clockAppletCombo->insertItem( tr("D/M hh:mm"), 1 );
clockAppletCombo->insertItem( tr("M/D hh:mm"), 2 );
hb4->addWidget( clockAppletCombo, 2 );
int clockApplet = config.readNumEntry("ClockApplet",0);
clockAppletCombo->setCurrentItem( clockApplet );
vb->addStretch( 0 );
- QFrame *hline = new QFrame( FrameSystemTime );
+ hline = new QFrame( FrameSystemTime );
hline->setFrameStyle( QFrame::HLine | QFrame::Sunken );
vb->addWidget( hline );
ButtonSetTime = new QPushButton( FrameSystemTime );
vb->addWidget( ButtonSetTime, 1, 0 );
QObject::connect( PushButtonSetManualTime, SIGNAL(clicked()),
this, SLOT(commitTime()));
QObject::connect( tz, SIGNAL( signalNewTz( const QString& ) ),
timeButton, SLOT( slotTzChange( const QString& ) ) );
QObject::connect( tz, SIGNAL( signalNewTz( const QString& ) ),
SLOT( tzChange( const QString& ) ) );
QObject::connect( weekStartCombo, SIGNAL( activated ( int )),
SLOT(updateSystem(int ) ));
QObject::connect( ampmCombo, SIGNAL( activated ( int )),
SLOT(updateSystem(int ) ));
QObject::connect( dateFormatCombo, SIGNAL( activated ( int )),
SLOT(updateSystem(int ) ));
QObject::connect( clockAppletCombo, SIGNAL( activated ( int )),
SLOT(updateSystem(int ) ));
}