summaryrefslogtreecommitdiff
path: root/noncore/settings/netsystemtime/formattabwidget.cpp
Unidiff
Diffstat (limited to 'noncore/settings/netsystemtime/formattabwidget.cpp') (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 7d01bff..a037881 100644
--- a/noncore/settings/netsystemtime/formattabwidget.cpp
+++ b/noncore/settings/netsystemtime/formattabwidget.cpp
@@ -49,55 +49,55 @@ FormatTabWidget::FormatTabWidget( QWidget *parent )
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] )