Logo Search packages:      
Sourcecode: kdenlive version File versions  Download package

bool TrackPanelClipResizeFunction::mouseMoved ( Gui::KTrackPanel panel,
QMouseEvent *  event 
) [virtual]

Processes Mouse Move events in the track view area. Returns true if we are continuing with the drag.

Implements TrackPanelFunction.

Definition at line 190 of file trackpanelclipresizefunction.cpp.

References Gui::KTrackPanel::documentTrackIndex(), SnapToGrid::getSnappedTime(), Gui::KTrackPanel::hasDocumentTrackIndex(), DocTrackBase::resizeClipTrackEnd(), DocTrackBase::resizeClipTrackStart(), signalClipCropEndChanged(), signalClipCropStartChanged(), and KdenliveDoc::track().

{
    bool result = false;

    if (panel->hasDocumentTrackIndex()) {
      DocTrackBase *track =
          m_document->track(panel->documentTrackIndex());
      if (track) {
          GenTime mouseTime =
            m_snapToGrid.getSnappedTime(m_timeline->
            timeUnderMouse(event->x()));

          if (m_clipUnderMouse) {
            result = true;
            if (m_resizeState == Start) {           
                track->resizeClipTrackStart(m_clipUnderMouse,
                  mouseTime);
                emit signalClipCropStartChanged(m_clipUnderMouse);
            } else if (m_resizeState == End) {
                track->resizeClipTrackEnd(m_clipUnderMouse, mouseTime);
                emit signalClipCropEndChanged(m_clipUnderMouse);
            } else {
                kdError() <<
                  "Unknown resize state reached in KMMTimeLineTrackView::mouseMoveEvent()"
                  << endl;
                kdError() << "(this message should never be seen!)" <<
                  endl;
            }
          }
      }
    }

    return result;
}


Generated by  Doxygen 1.6.0   Back to index