Commit e753e4edeb1c4b0f88c078e522fd67a84fd3c120

Authored by jklontz
2 parents de040f81 90c574fe

Merge pull request #88 from biometrics/name_property

allow File::name to be queried using 'name' property
openbr/openbr_plugin.cpp
@@ -127,12 +127,12 @@ QString File::resolved() const @@ -127,12 +127,12 @@ QString File::resolved() const
127 127
128 bool File::contains(const QString &key) const 128 bool File::contains(const QString &key) const
129 { 129 {
130 - return m_metadata.contains(key) || Globals->contains(key); 130 + return m_metadata.contains(key) || Globals->contains(key) || key == "name";
131 } 131 }
132 132
133 QVariant File::value(const QString &key) const 133 QVariant File::value(const QString &key) const
134 { 134 {
135 - return m_metadata.contains(key) ? m_metadata.value(key) : Globals->property(qPrintable(key)); 135 + return m_metadata.contains(key) ? m_metadata.value(key) : (key == "name" ? name : Globals->property(qPrintable(key)));
136 } 136 }
137 137
138 QVariant File::parse(const QString &value) 138 QVariant File::parse(const QString &value)
openbr/openbr_plugin.h
@@ -138,6 +138,7 @@ void reset_##NAME() { NAME = DEFAULT; } @@ -138,6 +138,7 @@ void reset_##NAME() { NAME = DEFAULT; }
138 * 138 *
139 * Key | Value | Description 139 * Key | Value | Description
140 * --- | ---- | ----------- 140 * --- | ---- | -----------
  141 + * name | QString | Contents of #name
141 * separator | QString | Seperate #name into multiple files 142 * separator | QString | Seperate #name into multiple files
142 * Index | int | Index of a template in a template list 143 * Index | int | Index of a template in a template list
143 * Confidence | float | Classification/Regression quality 144 * Confidence | float | Classification/Regression quality