Labeller Class Reference

#include <Labeller.h>

List of all members.


Detailed Description

Definition at line 29 of file Labeller.h.

Public Types

enum  ValueType {
  ValueNone, ValueFromSimpleCounter, ValueFromCyclicalCounter, ValueFromTwoLevelCounter,
  ValueFromFrameNumber, ValueFromRealTime, ValueFromDurationFromPrevious, ValueFromDurationToNext,
  ValueFromTempoFromPrevious, ValueFromTempoToNext, ValueFromExistingNeighbour, ValueFromLabel
}
typedef std::map< ValueType,
QString > 
TypeNameMap

Public Member Functions

 Labeller (ValueType type=ValueNone)
 Labeller (const Labeller &l)
virtual ~Labeller ()
TypeNameMap getTypeNames () const
ValueType getType () const
void setType (ValueType type)
int getCounterValue () const
void setCounterValue (int v)
int getSecondLevelCounterValue () const
void setSecondLevelCounterValue (int v)
int getCounterCycleSize () const
void setCounterCycleSize (int s)
void setSampleRate (float rate)
void incrementCounter ()
template<typename PointType>
void label (PointType &newPoint, PointType *prevPoint=0)
template<typename PointType>
void labelAll (SparseModel< PointType > &model, MultiSelection *ms)
template<typename PointType>
void setValue (PointType &newPoint, PointType *prevPoint=0)
bool requiresPrevPoint () const
bool actingOnPrevPoint () const

Protected Member Functions

template<typename PointType>
float getValueFor (PointType &newPoint, PointType *prevPoint)

Protected Attributes

ValueType m_type
int m_counter
int m_counter2
int m_cycle
int m_dp
float m_rate


Member Typedef Documentation

typedef std::map<ValueType, QString> Labeller::TypeNameMap

Definition at line 83 of file Labeller.h.


Member Enumeration Documentation

enum Labeller::ValueType

Enumerator:
ValueNone 
ValueFromSimpleCounter 
ValueFromCyclicalCounter 
ValueFromTwoLevelCounter 
ValueFromFrameNumber 
ValueFromRealTime 
ValueFromDurationFromPrevious 
ValueFromDurationToNext 
ValueFromTempoFromPrevious 
ValueFromTempoToNext 
ValueFromExistingNeighbour 
ValueFromLabel 

Definition at line 32 of file Labeller.h.


Constructor & Destructor Documentation

Labeller::Labeller ( ValueType  type = ValueNone  )  [inline]

Definition at line 64 of file Labeller.h.

Labeller::Labeller ( const Labeller l  )  [inline]

Definition at line 72 of file Labeller.h.

virtual Labeller::~Labeller (  )  [inline, virtual]

Definition at line 81 of file Labeller.h.


Member Function Documentation

TypeNameMap Labeller::getTypeNames (  )  const [inline]

Definition at line 84 of file Labeller.h.

References ValueFromCyclicalCounter, ValueFromDurationFromPrevious, ValueFromDurationToNext, ValueFromExistingNeighbour, ValueFromFrameNumber, ValueFromLabel, ValueFromRealTime, ValueFromSimpleCounter, ValueFromTempoFromPrevious, ValueFromTempoToNext, ValueFromTwoLevelCounter, and ValueNone.

Referenced by TimeValueLayer::paste(), and MainWindow::setupEditMenu().

ValueType Labeller::getType (  )  const [inline]

Definition at line 113 of file Labeller.h.

References m_type.

Referenced by MainWindow::setupEditMenu().

void Labeller::setType ( ValueType  type  )  [inline]

Definition at line 114 of file Labeller.h.

References m_type.

Referenced by TimeValueLayer::paste(), and MainWindow::setInstantsNumbering().

int Labeller::getCounterValue (  )  const [inline]

Definition at line 116 of file Labeller.h.

References m_counter.

Referenced by LabelCounterInputDialog::LabelCounterInputDialog().

void Labeller::setCounterValue ( int  v  )  [inline]

Definition at line 117 of file Labeller.h.

References m_counter.

Referenced by LabelCounterInputDialog::cancelClicked(), and LabelCounterInputDialog::counterChanged().

int Labeller::getSecondLevelCounterValue (  )  const [inline]

Definition at line 119 of file Labeller.h.

References m_counter2.

Referenced by LabelCounterInputDialog::LabelCounterInputDialog().

void Labeller::setSecondLevelCounterValue ( int  v  )  [inline]

Definition at line 120 of file Labeller.h.

References m_counter2.

Referenced by LabelCounterInputDialog::cancelClicked(), and LabelCounterInputDialog::secondCounterChanged().

