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
Collaboration diagram for QwavMarkerInterface:

Collaboration graph
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.

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.

marker  the marker to add
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.

id  the id of the marker to get
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().

the vector with ids

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

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.

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

uint QwavMarkerInterface::nrOfMarkers   const [inline]

Returns the number of markers stored.

the number of markers stored

bool QwavMarkerInterface::removeMarker uint    id

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

id  the id of the marker
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.

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