00001 /*************************************************************************** 00002 zerolineviewlayer.h - description 00003 ------------------- 00004 begin : Sat Nov 16 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 QwavZEROLINEVIEWLAYER_H 00019 #define QwavZEROLINEVIEWLAYER_H 00020 00021 #include "qwavviewlayer.h" 00022 00023 //--------------------------------------------------------------------------- 00024 // includes: system 00025 //--------------------------------------------------------------------------- 00026 00027 #include <string> 00028 00029 //--------------------------------------------------------------------------- 00030 // includes: Qt 00031 //--------------------------------------------------------------------------- 00032 00033 #include <qcolor.h> 00034 00035 using namespace std; 00036 00037 00038 Qwav_BEGIN_NAMESPACE 00039 00040 //--------------------------------------------------------------------------- 00041 // Class: QwavZeroLineLayer 00042 //--------------------------------------------------------------------------- 00043 00049 class QWAV_EXPORTIMPORT QwavZeroLineLayer : public QwavViewLayer 00050 { 00051 00052 public: 00053 QwavZeroLineLayer(); 00054 ~QwavZeroLineLayer(); 00055 00056 virtual void paintLayer(QwavWaveView* v, const QRect& rect ); 00057 virtual const string getName() const { return "QwavZeroLineLayer"; } 00058 00059 inline void setLineColor( const QColor& c ); 00060 inline const QColor& getLineColor() const; 00061 00062 private: 00063 QColor _lineColor; 00064 00065 }; 00066 00067 00068 00069 //--------------------------------------------------------------------------- 00070 // Method: setLineColor 00071 //--------------------------------------------------------------------------- 00072 00073 void QwavZeroLineLayer::setLineColor( const QColor& c ) 00074 { 00075 _lineColor = c; 00076 } 00077 00078 00079 //--------------------------------------------------------------------------- 00080 // Method: getLineColor 00081 //--------------------------------------------------------------------------- 00082 00083 const QColor& QwavZeroLineLayer::getLineColor() const 00084 { 00085 return _lineColor; 00086 } 00087 00088 Qwav_END_NAMESPACE 00089 00090 #endif // QwavZEROLINEVIEWLAYER_H