File - public methods */ Note that the convention for displaying metadata is as follows: [] for lists in which argument order does not matter (e.g. [FTO=false, Index=0]), () for lists in which argument order matters (e.g. First_Eye(100.0,100.0)).
| 61 | // [] for lists in which argument order does not matter (e.g. [FTO=false, Index=0]), |
| 62 | // () for lists in which argument order matters (e.g. First_Eye(100.0,100.0)). |
| 63 | QString File::flat() const |
| 64 | { |
| 65 | QStringList values; |
| 66 | QStringList keys = this->localKeys(); qSort(keys); |
| 67 | foreach (const QString &key, keys) { |
| 68 | const QVariant value = this->value(key); |
| 69 | if (value.isNull()) values.append(key); |
| 70 | else values.append(key + "=" + QtUtils::toString(value)); |
| 71 | } |
| 72 | |
| 73 | QString flat = name; |
| 74 | if (!values.isEmpty()) flat += "[" + values.join(", ") + "]"; |
| 75 | return flat; |
| 76 | } |
| 77 | |
| 78 | QString File::hash() const |
| 79 | { |
no test coverage detected