Commit 2173197af8156091b2d1b741f6205ce900ea46a5

Authored by Scott Klum
2 parents 2ea9cff7 a46641dc

Merge branch 'master' of https://github.com/biometrics/openbr

README.md
... ... @@ -11,6 +11,3 @@ To optionally check out a particular [tagged release](https://github.com/biometr
11 11 $ git submodule update
12 12  
13 13 **[Build Instructions](http://openbiometrics.org/doxygen/latest/installation.html)**
14   -
15   -
16   -[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/biometrics/openbr/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
... ...
openbr/plugins/gallery.cpp
... ... @@ -559,6 +559,38 @@ class txtGallery : public Gallery
559 559 };
560 560  
561 561 BR_REGISTER(Gallery, txtGallery)
  562 +/*!
  563 + * \ingroup galleries
  564 + * \brief Treats each line as a call to File::flat()
  565 + * \author Josh Klontz \cite jklontz
  566 + */
  567 +class flatGallery : public Gallery
  568 +{
  569 + Q_OBJECT
  570 + QStringList lines;
  571 +
  572 + ~flatGallery()
  573 + {
  574 + if (!lines.isEmpty())
  575 + QtUtils::writeFile(file.name, lines);
  576 + }
  577 +
  578 + TemplateList readBlock(bool *done)
  579 + {
  580 + TemplateList templates;
  581 + foreach (const QString &line, QtUtils::readLines(file))
  582 + templates.append(File(line));
  583 + *done = true;
  584 + return templates;
  585 + }
  586 +
  587 + void write(const Template &t)
  588 + {
  589 + lines.append(t.file.flat());
  590 + }
  591 +};
  592 +
  593 +BR_REGISTER(Gallery, flatGallery)
562 594  
563 595 /*!
564 596 * \ingroup galleries
... ...