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 General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 #ifndef QwavWAVEDATAVIEWLAYER_H 00019 #define QwavWAVEDATAVIEWLAYER_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: QwavPeakDataLayer 00045 //--------------------------------------------------------------------------- 00046 00052 class QWAV_EXPORTIMPORT QwavPeakDataLayer : public QwavViewLayer 00053 { 00054 public: 00055 /*---------------------------------------------------------------------*/ 00059 QwavPeakDataLayer(); 00060 ~QwavPeakDataLayer(); 00061 00066 /*---------------------------------------------------------------------*/ 00070 virtual void paintLayer(QwavWaveView* v, const QRect& rect ); 00071 virtual const string getName(void) const { return "QwavPeakDataLayer"; } 00072 00077 /*---------------------------------------------------------------------*/ 00081 void setPeakColor(const QColor& c); 00082 inline const QColor& getPeakColor(void) const; 00083 00086 private: 00087 QColor _peakColor; 00088 QPainter _painter; 00089 QwavPeakInfo _peakInfo; 00090 }; 00091 00092 00093 //--------------------------------------------------------------------------- 00094 // Method: getPeakColor 00095 //--------------------------------------------------------------------------- 00096 00097 const QColor& QwavPeakDataLayer::getPeakColor() const 00098 { 00099 return _peakColor; 00100 } 00101 00102 Qwav_END_NAMESPACE 00103 00104 #endif // QwavWAVEDATAVIEWLAYER_H