#include <Utils.h>
|
void | initFramework () const |
|
void | registerVersion () const |
|
QString | createFilePath (const QString &filePath, const QString &attribute, const QString &newSuffix=QString()) const |
| Creates a new file path from filePath. Hence, C:.png can be turned into C:-something.xml More...
|
|
QString | baseName (const QString &filePath) const |
| Returns the filePath without suffix. C:/temp/something.png -> C:/temp/something This fixes an issue of Qt QFileInfo::baseName which returns wrong basenames if the filename contains dots Qt baseName: Best. 901 Nr. 112 00147.jpg -> Best. This method: Best. 901 Nr. 112 00147.jpg -> Best. 901 Nr. 112 00147 More...
|
|
|
static Utils & | instance () |
|
static double | rand () |
| Returns a random number within [0 1]. More...
|
|
static QJsonObject | readJson (const QString &filePath) |
|
static int64 | writeJson (const QString &filePath, const QJsonObject &jo) |
|
QString rdf::Utils::baseName |
( |
const QString & |
filePath | ) |
const |
Returns the filePath without suffix. C:/temp/something.png -> C:/temp/something This fixes an issue of Qt QFileInfo::baseName which returns wrong basenames if the filename contains dots Qt baseName: Best. 901 Nr. 112 00147.jpg -> Best. This method: Best. 901 Nr. 112 00147.jpg -> Best. 901 Nr. 112 00147
- Parameters
-
- Returns
- The file path without suffix.
QString rdf::Utils::createFilePath |
( |
const QString & |
filePath, |
|
|
const QString & |
attribute, |
|
|
const QString & |
newSuffix = QString() |
|
) |
| const |
Creates a new file path from filePath. Hence, C:.png can be turned into C:-something.xml
- Parameters
-
filePath | The old file path. |
attribute | An attribute string which is appended to the filename. |
newSuffix | A new suffix, the old suffix is used if empty. |
- Returns
- The new file path.
void rdf::Utils::initFramework |
( |
| ) |
const |
Utils & rdf::Utils::instance |
( |
| ) |
|
|
static |
double rdf::Utils::rand |
( |
| ) |
|
|
static |
Returns a random number within [0 1].
- Returns
QJsonObject rdf::Utils::readJson |
( |
const QString & |
filePath | ) |
|
|
static |
void rdf::Utils::registerVersion |
( |
| ) |
const |
int64 rdf::Utils::writeJson |
( |
const QString & |
filePath, |
|
|
const QJsonObject & |
jo |
|
) |
| |
|
static |
The documentation for this class was generated from the following files: