/* * QSeisCurveRegistry.cpp * * Created on: Jan 30, 2011 * Author: landvogt */ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include "UIElements/Views/Qt4/Plotting/QSeisCurveRegistry.hpp" #include "UIElements/Views/Qt4/Plotting/QSeisPlotCurve.hpp" // have this after(!) all Qt includes #include "CodePatterns/MemDebug.hpp" #include "CodePatterns/Registry_impl.hpp" #include "CodePatterns/Singleton_impl.hpp" #include QSeisCurveRegistry::QSeisCurveRegistry() { } QSeisCurveRegistry::~QSeisCurveRegistry() {} void QSeisCurveRegistry::registerInstance(QSeisPlotCurve *instance) { Registry::registerInstance(instance); emit curveAdded(instance->getName(), instance->type); } void QSeisCurveRegistry::unregisterInstance(QSeisPlotCurve *instance) { Registry::unregisterInstance(instance); emit curveRemoved(instance->getName(), instance->type); } void QSeisCurveRegistry::resetRegistry() { for (std::map::iterator iter = getBeginIter(); iter != getEndIter(); ++iter) emit curveRemoved(iter->first, iter->second->type); Registry::cleanup(); } CONSTRUCT_SINGLETON(QSeisCurveRegistry) CONSTRUCT_REGISTRY(QSeisPlotCurve)