Commit eb29bd9d25713c88a324cfacba2307d84c0dd199
1 parent
3f860cc9
added option to txtGallery
Showing
1 changed file
with
3 additions
and
1 deletions
openbr/plugins/gallery.cpp
| ... | ... | @@ -541,6 +541,8 @@ BR_REGISTER(Gallery, csvGallery) |
| 541 | 541 | class txtGallery : public Gallery |
| 542 | 542 | { |
| 543 | 543 | Q_OBJECT |
| 544 | + Q_PROPERTY(QString metadataKey READ get_metadataKey WRITE set_metadataKey RESET reset_metadataKey STORED false) | |
| 545 | + BR_PROPERTY(QString, metadataKey, "") | |
| 544 | 546 | |
| 545 | 547 | QStringList lines; |
| 546 | 548 | |
| ... | ... | @@ -563,7 +565,7 @@ class txtGallery : public Gallery |
| 563 | 565 | |
| 564 | 566 | void write(const Template &t) |
| 565 | 567 | { |
| 566 | - lines.append(t.file.flat()); | |
| 568 | + lines.append(metadataKey.isEmpty() ? t.file.flat() : t.file.get<QString>(metadataKey)); | |
| 567 | 569 | } |
| 568 | 570 | }; |
| 569 | 571 | ... | ... |