Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/kmymoneyutils.h
| Show First 20 Lines • Show All 389 Lines • ▼ Show 20 Line(s) | 75 | public: | |||
|---|---|---|---|---|---|
| 390 | 390 | | |||
| 391 | static QDebug debug(); | 391 | static QDebug debug(); | ||
| 392 | 392 | | |||
| 393 | static MyMoneyForecast forecast(); | 393 | static MyMoneyForecast forecast(); | ||
| 394 | 394 | | |||
| 395 | static bool canUpdateAllAccounts(); | 395 | static bool canUpdateAllAccounts(); | ||
| 396 | 396 | | |||
| 397 | static void showStatementImportResult(const QStringList& resultMessages, uint statementCount); | 397 | static void showStatementImportResult(const QStringList& resultMessages, uint statementCount); | ||
| 398 | | ||||
| 399 | /** | ||||
| 400 | * This method returns a double converted into a QString | ||||
| 401 | * after removing any group separators, trailing zeros, | ||||
| 402 | * and decimal separators. | ||||
| 403 | * | ||||
| 404 | * @param val reference to a qreal value to be converted | ||||
| 405 | * @param loc reference to a Qlocale converter | ||||
| 406 | * @param f format specifier: | ||||
| 407 | * e - format as [-]9.9e[+|-]999 | ||||
| 408 | * E - format as [-]9.9E[+|-]999 | ||||
| 409 | * f - format as [-]9.9 | ||||
| 410 | * g - use e or f format, whichever is the most concise | ||||
| 411 | * G - use E or f format, whichever is the most concise | ||||
| 412 | * @param prec precision representing the number of digits | ||||
| 413 | * after the decimal point ('e', 'E' and 'f' formats) | ||||
| 414 | * or the maximum number of significant digits | ||||
| 415 | * (trailing zeroes are omitted) ('g' and 'G' formats) | ||||
| 416 | * @return QString object containing the converted value | ||||
| 417 | */ | ||||
| 418 | static QString normalizeNumericString(const qreal& val, const QLocale& loc, const char f = 'g', const int prec = 6); | ||||
| 398 | }; | 419 | }; | ||
| 399 | 420 | | |||
| 400 | #endif | 421 | #endif | ||