Blame view

SpeechSegment.cpp 863 Bytes
3f2992b2c   bostx   V1.0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
  #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);
  }