From 190b87555d6313fe007f8a0c1ac29eed3c7055f4 Mon Sep 17 00:00:00 2001 From: Charles Otto Date: Fri, 5 Apr 2013 19:03:32 -0400 Subject: [PATCH] Remove original Show transform, rename Show2 to Show --- openbr/plugins/gui.cpp | 15 +++++++-------- openbr/plugins/misc.cpp | 40 ---------------------------------------- 2 files changed, 7 insertions(+), 48 deletions(-) diff --git a/openbr/plugins/gui.cpp b/openbr/plugins/gui.cpp index 2d22e82..4156cff 100644 --- a/openbr/plugins/gui.cpp +++ b/openbr/plugins/gui.cpp @@ -111,20 +111,19 @@ public slots: * \ingroup transforms * \brief Displays templates in a GUI pop-up window using QT. * \author Charles Otto \cite caotto - * Unlike ShowTransform, this can be used with parallelism enabled, although it - * is considered TimeVarying. + * Can be used with parallelism enabled, although it is considered TimeVarying. */ -class Show2Transform : public TimeVaryingTransform +class ShowTransform : public TimeVaryingTransform { Q_OBJECT public: Q_PROPERTY(bool waitInput READ get_waitInput WRITE set_waitInput RESET reset_waitInput STORED false) - BR_PROPERTY(bool, waitInput, false) + BR_PROPERTY(bool, waitInput, true) Q_PROPERTY(QStringList keys READ get_keys WRITE set_keys RESET reset_keys STORED false) BR_PROPERTY(QStringList, keys, QStringList("FrameNumber")) - Show2Transform() : TimeVaryingTransform(false, false) + ShowTransform() : TimeVaryingTransform(false, false) { // Create our GUI proxy gui = new GUIProxy(); @@ -136,7 +135,7 @@ public: connect(this, SIGNAL(updateImage(QPixmap)), gui,SLOT(showImage(QPixmap))); } - ~Show2Transform() + ~ShowTransform() { delete gui; } @@ -145,7 +144,7 @@ public: void project(const TemplateList &src, TemplateList &dst) const { - Transform * non_const = (Show2Transform *) this; + Transform * non_const = (ShowTransform *) this; non_const->projectUpdate(src,dst); } @@ -210,7 +209,7 @@ signals: void hideWindow(); }; -BR_REGISTER(Transform, Show2Transform) +BR_REGISTER(Transform, ShowTransform) class FPSSynch : public TimeVaryingTransform { diff --git a/openbr/plugins/misc.cpp b/openbr/plugins/misc.cpp index bfeaf1e..63b2664 100644 --- a/openbr/plugins/misc.cpp +++ b/openbr/plugins/misc.cpp @@ -51,46 +51,6 @@ BR_REGISTER(Transform, OpenTransform) /*! * \ingroup transforms - * \brief Displays templates in a GUI pop-up window. - * \author Josh Klontz \cite jklontz - */ -class ShowTransform : public UntrainableMetaTransform -{ - Q_OBJECT - Q_PROPERTY(bool waitKey READ get_waitKey WRITE set_waitKey RESET reset_waitKey STORED false) - BR_PROPERTY(bool, waitKey, true) - - static int counter; - int uid; - - void init() - { - uid = counter++; - Globals->setProperty("parallelism", "0"); // Can only work in single threaded mode - } - - void project(const Template &src, Template &dst) const - { - dst = src; - - if (Globals->parallelism) { - qWarning("Show::project() only works in single threaded mode."); - return; - } - - for (int i=0; i 1 ? "-" + QString::number(uid*src.size()+i) : QString()), false); - - if (waitKey && !src.isEmpty()) cv::waitKey(-1); - } -}; - -int ShowTransform::counter = 0; - -BR_REGISTER(Transform, ShowTransform) - -/*! - * \ingroup transforms * \brief Prints the template's file to stdout or stderr. * \author Josh Klontz \cite jklontz */ -- libgit2 0.21.4