int Labeller::getCounterCycleSize (  )  const [inline]

Definition at line 122 of file Labeller.h.

References m_cycle.

Referenced by MainWindow::setupEditMenu().

void Labeller::setCounterCycleSize ( int  s  )  [inline]

Definition at line 123 of file Labeller.h.

References m_counter, m_cycle, and m_dp.

Referenced by MainWindowBase::MainWindowBase(), TimeValueLayer::paste(), and MainWindow::setInstantsCounterCycle().

void Labeller::setSampleRate ( float  rate  )  [inline]

Definition at line 133 of file Labeller.h.

References m_rate.

Referenced by MainWindowBase::insertInstantAt(), TimeValueLayer::paste(), and MainWindowBase::renumberInstants().

void Labeller::incrementCounter (  )  [inline]

Definition at line 135 of file Labeller.h.

References m_counter, m_counter2, m_cycle, m_type, ValueFromCyclicalCounter, and ValueFromTwoLevelCounter.

Referenced by getValueFor(), and label().

template<typename PointType>
void Labeller::label ( PointType &  newPoint,
PointType *  prevPoint = 0 
) [inline]

Definition at line 147 of file Labeller.h.

References actingOnPrevPoint(), incrementCounter(), m_counter, m_counter2, m_type, ValueFromFrameNumber, ValueFromTwoLevelCounter, and ValueNone.

Referenced by MainWindowBase::insertInstantAt().

template<typename PointType>
void Labeller::labelAll ( SparseModel< PointType > &  model,
MultiSelection ms 
) [inline]

Definition at line 167 of file Labeller.h.

References actingOnPrevPoint(), SparseModel< PointType >::addPoint(), SparseModel< PointType >::deletePoint(), and SparseModel< PointType >::getPoints().

Referenced by MainWindowBase::renumberInstants().

template<typename PointType>
void Labeller::setValue ( PointType &  newPoint,
PointType *  prevPoint = 0 
) [inline]

Definition at line 214 of file Labeller.h.

References actingOnPrevPoint(), m_type, and ValueFromExistingNeighbour.

Referenced by TimeValueLayer::paste().

bool Labeller::requiresPrevPoint (  )  const [inline]

Definition at line 231 of file Labeller.h.

References m_type, ValueFromDurationFromPrevious, ValueFromDurationToNext, and ValueFromTempoFromPrevious.

Referenced by MainWindowBase::insertInstantAt().

bool Labeller::actingOnPrevPoint (  )  const [inline]

Definition at line 238 of file Labeller.h.

References m_type, ValueFromDurationToNext, and ValueFromTempoToNext.

Referenced by MainWindowBase::insertInstantAt(), label(), labelAll(), TimeValueLayer::paste(), and setValue().

template<typename PointType>
float Labeller::getValueFor ( PointType &  newPoint,
PointType *  prevPoint 
) [inline, protected]

Definition at line 245 of file Labeller.h.

References incrementCounter(), m_counter, m_counter2, m_dp, m_rate, m_type, ValueFromCyclicalCounter, ValueFromDurationFromPrevious, ValueFromDurationToNext, ValueFromExistingNeighbour, ValueFromFrameNumber, ValueFromLabel, ValueFromRealTime, ValueFromSimpleCounter, ValueFromTempoFromPrevious, ValueFromTempoToNext, ValueFromTwoLevelCounter, and ValueNone.


Member Data Documentation

ValueType Labeller::m_type [protected]

Definition at line 318 of file Labeller.h.

Referenced by actingOnPrevPoint(), getType(), getValueFor(), incrementCounter(), label(), requiresPrevPoint(), setType(), and setValue().

int Labeller::m_counter [protected]

Definition at line 319 of file Labeller.h.

Referenced by getCounterValue(), getValueFor(), incrementCounter(), label(), setCounterCycleSize(), and setCounterValue().

int Labeller::m_counter2 [protected]

Definition at line 320 of file Labeller.h.

Referenced by getSecondLevelCounterValue(), getValueFor(), incrementCounter(), label(), and setSecondLevelCounterValue().

int Labeller::m_cycle [protected]

Definition at line 321 of file Labeller.h.

Referenced by getCounterCycleSize(), incrementCounter(), and setCounterCycleSize().

int Labeller::m_dp [protected]

Definition at line 322 of file Labeller.h.

Referenced by getValueFor(), and setCounterCycleSize().

float Labeller::m_rate [protected]

Definition at line 323 of file Labeller.h.

Referenced by getValueFor(), and setSampleRate().


The documentation for this class was generated from the following file:
Generated on Wed Feb 20 15:45:33 2008 for SonicVisualiser by  doxygen 1.5.1