#ifndef WATERFALL_3D_DISPLAY_PLOT_HPP #define WATERFALL_3D_DISPLAY_PLOT_HPP #include #include #include #include #include #include class Waterfall3DColorMap: public Qwt3D::Color, public QwtLinearColorMap { public: Waterfall3DColorMap(); virtual ~Waterfall3DColorMap(); virtual Qwt3D::RGBA operator()(double x, double y, double z)const; virtual Qwt3D::ColorVector& createVector(Qwt3D::ColorVector& vec); virtual void SetInterval(const double minValue, const double maxValue); protected: private: QwtDoubleInterval _interval; }; class Waterfall3DDisplayPlot:public Qwt3D::SurfacePlot{ Q_OBJECT protected: class IntensityScale:public Qwt3D::LinearScale{ friend class Qwt3D::Axis; friend class Qwt3D::qwt3d_ptr; private: double _floor; public: explicit IntensityScale(const double newFloor):_floor(newFloor){ } virtual ~IntensityScale(){} virtual QString ticLabel(unsigned int idx) const{ if (idx; friend class Waterfall3DDisplayPlot; private: Waterfall3DDisplayPlot* _plot; public: TimeScale(Waterfall3DDisplayPlot* plot ):_plot(plot){ } virtual ~TimeScale(){ } virtual QString ticLabel(unsigned int idx) const{ if (idx_dataTimestamp, -(_plot->_timePerFFT) * majors_p[idx]); struct tm timeTm; gmtime_r(&markerTime.tv_sec, &timeTm); char* timeBuffer = new char[128]; snprintf(timeBuffer, 128, "%02d:%02d:%02d.%03ld", timeTm.tm_hour, timeTm.tm_min, timeTm.tm_sec, (markerTime.tv_nsec / 1000000)); QString returnBuffer(timeBuffer); delete[] timeBuffer; return returnBuffer; } return QString(""); } //! Returns a new heap based object utilized from qwt3d_ptr Scale* clone() const {return new TimeScale(*this);} }; class FrequencyScale: public Qwt3D::LinearScale{ friend class Qwt3D::Axis; friend class Qwt3D::qwt3d_ptr; private: double _centerFrequency; bool _useCenterFrequencyFlag; public: FrequencyScale(bool useCenterFrequencyFlag, double centerFrequency) : _centerFrequency(centerFrequency),_useCenterFrequencyFlag(useCenterFrequencyFlag) {} virtual ~FrequencyScale(){} virtual QString ticLabel(unsigned int idx) const { if (idx