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

QwavMarkerInterface Class Reference

Interface for accessing/manipualting markers. More...

#include <qwavmarkerinterface.h>

Inheritance diagram for QwavMarkerInterface:

Inheritance graph
[legend]
Collaboration diagram for QwavMarkerInterface:

Collaboration graph
[legend]
List of all members.

Public Methods

int addMarker (const QwavMarker &marker)
bool removeMarker (uint id)
QwavMarkergetMarker (uint id)
int hasMarkerAt (uint pixel, ulong firstSample, double zoomFac, int pixelTolerance=3) const
uint nrOfMarkers () const
void setActiveMarker (int markerId)
int activeMarker () const
vector< uint > getMarkerIds () const

Public Attributes

const QwavMarker nullMarker

Protected Methods

 QwavMarkerInterface ()
virtual ~QwavMarkerInterface ()

Detailed Description

Interface for accessing/manipualting markers.


Member Function Documentation

int QwavMarkerInterface::activeMarker   const [inline]
 

Returns the id of the active marker.

Returns:
the id of the active marker

Qwav_BEGIN_NAMESPACE int QwavMarkerInterface::addMarker const QwavMarker   marker
 

Adds marker to the list of markers and returns the id of the marker. If the same marker already exists in the list (same id), nothing is added and -1 is returned.

Parameters:
marker  the marker to add
Returns:
the id of the added marker

QwavMarker & QwavMarkerInterface::getMarker uint    id
 

Returns the marker with the given id, if it exists. If no marker with that id exists, the QwavMarker::nullMarker is returned.

Parameters:
id  the id of the marker to get
Returns:
reference to the marker with id

vector< uint > QwavMarkerInterface::getMarkerIds   const
 

Returns a vector containing the id's of the stored markers. These ids can be used to iterate over all markers using getMarker().

Returns:
the vector with ids

int QwavMarkerInterface::hasMarkerAt uint    pixel,
ulong    firstSample,
double    zoomFac,
int    pixelTolerance = 3
const
 

Checks if there is a marker at position pixel. To check this, the firstSample and the zoomFac is needed. If a marker exists at that pixel, the index of the marker is returned. If no marker exists, -1 is returned.

Parameters:
pixel  the pixel to check for a marker
firstSample  the first visible sample
zzomFac  the zoom factor
Returns:
the index of the marker or -1

uint QwavMarkerInterface::nrOfMarkers   const [inline]
 

Returns the number of markers stored.

Returns:
the number of markers stored

bool QwavMarkerInterface::removeMarker uint    id
 

Removes the marker with the given id from the internal list.

Parameters:
id  the id of the marker
Returns:
true, if succesfully removed, false if not

void QwavMarkerInterface::setActiveMarker int    markerId [inline]
 

Make the marker with id markerId the active one. This is used internally by the GUI to store the id of the currently moved marker.

Parameters:
markerId  the id of the marker


The documentation for this class was generated from the following files:
Generated on Mon Jan 20 00:24:55 2003 for Qwav by doxygen1.2.16