|
1 /**************************************************************************** |
|
2 ** |
|
3 ** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). |
|
4 ** All rights reserved. |
|
5 ** Contact: Nokia Corporation (developer.feedback@nokia.com) |
|
6 ** |
|
7 ** This file is part of the HbCore module of the UI Extensions for Mobile. |
|
8 ** |
|
9 ** GNU Lesser General Public License Usage |
|
10 ** This file may be used under the terms of the GNU Lesser General Public |
|
11 ** License version 2.1 as published by the Free Software Foundation and |
|
12 ** appearing in the file LICENSE.LGPL included in the packaging of this file. |
|
13 ** Please review the following information to ensure the GNU Lesser General |
|
14 ** Public License version 2.1 requirements will be met: |
|
15 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. |
|
16 ** |
|
17 ** In addition, as a special exception, Nokia gives you certain additional |
|
18 ** rights. These rights are described in the Nokia Qt LGPL Exception |
|
19 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. |
|
20 ** |
|
21 ** If you have questions regarding the use of this file, please contact |
|
22 ** Nokia at developer.feedback@nokia.com. |
|
23 ** |
|
24 ****************************************************************************/ |
|
25 |
|
26 |
|
27 #include <QPoint> |
|
28 #include <hbglobal.h> |
|
29 #include "hbparameterlengthlimiter.h" |
|
30 #include "hbparameterlengthlimiter_p.h" |
|
31 |
|
32 /*! |
|
33 @alpha |
|
34 @hbcore |
|
35 \class HbParameterLengthLimiter |
|
36 \brief HbParameterLengthLimiter is a class that offers support to insert different types of arguments into a QString. |
|
37 |
|
38 Supports upto 9 argument inserts per QString. |
|
39 |
|
40 Supports different kinds of indicators that are used for marking where arguments are inserted |
|
41 - %x for inserting QStrings, where x is number from 1 to 9 indicating the order in which argumentss are positioned. |
|
42 - %[y]x for inserting QStrings, x indicates argument inserting order and y is a number indicating the maximum length |
|
43 for the argument e.g. %[10]2 would mean that the inserted QStrings maximum length is 10 characters and that the |
|
44 limited argument is the second argument to be inserted. |
|
45 - %Lx for inserting numbers, x is used to indicate argument inserting order. |
|
46 |
|
47 Example of how to use HbParameterLengthLimiter |
|
48 \snippet{unittest_HbParameterLengthLimiter/unittest_HbParameterLengthLimiter.cpp,1} |
|
49 |
|
50 */ |
|
51 |
|
52 /*! |
|
53 Constructs a HbParameterLengthLimiter with \a HbParameterLengthLimiter. |
|
54 \a HbLengthLimter& - HbParameterLengthLimiter that will have arguments inserted |
|
55 */ |
|
56 HbParameterLengthLimiter::HbParameterLengthLimiter( const HbParameterLengthLimiter& a ) |
|
57 { |
|
58 p = new HbParameterLengthLimiterPrivate(); |
|
59 p->str = a.p->str; |
|
60 } |
|
61 |
|
62 |
|
63 /*! |
|
64 Constructs a HbParameterLengthLimiter with \a QString. |
|
65 \a QString - QString that will have arguments inserted |
|
66 */ |
|
67 HbParameterLengthLimiter::HbParameterLengthLimiter( QString a ) |
|
68 { |
|
69 p = new HbParameterLengthLimiterPrivate(); |
|
70 p->str = a; |
|
71 } |
|
72 |
|
73 /*! |
|
74 Constructs a HbParameterLengthLimiter with \a char*. |
|
75 \a const char* - char string that will have arguments inserted |
|
76 */ |
|
77 HbParameterLengthLimiter::HbParameterLengthLimiter( const char* a ) |
|
78 { |
|
79 p = new HbParameterLengthLimiterPrivate(); |
|
80 p->str = hbTrId(a); |
|
81 } |
|
82 |
|
83 /*! |
|
84 Constructs a HbParameterLengthLimiter with \a char*. |
|
85 \a const char* - char string that will have arguments inserted |
|
86 \n int - used to identify which plural form to use |
|
87 */ |
|
88 HbParameterLengthLimiter::HbParameterLengthLimiter( const char* a, int n ) |
|
89 { |
|
90 p = new HbParameterLengthLimiterPrivate(); |
|
91 p->str = hbTrId(a, n); |
|
92 } |
|
93 |
|
94 /*! |
|
95 Conp->structs a HbParameterLengthLimiter without a predefined QString. |
|
96 */ |
|
97 HbParameterLengthLimiter::HbParameterLengthLimiter() |
|
98 { |
|
99 p = new HbParameterLengthLimiterPrivate(); |
|
100 p->str = ""; |
|
101 } |
|
102 |
|
103 /*! |
|
104 Destructor |
|
105 */ |
|
106 HbParameterLengthLimiter::~HbParameterLengthLimiter() |
|
107 { |
|
108 delete p; |
|
109 } |
|
110 |
|
111 /*! |
|
112 Inserts an \a argument to a HbParameterLengthLimiter QString. |
|
113 \a qlonglong - number that will be inserted to the QString |
|
114 \fieldwidth int - specifies the minimum amount of space that a is padded to and filled with the character fillChar |
|
115 \base int - defines the number base |
|
116 \fillChar QChar - defines the fill character |
|
117 */ |
|
118 HbParameterLengthLimiter& HbParameterLengthLimiter::arg(qlonglong a, |
|
119 int fieldwidth, |
|
120 int base, |
|
121 const QChar &fillChar) |
|
122 { |
|
123 QChar tmpChar = fillChar; |
|
124 p->str = p->str.arg(a,fieldwidth,base,tmpChar); |
|
125 return *this; |
|
126 } |
|
127 |
|
128 /*! |
|
129 Inserts an \a argument to a HbParameterLengthLimiter QString. |
|
130 \a qulonglong - number that will be inserted to the QString |
|
131 \fieldwidth int - specifies the minimum amount of space that a is padded to and filled with the character fillChar |
|
132 \base int - defines the number base |
|
133 \fillChar QChar - defines the fill character |
|
134 */ |
|
135 HbParameterLengthLimiter& HbParameterLengthLimiter::arg( qulonglong a, |
|
136 int fieldwidth, |
|
137 int base, |
|
138 const QChar &fillChar) |
|
139 { |
|
140 QChar tmpChar = fillChar; |
|
141 p->str = p->str.arg(a,fieldwidth,base,tmpChar); |
|
142 |
|
143 return *this; |
|
144 } |
|
145 |
|
146 /*! |
|
147 Inserts an \a argument to a HbParameterLengthLimiter QString. |
|
148 \a long - number that will be inserted to the QString |
|
149 \fieldwidth int - specifies the minimum amount of space that a is padded to and filled with the character fillChar |
|
150 \base int - defines the number base |
|
151 \fillChar QChar - defines the fill character |
|
152 */ |
|
153 HbParameterLengthLimiter& HbParameterLengthLimiter::arg( long a, |
|
154 int fieldwidth, |
|
155 int base, |
|
156 const QChar &fillChar) |
|
157 { |
|
158 QChar tmpChar = fillChar; |
|
159 p->str = p->str.arg(a,fieldwidth,base,tmpChar); |
|
160 |
|
161 return *this; |
|
162 } |
|
163 |
|
164 /*! |
|
165 Inserts an \a argument to a HbParameterLengthLimiter QString. |
|
166 \a ulong - number that will be inserted to the QString |
|
167 \fieldwidth int - specifies the minimum amount of space that a is padded to and filled with the character fillChar |
|
168 \base int - defines the number base |
|
169 \fillChar QChar - defines the fill character |
|
170 */ |
|
171 HbParameterLengthLimiter& HbParameterLengthLimiter::arg( ulong a, |
|
172 int fieldwidth, |
|
173 int base, |
|
174 const QChar &fillChar) |
|
175 { |
|
176 QChar tmpChar = fillChar; |
|
177 p->str = p->str.arg(a,fieldwidth,base,tmpChar); |
|
178 return *this; |
|
179 } |
|
180 |
|
181 /*! |
|
182 Inserts an \a argument to a HbParameterLengthLimiter QString. |
|
183 \a int - number that will be inserted to the QString |
|
184 \fieldwidth int - specifies the minimum amount of space that a is padded to and filled with the character fillChar |
|
185 \base int - defines the number base |
|
186 \fillChar QChar - defines the fill character |
|
187 */ |
|
188 HbParameterLengthLimiter& HbParameterLengthLimiter::arg( int a, |
|
189 int fieldWidth, |
|
190 int base, |
|
191 const QChar &fillChar) |
|
192 { |
|
193 QChar tmpChar = fillChar; |
|
194 p->str = p->str.arg(a,fieldWidth,base,tmpChar); |
|
195 |
|
196 return *this; |
|
197 } |
|
198 |
|
199 /*! |
|
200 Inserts an \a argument to a HbParameterLengthLimiter QString. |
|
201 \a uint - number that will be inserted to the QString |
|
202 \fieldwidth int - specifies the minimum amount of space that a is padded to and filled with the character fillChar |
|
203 \base int - defines the number base |
|
204 \fillChar QChar - defines the fill character |
|
205 */ |
|
206 HbParameterLengthLimiter& HbParameterLengthLimiter::arg( uint a, |
|
207 int fieldWidth, |
|
208 int base, |
|
209 const QChar &fillChar) |
|
210 { |
|
211 QChar tmpChar = fillChar; |
|
212 p->str = p->str.arg(a,fieldWidth,base,tmpChar); |
|
213 return *this; |
|
214 } |
|
215 |
|
216 /*! |
|
217 Inserts an \a argument to a HbParameterLengthLimiter QString. |
|
218 \a short - number that will be inserted to the QString |
|
219 \fieldwidth int - specifies the minimum amount of space that a is padded to and filled with the character fillChar |
|
220 \base int - defines the number base |
|
221 \fillChar QChar - defines the fill character |
|
222 */ |
|
223 HbParameterLengthLimiter& HbParameterLengthLimiter::arg( short a, |
|
224 int fieldWidth, |
|
225 int base, |
|
226 const QChar &fillChar) |
|
227 { |
|
228 QChar tmpChar = fillChar; |
|
229 p->str = p->str.arg(a,fieldWidth,base,tmpChar); |
|
230 return *this; |
|
231 } |
|
232 |
|
233 /*! |
|
234 Inserts an \a argument to a HbParameterLengthLimiter QString. |
|
235 \a ushort - number that will be inserted to the QString |
|
236 \fieldwidth int - specifies the minimum amount of space that a is padded to and filled with the character fillChar |
|
237 \base int - defines the number base |
|
238 \fillChar QChar - defines the fill character |
|
239 */ |
|
240 HbParameterLengthLimiter& HbParameterLengthLimiter::arg( ushort a, |
|
241 int fieldWidth, |
|
242 int base, |
|
243 const QChar &fillChar) |
|
244 { |
|
245 QChar tmpChar = fillChar; |
|
246 p->str = p->str.arg(a,fieldWidth,base,tmpChar); |
|
247 return *this; |
|
248 } |
|
249 |
|
250 /*! |
|
251 Inserts an \a argument to a HbParameterLengthLimiter QString. |
|
252 \a double - Argument a is formatted according to the specified format and precision. |
|
253 \fieldwidth int - specifies the minimum amount of space that a is padded to and filled with the character fillChar |
|
254 \fmt char - defines the format to be used |
|
255 \prec int - defines the precision to be used |
|
256 \fillChar QChar - defines the fill character |
|
257 */ |
|
258 HbParameterLengthLimiter& HbParameterLengthLimiter::arg( double a, |
|
259 int fieldWidth, |
|
260 char fmt, |
|
261 int prec, |
|
262 const QChar &fillChar) |
|
263 { |
|
264 QChar tmpChar = fillChar; |
|
265 p->str = p->str.arg(a, fieldWidth, fmt, prec, tmpChar); |
|
266 return *this; |
|
267 } |
|
268 |
|
269 /*! |
|
270 Inserts an \a argument to a HbParameterLengthLimiter QString. |
|
271 \a char - character that will be inserted to the QString |
|
272 \fieldwidth int - specifies the minimum amount of space that a is padded to and filled with the character fillChar |
|
273 \fillChar QChar - defines the fill character |
|
274 */ |
|
275 HbParameterLengthLimiter& HbParameterLengthLimiter::arg( char a, |
|
276 int fieldWidth, |
|
277 const QChar &fillChar) |
|
278 { |
|
279 QChar tmpChar = fillChar; |
|
280 p->str = p->str.arg(a, fieldWidth, tmpChar); |
|
281 return *this; |
|
282 } |
|
283 |
|
284 /*! |
|
285 Inserts an \a argument to a HbParameterLengthLimiter QString. |
|
286 \a QChar - character that will be inserted to the QString |
|
287 \fieldwidth int - specifies the minimum amount of space that a is padded to and filled with the character fillChar |
|
288 \fillChar QChar - defines the fill character |
|
289 */ |
|
290 HbParameterLengthLimiter& HbParameterLengthLimiter::arg( QChar a, |
|
291 int fieldWidth, |
|
292 const QChar &fillChar) |
|
293 { |
|
294 QChar tmpChar = fillChar; |
|
295 p->str = p->str.arg(a, fieldWidth, tmpChar); |
|
296 return *this; |
|
297 } |
|
298 |
|
299 /*! |
|
300 Inserts an \a argument to a HbParameterLengthLimiter QString. |
|
301 \a QString - QString that will be inserted to the QString |
|
302 \fieldwidth int - specifies the minimum amount of space that a is padded to and filled with the character fillChar |
|
303 \fillChar QChar - defines the fill character |
|
304 */ |
|
305 HbParameterLengthLimiter& HbParameterLengthLimiter::arg( const QString &a, |
|
306 int fieldWidth, |
|
307 const QChar &fillChar) |
|
308 { |
|
309 QChar tmpChar = fillChar; |
|
310 |
|
311 if ( a.length() == 0 ) { |
|
312 return *this; |
|
313 } |
|
314 |
|
315 QString result = ""; |
|
316 int i = 0; |
|
317 |
|
318 int signPosition; |
|
319 |
|
320 QPoint position(10,0); |
|
321 while ( i < p->str.length() ) { |
|
322 if ( p->str.at(i) == '%' ) { |
|
323 signPosition = i; |
|
324 i++; |
|
325 if ( i >= p->str.length() ) { |
|
326 break; |
|
327 } |
|
328 if ( p->str.at(i).isDigit() ) { |
|
329 //normal QString |
|
330 QString number = p->str.at( i ); |
|
331 if( number.toInt() < position.x() ) { |
|
332 position.setX( number.toInt() ); |
|
333 position.setY( signPosition ); |
|
334 } |
|
335 } else if ( p->str.at(i) == '[' ) { |
|
336 //limited QString |
|
337 i++; |
|
338 if( i >= p->str.length() ) { |
|
339 break; |
|
340 } |
|
341 |
|
342 while( p->str.at(i) != ']' ) { |
|
343 i++; |
|
344 } |
|
345 |
|
346 i++; |
|
347 if( i >= p->str.length() ) { |
|
348 break; |
|
349 } |
|
350 |
|
351 if( p->str.at(i).isDigit() ) { |
|
352 QString number = p->str.at(i); |
|
353 if( number.toInt() < position.x() ) { |
|
354 position.setX( number.toInt() ); |
|
355 position.setY( signPosition ); |
|
356 } |
|
357 } |
|
358 else{ |
|
359 --i; |
|
360 } |
|
361 } |
|
362 } |
|
363 i++; |
|
364 } |
|
365 |
|
366 i = position.y(); |
|
367 if ( p->str.at(i) == '%' ) { |
|
368 result.append( p->str.at(i) ); |
|
369 i++; |
|
370 if ( p->str.at(i).isDigit() ) { |
|
371 //normal QString |
|
372 |
|
373 p->str = p->str.arg( a, fieldWidth, tmpChar ); |
|
374 } else if ( p->str.at(i) == '[' ) { |
|
375 //limited QString |
|
376 |
|
377 i++; |
|
378 if( i >= p->str.length() ) { |
|
379 return *this; |
|
380 } |
|
381 QString limiter = ""; |
|
382 bool limitedFound = false; |
|
383 while (p->str.at(i) != ']'){ |
|
384 if ( p->str.at(i).isNumber() ) { |
|
385 limitedFound = true; |
|
386 limiter.append( p->str.at(i) ); |
|
387 i++; |
|
388 if ( i >= p->str.length() ) { |
|
389 return *this; |
|
390 } |
|
391 } |
|
392 } |
|
393 i++; |
|
394 if ( i >= p->str.length() ) { |
|
395 return *this; |
|
396 } |
|
397 if( limitedFound && p->str.at(i).isNumber() ) { |
|
398 i++; |
|
399 result = p->str.left( position.y() ); |
|
400 int length = limiter.toInt(); |
|
401 QString limitedA = a; |
|
402 |
|
403 int o = 0; |
|
404 int u = 0; |
|
405 if( length < a.length() ) { |
|
406 while ( o <= a.length() ) { |
|
407 // If character is Thai vowel or tone mark, skip it as it does not have length |
|
408 // U+E34 = 3636, U+E3B = 3643, U+E47 = 3655, U+E4D = 3661 |
|
409 // or zero wide space 200B = 8203 |
|
410 if ( (a.at(o).unicode() < 3636 || a.at(o).unicode() > 3643) |
|
411 && (a.at(o).unicode() < 3655 || a.at(o).unicode() > 3661) |
|
412 && a.at(o).unicode() != 8203 ) { |
|
413 u++; |
|
414 } |
|
415 if ( u == length+1 ) { |
|
416 limitedA = a.left( o) ; |
|
417 // Add ellipsis as a mark that QString is truncated |
|
418 limitedA.append( QChar(0x2026) ); |
|
419 break; |
|
420 } |
|
421 o++; |
|
422 } |
|
423 } |
|
424 result.append( "%1" ); |
|
425 int cutter = p->str.length() - i ; |
|
426 QString tmp = p->str.right(cutter); |
|
427 result.append( tmp ); |
|
428 |
|
429 p->str = result.arg( limitedA, fieldWidth, tmpChar ); |
|
430 } |
|
431 |
|
432 } |
|
433 } |
|
434 return *this; |
|
435 } |
|
436 |
|
437 /*! |
|
438 Inserts an arguments \a1 and \a2 to a HbParameterLengthLimiter QString. |
|
439 \a1 QString - QString that will be inserted to the QString |
|
440 \a2 QString - QString that will be inserted to the QString |
|
441 */ |
|
442 HbParameterLengthLimiter& HbParameterLengthLimiter::arg( const QString &a1, |
|
443 const QString &a2 ) |
|
444 { |
|
445 this->arg(a1).arg(a2); |
|
446 return *this; |
|
447 } |
|
448 |
|
449 /*! |
|
450 Inserts an arguments \a1 and \a2 to a HbParameterLengthLimiter QString. |
|
451 \a1 QString - QString that will be inserted to the QString |
|
452 \a2 QString - QString that will be inserted to the QString |
|
453 \a3 QString - QString that will be inserted to the QString |
|
454 */ |
|
455 HbParameterLengthLimiter& HbParameterLengthLimiter::arg( const QString &a1, |
|
456 const QString &a2, |
|
457 const QString &a3) |
|
458 { |
|
459 this->arg(a1, a2).arg(a3); |
|
460 return *this; |
|
461 } |
|
462 |
|
463 /*! |
|
464 Inserts an arguments \a1 and \a2 to a HbParameterLengthLimiter QString. |
|
465 \a1 QString - QString that will be inserted to the QString |
|
466 \a2 QString - QString that will be inserted to the QString |
|
467 \a3 QString - QString that will be inserted to the QString |
|
468 \a4 QString - QString that will be inserted to the QString |
|
469 */ |
|
470 HbParameterLengthLimiter& HbParameterLengthLimiter::arg( const QString &a1, |
|
471 const QString &a2, |
|
472 const QString &a3, |
|
473 const QString &a4 ) |
|
474 { |
|
475 this->arg(a1, a2, a3).arg(a4); |
|
476 return *this; |
|
477 } |
|
478 |
|
479 /*! |
|
480 Inserts an arguments \a1 and \a2 to a HbParameterLengthLimiter QString. |
|
481 \a1 QString - QString that will be inserted to the QString |
|
482 \a2 QString - QString that will be inserted to the QString |
|
483 \a3 QString - QString that will be inserted to the QString |
|
484 \a4 QString - QString that will be inserted to the QString |
|
485 \a5 QString - QString that will be inserted to the QString |
|
486 */ |
|
487 HbParameterLengthLimiter& HbParameterLengthLimiter::arg( const QString &a1, |
|
488 const QString &a2, |
|
489 const QString &a3, |
|
490 const QString &a4, |
|
491 const QString &a5 ) |
|
492 { |
|
493 this->arg(a1, a2, a3, a4 ).arg(a5); |
|
494 return *this; |
|
495 } |
|
496 |
|
497 /*! |
|
498 Inserts an arguments \a1 and \a2 to a HbParameterLengthLimiter QString. |
|
499 \a1 QString - QString that will be inserted to the QString |
|
500 \a2 QString - QString that will be inserted to the QString |
|
501 \a3 QString - QString that will be inserted to the QString |
|
502 \a4 QString - QString that will be inserted to the QString |
|
503 \a5 QString - QString that will be inserted to the QString |
|
504 \a6 QString - QString that will be inserted to the QString |
|
505 */ |
|
506 HbParameterLengthLimiter& HbParameterLengthLimiter::arg( const QString &a1, |
|
507 const QString &a2, |
|
508 const QString &a3, |
|
509 const QString &a4, |
|
510 const QString &a5, |
|
511 const QString &a6 ) |
|
512 { |
|
513 this->arg(a1, a2, a3, a4, a5).arg(a6); |
|
514 return *this; |
|
515 } |
|
516 |
|
517 /*! |
|
518 Inserts an arguments \a1 and \a2 to a HbParameterLengthLimiter QString. |
|
519 \a1 QString - QString that will be inserted to the QString |
|
520 \a2 QString - QString that will be inserted to the QString |
|
521 \a3 QString - QString that will be inserted to the QString |
|
522 \a4 QString - QString that will be inserted to the QString |
|
523 \a5 QString - QString that will be inserted to the QString |
|
524 \a6 QString - QString that will be inserted to the QString |
|
525 \a7 QString - QString that will be inserted to the QString |
|
526 */ |
|
527 HbParameterLengthLimiter& HbParameterLengthLimiter::arg( const QString &a1, |
|
528 const QString &a2, |
|
529 const QString &a3, |
|
530 const QString &a4, |
|
531 const QString &a5, |
|
532 const QString &a6, |
|
533 const QString &a7 ) |
|
534 { |
|
535 this->arg(a1, a2, a3, a4, a5, a6).arg(a7); |
|
536 return *this; |
|
537 } |
|
538 |
|
539 /*! |
|
540 Inserts an arguments \a1 and \a2 to a HbParameterLengthLimiter QString. |
|
541 \a1 QString - QString that will be inserted to the QString |
|
542 \a2 QString - QString that will be inserted to the QString |
|
543 \a3 QString - QString that will be inserted to the QString |
|
544 \a4 QString - QString that will be inserted to the QString |
|
545 \a5 QString - QString that will be inserted to the QString |
|
546 \a6 QString - QString that will be inserted to the QString |
|
547 \a7 QString - QString that will be inserted to the QString |
|
548 \a8 QString - QString that will be inserted to the QString |
|
549 */ |
|
550 HbParameterLengthLimiter& HbParameterLengthLimiter::arg( const QString &a1, |
|
551 const QString &a2, |
|
552 const QString &a3, |
|
553 const QString &a4, |
|
554 const QString &a5, |
|
555 const QString &a6, |
|
556 const QString &a7, |
|
557 const QString &a8 ) |
|
558 { |
|
559 this->arg(a1, a2, a3, a4, a5, a6, a7).arg(a8); |
|
560 return *this; |
|
561 } |
|
562 |
|
563 /*! |
|
564 Inserts an arguments \a1 and \a2 to a HbParameterLengthLimiter QString. |
|
565 \a1 QString - QString that will be inserted to the QString |
|
566 \a2 QString - QString that will be inserted to the QString |
|
567 \a3 QString - QString that will be inserted to the QString |
|
568 \a4 QString - QString that will be inserted to the QString |
|
569 \a5 QString - QString that will be inserted to the QString |
|
570 \a6 QString - QString that will be inserted to the QString |
|
571 \a7 QString - QString that will be inserted to the QString |
|
572 \a8 QString - QString that will be inserted to the QString |
|
573 \a9 QString - QString that will be inserted to the QString |
|
574 */ |
|
575 HbParameterLengthLimiter& HbParameterLengthLimiter::arg( const QString &a1, |
|
576 const QString &a2, |
|
577 const QString &a3, |
|
578 const QString &a4, |
|
579 const QString &a5, |
|
580 const QString &a6, |
|
581 const QString &a7, |
|
582 const QString &a8, |
|
583 const QString &a9 ) |
|
584 { |
|
585 this->arg(a1, a2, a3, a4, a5, a6, a7, a8).arg(a9); |
|
586 return *this; |
|
587 } |
|
588 |
|
589 /*! |
|
590 Changes the QString that is to be used for inserting arguments to \a. |
|
591 \a QString - QString that will be used for inserting arguments |
|
592 */ |
|
593 HbParameterLengthLimiter& HbParameterLengthLimiter::operator=( const QString &a ) |
|
594 { |
|
595 p->str = a; |
|
596 return *this; |
|
597 } |
|
598 |
|
599 /*! |
|
600 Changes the QString that is to be used for inserting arguments to \a. |
|
601 \a HbParameterLengthLimiter - HbParameterLengthLimiter holding the QString that will be used for inserting arguments |
|
602 */ |
|
603 HbParameterLengthLimiter& HbParameterLengthLimiter::operator=( const HbParameterLengthLimiter &a ) |
|
604 { |
|
605 p->str = a.p->str; |
|
606 return *this; |
|
607 } |
|
608 |
|
609 /*! |
|
610 returns the current QString. |
|
611 */ |
|
612 HbParameterLengthLimiter::operator QString() const |
|
613 { |
|
614 return p->str; |
|
615 } |
|
616 |
|
617 |
|
618 |