SpikeStream Application Library
0.2
|
00001 #ifndef ANALYSISSPECTROGRAM_H 00002 #define ANALYSISSPECTROGRAM_H 00003 00004 //SpikeStream includes 00005 #include "AnalysisSpectrogram.h" 00006 00007 //Qt includes 00008 #include <qprinter.h> 00009 #include <qprintdialog.h> 00010 00011 //Qwt includes 00012 #include "qwt_plot.h" 00013 #include <qwt_color_map.h> 00014 #include <qwt_plot_spectrogram.h> 00015 #include <qwt_scale_widget.h> 00016 #include <qwt_scale_draw.h> 00017 #include <qwt_plot_zoomer.h> 00018 #include <qwt_plot_panner.h> 00019 #include <qwt_plot_layout.h> 00020 #include <qwt_raster_data.h> 00021 00022 00023 namespace spikestream { 00024 00026 class MyZoomer: public QwtPlotZoomer { 00027 public: 00028 MyZoomer(QwtPlotCanvas *canvas): QwtPlotZoomer(canvas) { 00029 setTrackerMode(AlwaysOn); 00030 } 00031 00032 virtual QwtText trackerText(const QwtDoublePoint &pos) const { 00033 QColor bg(Qt::white); 00034 bg.setAlpha(200); 00035 QwtText text = QwtPlotZoomer::trackerText(pos); 00036 text.setBackgroundBrush( QBrush( bg )); 00037 return text; 00038 } 00039 }; 00040 00041 00043 class AnalysisSpectrogram : public QwtPlot { 00044 Q_OBJECT 00045 00046 public: 00047 AnalysisSpectrogram(QWidget *parent, QwtRasterData* data); 00048 ~AnalysisSpectrogram(); 00049 void showContour(bool on); 00050 void showSpectrogram(bool on); 00051 void printPlot(); 00052 void rescale(); 00053 00054 private: 00055 QwtPlotSpectrogram *d_spectrogram; 00056 }; 00057 00058 } 00059 00060 00061 #endif//ANALYSISSPECTROGRAM_H 00062 00063