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

void EffectStackView::slotItemSelectionChanged ( bool  update = true  )  [private, slot]

Updates buttons and the editor according to selected effect.

Parameters:
update (optional) Set the clip's selected effect (display keyframes in timeline)

Definition at line 259 of file effectstackview.cpp.

Referenced by setupListView().

{
    bool hasItem = m_ui.effectlist->currentItem();
    int activeRow = m_ui.effectlist->currentRow();
    bool isChecked = false;
    if (hasItem && m_ui.effectlist->currentItem()->checkState() == Qt::Checked) isChecked = true;
    if (hasItem && m_ui.effectlist->currentItem()->isSelected()) {
        QDomElement eff = m_clipref->effectAt(activeRow);
        m_effectedit->transferParamDesc(eff,
                                        0,
                                        m_clipref->cropStart().frames(KdenliveSettings::project_fps()),
                                        (m_clipref->cropStart() + m_clipref->cropDuration()).frames(KdenliveSettings::project_fps())); //minx max frame
        m_ui.region_url->setUrl(KUrl(eff.attribute("region")));
    }
    if (m_clipref && update) m_clipref->setSelectedEffect(activeRow);
    m_ui.buttonDel->setEnabled(hasItem);
    m_ui.buttonSave->setEnabled(hasItem);
    m_ui.buttonReset->setEnabled(hasItem && isChecked);
    m_ui.buttonUp->setEnabled(activeRow > 0);
    m_ui.buttonDown->setEnabled((activeRow < m_ui.effectlist->count() - 1) && hasItem);
    m_ui.frame_layout->setEnabled(isChecked);
}


Generated by  Doxygen 1.6.0   Back to index