summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2005-08-11 10:13:34 (UTC)
committer llornkcor <llornkcor>2005-08-11 10:13:34 (UTC)
commit6542c453a070319be133ca2a7313ef054f60460c (patch) (unidiff)
treefb3914cde357b4e693713aa2cff5bb5e04b063dd
parent6040d26c56a95d9f5bd09688e22009fc5b5e124d (diff)
downloadopie-6542c453a070319be133ca2a7313ef054f60460c.zip
opie-6542c453a070319be133ca2a7313ef054f60460c.tar.gz
opie-6542c453a070319be133ca2a7313ef054f60460c.tar.bz2
revert
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/netsystemtime/formattabwidget.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/settings/netsystemtime/formattabwidget.cpp b/noncore/settings/netsystemtime/formattabwidget.cpp
index a037881..7d01bff 100644
--- a/noncore/settings/netsystemtime/formattabwidget.cpp
+++ b/noncore/settings/netsystemtime/formattabwidget.cpp
@@ -41,71 +41,71 @@
41#include <qlayout.h> 41#include <qlayout.h>
42#include <qscrollview.h> 42#include <qscrollview.h>
43#include <qtimer.h> 43#include <qtimer.h>
44 44
45FormatTabWidget::FormatTabWidget( QWidget *parent ) 45FormatTabWidget::FormatTabWidget( QWidget *parent )
46 : QWidget( parent, 0x0, 0 ) 46 : QWidget( parent, 0x0, 0 )
47{ 47{
48 QVBoxLayout *tmpvb = new QVBoxLayout( this ); 48 QVBoxLayout *tmpvb = new QVBoxLayout( this );
49 QScrollView *sv = new QScrollView( this ); 49 QScrollView *sv = new QScrollView( this );
50 tmpvb->addWidget( sv, 0, 0 ); 50 tmpvb->addWidget( sv, 0, 0 );
51 sv->setResizePolicy( QScrollView::AutoOneFit ); 51 sv->setResizePolicy( QScrollView::AutoOneFit );
52 sv->setFrameStyle( QFrame::NoFrame ); 52 sv->setFrameStyle( QFrame::NoFrame );
53 QWidget *container = new QWidget( sv->viewport() ); 53 QWidget *container = new QWidget( sv->viewport() );
54 sv->addChild( container ); 54 sv->addChild( container );
55 55
56 QGridLayout *layout = new QGridLayout( container ); 56 QGridLayout *layout = new QGridLayout( container );
57 layout->setMargin( 2 ); 57 layout->setMargin( 2 );
58 layout->setSpacing( 4 ); 58 layout->setSpacing( 4 );
59 59
60 // Time format selector 60 // Time format selector
61 layout->addWidget( new QLabel( tr( "Time format" ), container ), 0, 0 ); 61 layout->addWidget( new QLabel( tr( "Time format" ), container ), 0, 0 );
62 cbAppletFormat = new QComboBox( container ); 62 cbAppletFormat = new QComboBox( container );
63 cbAppletFormat->insertItem( tr( "hh:mm" ), 0 ); 63 cbAppletFormat->insertItem( tr( "hh:mm" ), 0 );
64 cbAppletFormat->insertItem( tr( "D/M hh:mm" ), 1 ); 64 cbAppletFormat->insertItem( tr( "D/M hh:mm" ), 1 );
65 cbAppletFormat->insertItem( tr( "M/D hh:mm" ), 2 ); 65 cbAppletFormat->insertItem( tr( "M/D hh:mm" ), 2 );
66 layout->addWidget( cbAppletFormat, 0, 1 ); 66 layout->addWidget( cbAppletFormat, 0, 1 );
67 67
68 // 12/24 hour selector 68 // 12/24 hour selector
69 layout->addWidget( new QLabel( tr( "12/24 hour" ), container ), 1, 0 ); 69 layout->addWidget( new QLabel( tr( "12/24 hour" ), container ), 1, 0 );
70 cbAmpm = new QComboBox( container ); 70 cbAmpm = new QComboBox( container );
71 cbAmpm->insertItem( tr( "24 hour" ), 0 ); 71 cbAmpm->insertItem( tr( "24 hour" ), 0 );
72 cbAmpm->insertItem( tr( "12 hour" ), 1 ); 72 cbAmpm->insertItem( tr( "12 hour" ), 1 );
73 connect( cbAmpm, SIGNAL(activated( int)), this, SIGNAL(show12HourTime( int)) ); 73 connect( cbAmpm, SIGNAL(activated(int)), this, SIGNAL(show12HourTime(int)) );
74 layout->addWidget( cbAmpm, 1, 1 ); 74 layout->addWidget( cbAmpm, 1, 1 );
75 75
76 // Date format selector 76 // Date format selector
77 layout->addWidget( new QLabel( tr( "Date format" ), container ), 2, 0 ); 77 layout->addWidget( new QLabel( tr( "Date format" ), container ), 2, 0 );
78 cbDateFormat = new QComboBox( container ); 78 cbDateFormat = new QComboBox( container );
79 connect( cbDateFormat, SIGNAL(activated( int)), this, SLOT(slotDateFormatChanged( int)) ); 79 connect( cbDateFormat, SIGNAL(activated(int)), this, SLOT(slotDateFormatChanged(int)) );
80 layout->addWidget( cbDateFormat, 2, 1 ); 80 layout->addWidget( cbDateFormat, 2, 1 );
81 81
82 // Week starts on selector 82 // Week starts on selector
83 layout->addWidget( new QLabel( tr( "Weeks start on" ), container ), 3, 0 ); 83 layout->addWidget( new QLabel( tr( "Weeks start on" ), container ), 3, 0 );
84 cbWeekStart = new QComboBox( container ); 84 cbWeekStart = new QComboBox( container );
85 cbWeekStart->insertItem( tr( "Sunday" ), 0 ); 85 cbWeekStart->insertItem( tr( "Sunday" ), 0 );
86 cbWeekStart->insertItem( tr( "Monday" ), 1 ); 86 cbWeekStart->insertItem( tr( "Monday" ), 1 );
87 connect( cbWeekStart, SIGNAL(activated(int)), this, SIGNAL(weekStartChanged(int)) ); 87 connect( cbWeekStart, SIGNAL(activated(int)), this, SIGNAL(weekStartChanged(int)) );
88 layout->addWidget( cbWeekStart, 3, 1 ); 88 layout->addWidget( cbWeekStart, 3, 1 );
89 89
90 // Initialize values 90 // Initialize values
91 Config config( "qpe" ); 91 Config config( "qpe" );
92 config.setGroup( "Date" ); 92 config.setGroup( "Date" );
93 cbAppletFormat->setCurrentItem( config.readNumEntry( "ClockApplet", 0 ) ); 93 cbAppletFormat->setCurrentItem( config.readNumEntry( "ClockApplet", 0 ) );
94 94
95 DateFormat df(QChar(config.readEntry("Separator", "/")[0]), 95 DateFormat df(QChar(config.readEntry("Separator", "/")[0]),
96 (DateFormat::Order)config .readNumEntry("ShortOrder", DateFormat::DayMonthYear), 96 (DateFormat::Order)config .readNumEntry("ShortOrder", DateFormat::DayMonthYear),
97 (DateFormat::Order)config.readNumEntry("LongOrder", DateFormat::DayMonthYear)); 97 (DateFormat::Order)config.readNumEntry("LongOrder", DateFormat::DayMonthYear));
98 98
99 int currentdf = 0; 99 int currentdf = 0;
100 date_formats[0] = DateFormat( '/', DateFormat::MonthDayYear ); 100 date_formats[0] = DateFormat( '/', DateFormat::MonthDayYear );
101 cbDateFormat->insertItem( tr( date_formats[0].toNumberString() ) ); 101 cbDateFormat->insertItem( tr( date_formats[0].toNumberString() ) );
102 date_formats[1] = DateFormat( '.', DateFormat::DayMonthYear ); 102 date_formats[1] = DateFormat( '.', DateFormat::DayMonthYear );
103 if ( df == date_formats[1] ) 103 if ( df == date_formats[1] )
104 currentdf = 1; 104 currentdf = 1;
105 cbDateFormat->insertItem( tr( date_formats[1].toNumberString() ) ); 105 cbDateFormat->insertItem( tr( date_formats[1].toNumberString() ) );
106 date_formats[2] = DateFormat( '-', DateFormat::YearMonthDay, DateFormat::DayMonthYear ); 106 date_formats[2] = DateFormat( '-', DateFormat::YearMonthDay, DateFormat::DayMonthYear );
107 if ( df == date_formats[2] ) 107 if ( df == date_formats[2] )
108 currentdf = 2; 108 currentdf = 2;
109 cbDateFormat->insertItem( tr( date_formats[2].toNumberString() ) ); //ISO8601 109 cbDateFormat->insertItem( tr( date_formats[2].toNumberString() ) ); //ISO8601
110 date_formats[3] = DateFormat( '/', DateFormat::DayMonthYear ); 110 date_formats[3] = DateFormat( '/', DateFormat::DayMonthYear );
111 if ( df == date_formats[3] ) 111 if ( df == date_formats[3] )