Commit a3530015ada90419734523b1eae94e3350738368
1 parent
a7b975a9
Fixed templateviewergrid scoping bug
Showing
2 changed files
with
8 additions
and
6 deletions
openbr/gui/templateviewergrid.cpp
| @@ -18,10 +18,10 @@ void TemplateViewerGrid::setFiles(const FileList &files) | @@ -18,10 +18,10 @@ void TemplateViewerGrid::setFiles(const FileList &files) | ||
| 18 | const int size = std::max(1, (int)ceil(sqrt((float)files.size()))); | 18 | const int size = std::max(1, (int)ceil(sqrt((float)files.size()))); |
| 19 | while (templateViewers.size() < size*size) { | 19 | while (templateViewers.size() < size*size) { |
| 20 | templateViewers.append(QSharedPointer<TemplateViewer>(new TemplateViewer())); | 20 | templateViewers.append(QSharedPointer<TemplateViewer>(new TemplateViewer())); |
| 21 | - connect(templateViewers.last().data(), SIGNAL(newInput(br::File)), this, SIGNAL(newInput(br::File))); | 21 | + connect(templateViewers.last().data(), SIGNAL(newInput(File)), this, SIGNAL(newInput(File))); |
| 22 | connect(templateViewers.last().data(), SIGNAL(newInput(QImage)), this, SIGNAL(newInput(QImage))); | 22 | connect(templateViewers.last().data(), SIGNAL(newInput(QImage)), this, SIGNAL(newInput(QImage))); |
| 23 | connect(templateViewers.last().data(), SIGNAL(newMousePoint(QPointF)), this, SIGNAL(newMousePoint(QPointF))); | 23 | connect(templateViewers.last().data(), SIGNAL(newMousePoint(QPointF)), this, SIGNAL(newMousePoint(QPointF))); |
| 24 | - connect(templateViewers.last().data(), SIGNAL(selectedInput(br::File)), this, SIGNAL(selectedInput(br::File))); | 24 | + connect(templateViewers.last().data(), SIGNAL(selectedInput(File)), this, SIGNAL(selectedInput(File))); |
| 25 | } | 25 | } |
| 26 | 26 | ||
| 27 | { // Clear layout | 27 | { // Clear layout |
openbr/gui/templateviewergrid.h
| 1 | #ifndef BR_TEMPLATEVIEWERGRID_H | 1 | #ifndef BR_TEMPLATEVIEWERGRID_H |
| 2 | #define BR_TEMPLATEVIEWERGRID_H | 2 | #define BR_TEMPLATEVIEWERGRID_H |
| 3 | 3 | ||
| 4 | +#include <QObject> | ||
| 4 | #include <QGridLayout> | 5 | #include <QGridLayout> |
| 5 | #include <QList> | 6 | #include <QList> |
| 6 | #include <QSharedPointer> | 7 | #include <QSharedPointer> |
| 8 | + | ||
| 7 | #include <openbr/openbr_plugin.h> | 9 | #include <openbr/openbr_plugin.h> |
| 8 | 10 | ||
| 9 | #include "templateviewer.h" | 11 | #include "templateviewer.h" |
| @@ -27,10 +29,10 @@ public slots: | @@ -27,10 +29,10 @@ public slots: | ||
| 27 | void setMousePoint(const QPointF &mousePoint); | 29 | void setMousePoint(const QPointF &mousePoint); |
| 28 | 30 | ||
| 29 | signals: | 31 | signals: |
| 30 | - void newInput(br::File input); | ||
| 31 | - void newInput(QImage input); | ||
| 32 | - void newMousePoint(QPointF mousePoint); | ||
| 33 | - void selectedInput(br::File input); | 32 | + void newInput(File); |
| 33 | + void newInput(QImage); | ||
| 34 | + void newMousePoint(QPointF); | ||
| 35 | + void selectedInput(File); | ||
| 34 | }; | 36 | }; |
| 35 | 37 | ||
| 36 | } // namespace br | 38 | } // namespace br |