#ifndef COMPLEXPLOT_H #define COMPLEXPLOT_H #include #include class ComplexplotWrapper; class Complexplot { public: enum PlotId { I, Q, Magnitude, Phase }; Complexplot(); ~Complexplot(); template void setNewData(Iterator begin, Iterator end); void setNewData(std::complex* data, int numPoints); void setNewData(std::complex* data, int numPoints); void setTitle(std::string title); void setXAxisAutoScale(PlotId id, bool on); void setYAxisAutoScale(PlotId id, bool on); void setXAxisScale(PlotId id, double xMin, double xMax); void setYAxisScale(PlotId id, double yMin, double yMax); void setXAxisRange(double xMin, double xMax); private: ComplexplotWrapper* plot_; }; template void Complexplot::setNewData(Iterator begin, Iterator end) { int numPoints = end-begin; std::complex* data = new std::complex[numPoints]; for(int i=0;begin!=end;begin++,i++) { data[i] = *begin; } setNewData(data, numPoints); delete[] data; } #endif // COMPLEXPLOT_H