SpeechSegment.cpp 863 Bytes
#include "SpeechSegment.h"

SpeechSegment::SpeechSegment(qint64 start, qint64 end, const QString &text, const QString &speaker, Segment *parentSegment, Segment::Source source):
  Segment(start, parentSegment, source),
  m_end(end),
  m_text(text),
  m_speaker(speaker)
{
}

///////////////
// modifiers //
///////////////

void SpeechSegment::setEnd(qint64 end)
{
  m_end = end;
}

void SpeechSegment::setLabel(const QString &speaker)
{
  m_speaker = speaker;
}

///////////////
// accessors //
///////////////

qint64 SpeechSegment::getEnd() const
{
  return m_end;
}

QString SpeechSegment::getLabel() const
{
  return m_speaker;
}

/////////////////////////////////////////
// reimplementation of abstract method //
/////////////////////////////////////////

QString SpeechSegment::display() const
{
  return "Speech segment " + QString::number(m_position);
}