Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

qwavmarkerinterface.h

00001 /***************************************************************************
00002                           qwavmarkerinterface.h  -  description
00003                              -------------------
00004     begin                : Mon Nov 18 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 Qwav_MARKERINTERFACE_H
00019 #define Qwav_MARKERINTERFACE_H
00020 
00021 #include <map>
00022 #include <vector>
00023 
00024 #include "qwavdefines.h"
00025 #include "qwavmarker.h"
00026 
00027 using namespace std;
00028 
00029 Qwav_BEGIN_NAMESPACE
00030 
00034 class QWAV_EXPORTIMPORT QwavMarkerInterface 
00035 {
00036 public:
00037     const QwavMarker  nullMarker;
00038     
00039     int         addMarker(const QwavMarker& marker);
00040     bool        removeMarker(uint id);
00041 //     QwavMarker& getMarker(ulong sample);
00042     QwavMarker& getMarker(uint id);
00043     int         hasMarkerAt(uint pixel, ulong firstSample, double zoomFac, int pixelTolerance=3) const;
00044     inline uint nrOfMarkers() const;
00045     inline void setActiveMarker(int markerId );
00046     inline int  activeMarker() const;
00047     vector<uint> getMarkerIds() const;
00048 
00049 protected:
00050     QwavMarkerInterface() : _activeMarkerID(-1) {};
00051     virtual ~QwavMarkerInterface() {};
00052 
00053 private:    
00054     map<uint,QwavMarker> _marker;
00055     int _activeMarkerID;
00056 
00057 
00058 };
00059 
00063 uint QwavMarkerInterface::nrOfMarkers() const
00064 {
00065     return _marker.size();
00066 }
00067 
00073 void QwavMarkerInterface::setActiveMarker(int markerId )
00074 {
00075     _activeMarkerID = markerId;
00076 }
00077 
00081 int  QwavMarkerInterface::activeMarker() const
00082 {
00083     return _activeMarkerID;
00084 }
00085     
00086 Qwav_END_NAMESPACE
00087 
00088 #endif // Qwav_MARKERINTERFACE_H

Generated on Mon Jan 20 00:24:54 2003 for Qwav by doxygen1.2.16