summaryrefslogtreecommitdiffabout
path: root/microkde/kdecore/klocale.cpp
Unidiff
Diffstat (limited to 'microkde/kdecore/klocale.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kdecore/klocale.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/microkde/kdecore/klocale.cpp b/microkde/kdecore/klocale.cpp
index 21e6937..d3b04dc 100644
--- a/microkde/kdecore/klocale.cpp
+++ b/microkde/kdecore/klocale.cpp
@@ -86,121 +86,121 @@ QString i18n(const char *text1, const char *textn, int num)
86 if ( pos >= 0 ) text.replace( pos, 2, QString::number( num ) ); 86 if ( pos >= 0 ) text.replace( pos, 2, QString::number( num ) );
87 return text; 87 return text;
88 } 88 }
89} 89}
90 90
91inline void put_it_in( QChar *buffer, uint& index, const QString &s ) 91inline void put_it_in( QChar *buffer, uint& index, const QString &s )
92{ 92{
93 for ( uint l = 0; l < s.length(); l++ ) 93 for ( uint l = 0; l < s.length(); l++ )
94 buffer[index++] = s.at( l ); 94 buffer[index++] = s.at( l );
95} 95}
96 96
97inline void put_it_in( QChar *buffer, uint& index, int number ) 97inline void put_it_in( QChar *buffer, uint& index, int number )
98{ 98{
99 buffer[index++] = number / 10 + '0'; 99 buffer[index++] = number / 10 + '0';
100 buffer[index++] = number % 10 + '0'; 100 buffer[index++] = number % 10 + '0';
101} 101}
102 102
103static int readInt(const QString &str, uint &pos) 103static int readInt(const QString &str, uint &pos)
104{ 104{
105 if (!str.at(pos).isDigit()) return -1; 105 if (!str.at(pos).isDigit()) return -1;
106 int result = 0; 106 int result = 0;
107 for (; str.length() > pos && str.at(pos).isDigit(); pos++) 107 for (; str.length() > pos && str.at(pos).isDigit(); pos++)
108 { 108 {
109 result *= 10; 109 result *= 10;
110 result += str.at(pos).digitValue(); 110 result += str.at(pos).digitValue();
111 } 111 }
112 112
113 return result; 113 return result;
114} 114}
115 115
116KLocale::KLocale() : mCalendarSystem( 0 ) 116KLocale::KLocale() : mCalendarSystem( 0 )
117{ 117{
118 118
119 m_decimalSymbol = "."; 119 m_decimalSymbol = ".";
120 m_positiveSign = ""; 120 m_positiveSign = "";
121 m_negativeSign = "-"; 121 m_negativeSign = "-";
122 m_thousandsSeparator = ","; 122 m_thousandsSeparator = ",";
123 123
124 124
125 125
126 126
127 mWeekStartsMonday = true; 127 mWeekStartsMonday = true;
128 mHourF24Format = true; 128 mHourF24Format = true;
129 mIntDateFormat = Default; 129 mIntDateFormat = Default;
130 mIntTimeFormat = Default; 130 mIntTimeFormat = Default;
131 mLanguage = 0; 131 mLanguage = 0;
132 mDateFormat = "%a %Y %b %d"; 132 mDateFormat = "%a %Y %b %d";
133 mDateFormatShort = "%Y-%m-%d"; 133 mDateFormatShort = "%Y-%m-%d";
134 mTimeZoneList << i18n ("-11:00 US/Samoa") 134 mTimeZoneList << ("-11:00 US/Samoa")
135 << i18n ("-10:00 US/Hawaii") 135 << ("-10:00 US/Hawaii")
136 << i18n ("-09:00 US/Alaska") 136 << ("-09:00 US/Alaska")
137 << i18n ("-08:00 US/Pacific") 137 << ("-08:00 US/Pacific")
138 << i18n ("-07:00 US/Mountain") 138 << ("-07:00 US/Mountain")
139 << i18n ("-06:00 US/Central") 139 << ("-06:00 US/Central")
140 << i18n ("-05:00 US/Eastern") 140 << ("-05:00 US/Eastern")
141 << i18n ("-04:00 Brazil/West") 141 << ("-04:00 Brazil/West")
142 << i18n ("-03:00 Brazil/East") 142 << ("-03:00 Brazil/East")
143 << i18n ("-02:00 Brazil/DeNoronha") 143 << ("-02:00 Brazil/DeNoronha")
144 << i18n ("-01:00 Atlantic/Azores") 144 << ("-01:00 Atlantic/Azores")
145 << i18n (" 00:00 Europe/London(UTC)") 145 << (" 00:00 Europe/London(UTC)")
146 << i18n ("+01:00 Europe/Oslo(CET)") 146 << ("+01:00 Europe/Oslo(CET)")
147 << i18n ("+02:00 Europe/Helsinki") 147 << ("+02:00 Europe/Helsinki")
148 << i18n ("+03:00 Europe/Moscow") 148 << ("+03:00 Europe/Moscow")
149 << i18n ("+04:00 Indian/Mauritius") 149 << ("+04:00 Indian/Mauritius")
150 << i18n ("+05:00 Indian/Maldives") 150 << ("+05:00 Indian/Maldives")
151 << i18n ("+06:00 Indian/Chagos") 151 << ("+06:00 Indian/Chagos")
152 << i18n ("+07:00 Asia/Bangkok") 152 << ("+07:00 Asia/Bangkok")
153 << i18n ("+08:00 Asia/Hongkong") 153 << ("+08:00 Asia/Hongkong")
154 << i18n ("+09:00 Asia/Tokyo") 154 << ("+09:00 Asia/Tokyo")
155 << i18n ("+10:00 Asia/Vladivostok") 155 << ("+10:00 Asia/Vladivostok")
156 << i18n ("+11:00 Asia/Magadan") 156 << ("+11:00 Asia/Magadan")
157 << i18n ("+12:00 Asia/Kamchatka") 157 << ("+12:00 Asia/Kamchatka")
158 // << i18n (" xx:xx User defined offset") 158 // << (" xx:xx User defined offset")
159 << i18n (" Local Time"); 159 << i18n (" Local Time");
160 mSouthDaylight = false; 160 mSouthDaylight = false;
161 mTimeZoneOffset = 0; 161 mTimeZoneOffset = 0;
162 daylightEnabled = false; 162 daylightEnabled = false;
163} 163}
164 164
165void KLocale::setDateFormat( QString s ) 165void KLocale::setDateFormat( QString s )
166{ 166{
167 mDateFormat = s; 167 mDateFormat = s;
168} 168}
169 169
170void KLocale::setDateFormatShort( QString s ) 170void KLocale::setDateFormatShort( QString s )
171{ 171{
172 mDateFormatShort = s; 172 mDateFormatShort = s;
173} 173}
174 174
175void KLocale::setHore24Format ( bool b ) 175void KLocale::setHore24Format ( bool b )
176{ 176{
177 mHourF24Format = b; 177 mHourF24Format = b;
178} 178}
179void KLocale::setWeekStartMonday( bool b ) 179void KLocale::setWeekStartMonday( bool b )
180{ 180{
181 mWeekStartsMonday = b; 181 mWeekStartsMonday = b;
182} 182}
183 183
184KLocale::IntDateFormat KLocale::getIntDateFormat( ) 184KLocale::IntDateFormat KLocale::getIntDateFormat( )
185{ 185{
186 return mIntDateFormat; 186 return mIntDateFormat;
187 187
188} 188}
189void KLocale::setIntDateFormat( KLocale::IntDateFormat i ) 189void KLocale::setIntDateFormat( KLocale::IntDateFormat i )
190{ 190{
191 mIntDateFormat = i; 191 mIntDateFormat = i;
192} 192}
193KLocale::IntDateFormat KLocale::getIntTimeFormat( ) 193KLocale::IntDateFormat KLocale::getIntTimeFormat( )
194{ 194{
195 return mIntTimeFormat; 195 return mIntTimeFormat;
196 196
197} 197}
198void KLocale::setIntTimeFormat( KLocale::IntDateFormat i ) 198void KLocale::setIntTimeFormat( KLocale::IntDateFormat i )
199{ 199{
200 mIntTimeFormat = i; 200 mIntTimeFormat = i;
201} 201}
202 202
203void KLocale::setLanguage( int i ) 203void KLocale::setLanguage( int i )
204{ 204{
205 mLanguage = i; 205 mLanguage = i;
206} 206}