00001 /*************************************************************************** 00002 wavedataviewlayer.h - description 00003 ------------------- 00004 begin : Sun Nov 17 2002 00005 copyright : (C) 2002 by Peter Eschler 00006 email : eschler@users.sourceforge.net 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU Library General Public License as * 00013 * published by the Free Software Foundation; either version 2 of the * 00014 * License, or (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 #ifndef QwavLINEPEAKDATALAYER_H 00019 #define QwavLINEPEAKDATALAYER_H 00020 00021 //--------------------------------------------------------------------------- 00022 // includes: project 00023 //--------------------------------------------------------------------------- 00024 00025 #include "qwavviewlayer.h" 00026 #include "qwavpeakvector.h" 00027 00028 //--------------------------------------------------------------------------- 00029 // includes: Qt 00030 //--------------------------------------------------------------------------- 00031 00032 #include <qcolor.h> 00033 #include <qpainter.h> 00034 00035 //--------------------------------------------------------------------------- 00036 // includes: system 00037 //--------------------------------------------------------------------------- 00038 00039 #include <string> 00040 00041 Qwav_BEGIN_NAMESPACE 00042 00043 //--------------------------------------------------------------------------- 00044 // class: QwavLinePeakDataLayer 00045 //--------------------------------------------------------------------------- 00046 00052 class QWAV_EXPORTIMPORT QwavLinePeakDataLayer : public QwavViewLayer 00053 { 00054 public: 00055 /*---------------------------------------------------------------------*/ 00059 QwavLinePeakDataLayer(); 00060 ~QwavLinePeakDataLayer(); 00061 00066 /*---------------------------------------------------------------------*/ 00070 virtual void paintLayer(QwavWaveView* v, const QRect& rect ); 00071 virtual const string getName(void) const { 00072 return "QwavLinePeakDataLayer"; 00073 } 00074 00079 /*---------------------------------------------------------------------*/ 00083 void setPeakColor(const QColor& c); 00084 inline const QColor& getPeakColor(void) const; 00085 00088 private: 00089 QColor _peakColor; 00090 QPainter _painter; 00091 QwavPeakInfo _peakInfo; 00092 QPoint _prevPixelPos; 00093 }; 00094 00095 00096 //--------------------------------------------------------------------------- 00097 // Method: getPeakColor 00098 //--------------------------------------------------------------------------- 00099 00100 const QColor& QwavLinePeakDataLayer::getPeakColor() const 00101 { 00102 return _peakColor; 00103 } 00104 00105 Qwav_END_NAMESPACE 00106 00107 #endif // QwavLINEPEAKDATALAYER_H