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

void RosegardenGUIApp::slotSplitSelectionByRecordedSrc (  )  [slot]

Split the selected segments by recorded source

Definition at line 2752 of file rosegardengui.cpp.

References RosegardenGUIView::getSelection(), RosegardenGUIView::haveSelection(), m_doc, m_view, and RosegardenGUIView::slotAddCommandToHistory().

Referenced by setupActions().

    if (!m_view->haveSelection()) return;

    SplitByRecordingSrcDialog dialog(m_view, m_doc);
    if (dialog.exec() != QDialog::Accepted) return;

    Rosegarden::SegmentSelection selection = m_view->getSelection();

    KMacroCommand *command = new KMacroCommand

    bool haveSomething = false;

    for (Rosegarden::SegmentSelection::iterator i = selection.begin();
         i != selection.end(); ++i) {

        if ((*i)->getType() == Rosegarden::Segment::Audio) {
            // nothing
        } else {
                (new SegmentSplitByRecordingSrcCommand(*i,
            haveSomething = true;
    if (haveSomething) m_view->slotAddCommandToHistory(command);

Generated by  Doxygen 1.6.0   Back to index