diff --git a/README.md b/README.md index 95b43b3..262d664 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,3 @@ To optionally check out a particular [tagged release](https://github.com/biometr $ git submodule update **[Build Instructions](http://openbiometrics.org/doxygen/latest/installation.html)** - - -[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/biometrics/openbr/trend.png)](https://bitdeli.com/free "Bitdeli Badge") diff --git a/openbr/plugins/gallery.cpp b/openbr/plugins/gallery.cpp index f4fa0ff..e1e2144 100644 --- a/openbr/plugins/gallery.cpp +++ b/openbr/plugins/gallery.cpp @@ -559,6 +559,38 @@ class txtGallery : public Gallery }; BR_REGISTER(Gallery, txtGallery) +/*! + * \ingroup galleries + * \brief Treats each line as a call to File::flat() + * \author Josh Klontz \cite jklontz + */ +class flatGallery : public Gallery +{ + Q_OBJECT + QStringList lines; + + ~flatGallery() + { + if (!lines.isEmpty()) + QtUtils::writeFile(file.name, lines); + } + + TemplateList readBlock(bool *done) + { + TemplateList templates; + foreach (const QString &line, QtUtils::readLines(file)) + templates.append(File(line)); + *done = true; + return templates; + } + + void write(const Template &t) + { + lines.append(t.file.flat()); + } +}; + +BR_REGISTER(Gallery, flatGallery) /*! * \ingroup galleries