setEnabled(false);
- setStyleSheet(CollapsibleEffect::getStyleSheet(palette()));
+ setStyleSheet(CollapsibleEffect::getStyleSheet());
}
EffectStackView2::~EffectStackView2()
{
}
+void EffectStackView2::updatePalette()
+{
+ setStyleSheet(CollapsibleEffect::getStyleSheet());
+}
void EffectStackView2::slotRenderPos(int pos)
{
connect(group, SIGNAL(unGroup(CollapsibleGroup*)), this , SLOT(slotUnGroup(CollapsibleGroup*)));
connect(group, SIGNAL(groupRenamed(CollapsibleGroup *)), this, SLOT(slotRenameGroup(CollapsibleGroup*)));
connect(group, SIGNAL(reloadEffects()), this , SIGNAL(reloadEffects()));
+ connect(group, SIGNAL(deleteGroup(int, QDomDocument)), this , SLOT(slotDeleteGroup(int,QDomDocument)));
vbox1->addWidget(group);
group->installEventFilter( this );
}
bool hasDisabled = false;
for (int i = 0; i < m_effects.count(); i++) {
- if (m_effects.at(i)->enabledBox->isChecked()) hasEnabled = true;
+ if (!m_effects.at(i)->enabledButton->isChecked()) hasEnabled = true;
else hasDisabled = true;
}
void EffectStackView2::slotSetCurrentEffect(int ix)
{
- if (m_clipref && ix != m_clipref->selectedEffectIndex())
+ if (m_clipref && ix != m_clipref->selectedEffectIndex()) {
m_clipref->setSelectedEffect(ix);
- for (int i = 0; i < m_effects.count(); i++) {
- if (m_effects.at(i)->effectIndex() == ix) {
- m_effects.at(i)->setActive(true);
- m_ui.labelComment->setText(i18n(m_effects.at(i)->effect().firstChildElement("description").firstChildElement("full").text().toUtf8().data()));
- m_ui.labelComment->setHidden(!m_ui.buttonShowComments->isChecked() || m_ui.labelComment->text().isEmpty());
+ for (int i = 0; i < m_effects.count(); i++) {
+ if (m_effects.at(i)->effectIndex() == ix) {
+ m_effects.at(i)->setActive(true);
+ m_ui.labelComment->setText(i18n(m_effects.at(i)->effect().firstChildElement("description").firstChildElement("full").text().toUtf8().data()));
+ m_ui.labelComment->setHidden(!m_ui.buttonShowComments->isChecked() || m_ui.labelComment->text().isEmpty());
+ }
+ else m_effects.at(i)->setActive(false);
}
- else m_effects.at(i)->setActive(false);
}
}
+void EffectStackView2::slotDeleteGroup(int groupIndex, QDomDocument doc)
+{
+ QDomNodeList effects = doc.elementsByTagName("effect");
+ ClipItem * clip = NULL;
+ int ix;
+ if (m_effectMetaInfo.trackMode) {
+ ix = m_trackindex;
+ }
+ else {
+ clip = m_clipref;
+ ix = -1;
+ }
+
+ for (int i = 0; i < effects.count(); i++)
+ emit removeEffect(clip, ix, effects.at(i).toElement());
+}
+
void EffectStackView2::slotDeleteEffect(const QDomElement effect)
{
if (m_effectMetaInfo.trackMode)
connect(group, SIGNAL(unGroup(CollapsibleGroup*)), this , SLOT(slotUnGroup(CollapsibleGroup*)));
connect(group, SIGNAL(groupRenamed(CollapsibleGroup *)), this , SLOT(slotRenameGroup(CollapsibleGroup*)));
connect(group, SIGNAL(reloadEffects()), this , SIGNAL(reloadEffects()));
+ connect(group, SIGNAL(deleteGroup(int, QDomDocument)), this , SLOT(slotDeleteGroup(int,QDomDocument)));
l->insertWidget(groupPos, group);
group->installEventFilter( this );
group->addGroupEffect(effectToMove);