Logo Search packages:      
Sourcecode: rosegarden version File versions

void Rosegarden::EventSelection::addEvent ( Event e  ) 

Add an Event to the selection. The Event should come from the Segment that was passed to the constructor. Will silently drop any event that is already in the selection.

Definition at line 97 of file Selection.cpp.

References contains(), Rosegarden::Event::getAbsoluteTime(), Rosegarden::Event::getDuration(), and m_segmentEvents.

Referenced by addFromSelection(), Rosegarden::NotationSelector::drag(), Rosegarden::NotationSelector::getSelection(), Rosegarden::NotationSelector::handleMouseRelease(), Rosegarden::Quantizer::quantize(), Rosegarden::NotationView::setSingleSelectedEvent(), Rosegarden::MatrixView::setSingleSelectedEvent(), Rosegarden::MatrixView::slotFilterSelection(), Rosegarden::MatrixView::slotKeySelected(), and Rosegarden::MatrixView::slotSelectAll().

    timeT eventDuration = e->getDuration();
    if (eventDuration == 0) eventDuration = 1;

    if (contains(e)) return;

    if (e->getAbsoluteTime() < m_beginTime || !m_haveRealStartTime) {
      m_beginTime = e->getAbsoluteTime();
      m_haveRealStartTime = true;
    if (e->getAbsoluteTime() + eventDuration > m_endTime) {
      m_endTime = e->getAbsoluteTime() + eventDuration;

Generated by  Doxygen 1.6.0   Back to index