for (int i = 0; i < namenode.count() ; i++) {
QDomElement pa = namenode.item(i).toElement();
- QDomNode na = pa.firstChildElement("name");
- QDomNode commentNode = pa.firstChildElement("comment");
+ QDomElement na = pa.firstChildElement("name");
+ QDomElement commentElem = pa.firstChildElement("comment");
QString type = pa.attribute("type");
- QString paramName = i18n(na.toElement().text().toUtf8().data());
+ QString paramName = i18n(na.text().toUtf8().data());
QString comment;
- if (!commentNode.isNull())
- comment = i18n(commentNode.toElement().text().toUtf8().data());
+ if (!commentElem.isNull())
+ comment = i18n(commentElem.text().toUtf8().data());
QWidget * toFillin = new QWidget(m_baseWidget);
QString value = pa.attribute("value").isNull() ?
pa.attribute("default") : pa.attribute("value");
m_ui.effectlist->setDragDropMode(QAbstractItemView::NoDragDrop); //use internal if drop is recognised right
+ m_ui.labelComment->setHidden(true);
+
//connect(m_ui.region_url, SIGNAL(urlSelected(const KUrl &)), this , SLOT(slotRegionChanged()));
//connect(m_ui.region_url, SIGNAL(returnPressed()), this , SLOT(slotRegionChanged()));
connect(m_ui.effectlist, SIGNAL(itemSelectionChanged()), this , SLOT(slotItemSelectionChanged()));
connect(m_ui.buttonSave, SIGNAL(clicked()), this, SLOT(slotSaveEffect()));
connect(m_ui.buttonReset, SIGNAL(clicked()), this, SLOT(slotResetEffect()));
connect(m_ui.checkAll, SIGNAL(stateChanged(int)), this, SLOT(slotCheckAll(int)));
- connect(m_ui.buttonShowComments, SIGNAL(clicked()), this, SIGNAL(showComments()));
+ connect(m_ui.buttonShowComments, SIGNAL(clicked()), this, SLOT(slotShowComments()));
connect(m_effectedit, SIGNAL(parameterChanged(const QDomElement, const QDomElement)), this , SLOT(slotUpdateEffectParams(const QDomElement, const QDomElement)));
connect(m_effectedit, SIGNAL(seekTimeline(int)), this , SLOT(slotSeekTimeline(int)));
connect(m_effectedit, SIGNAL(displayMessage(const QString&, int)), this, SIGNAL(displayMessage(const QString&, int)));
double factor = c->baseClip()->getProperty("aspect_ratio").toDouble();
QPoint p((int)(size.section('x', 0, 0).toInt() * factor + 0.5), size.section('x', 1, 1).toInt());
m_effectedit->setFrameSize(p);
- m_effectedit->setFrameSize(p);
- } else ix = 0;
+ } else {
+ ix = 0;
+ }
}
if (m_clipref == NULL) {
m_ui.effectlist->blockSignals(true);
m_ui.effectlist->blockSignals(false);
m_ui.checkAll->setToolTip(QString());
m_ui.checkAll->setText(QString());
+ m_ui.labelComment->setText(QString());
setEnabled(false);
return;
}
m_ui.buttonUp->setEnabled(false);
m_ui.buttonDown->setEnabled(false);
m_ui.checkAll->setEnabled(false);
+ m_ui.buttonShowComments->setEnabled(false);
+ m_ui.labelComment->setHidden(true);
} else {
qMin(ix, 0);
qMax(ix, m_ui.effectlist->count() - 1);
m_clipref->cropStart().frames(KdenliveSettings::project_fps()),
(m_clipref->cropStart() + m_clipref->cropDuration()).frames(KdenliveSettings::project_fps()) - 1); //minx max frame
//m_ui.region_url->setUrl(KUrl(eff.attribute("region")));
+ m_ui.labelComment->setText(i18n(eff.firstChildElement("description").firstChildElement("full").text().toUtf8().data()));
}
if (!m_trackMode && m_clipref && update) m_clipref->setSelectedEffect(activeRow);
m_ui.buttonDel->setEnabled(hasItem);
m_ui.buttonUp->setEnabled(activeRow > 0);
m_ui.buttonDown->setEnabled((activeRow < m_ui.effectlist->count() - 1) && hasItem);
m_ui.frame->setEnabled(isChecked);
+ m_ui.buttonShowComments->setEnabled(hasItem);
if (m_ui.buttonShowComments->isChecked())
emit showComments();
+ m_ui.labelComment->setHidden(!m_ui.buttonShowComments->isChecked() || !m_ui.labelComment->text().count() || !hasItem);
}
void EffectStackView::slotItemUp()
if (m_ui.buttonShowComments->isChecked())
emit showComments();
+ m_ui.labelComment->setHidden(!m_ui.buttonShowComments->isChecked() || !m_ui.labelComment->text().count());
}
m_ui.checkAll->setEnabled(false);
m_effectedit->transferParamDesc(QDomElement(), 0, 0, 0);
//m_ui.region_url->clear();
+ m_ui.buttonShowComments->setEnabled(false);
+ m_ui.labelComment->setText(QString());
m_ui.effectlist->blockSignals(false);
}
return m_trackindex;
}
+void EffectStackView::slotShowComments()
+{
+ m_ui.labelComment->setHidden(!m_ui.buttonShowComments->isChecked() || !m_ui.labelComment->text().count());
+ emit showComments();
+}
+
#include "effectstackview.moc"
keyframe_list->blockSignals(true);
m_params.append(e.cloneNode().toElement());
- QDomNode na = e.firstChildElement("name");
- QString paramName = i18n(na.toElement().text().toUtf8().data());
- QDomNode commentNode = e.firstChildElement("comment");
+ QDomElement na = e.firstChildElement("name");
+ QString paramName = i18n(na.text().toUtf8().data());
+ QDomElement commentElem = e.firstChildElement("comment");
QString comment;
- if (!commentNode.isNull())
- comment = i18n(commentNode.toElement().text().toUtf8().data());
+ if (!commentElem.isNull())
+ comment = i18n(commentElem.text().toUtf8().data());
int columnId = keyframe_list->columnCount();
keyframe_list->insertColumn(columnId);
<item row="1" column="0" colspan="2">
<widget class="QFrame" name="frame">
<property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
+ <sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <zorder>toolButton</zorder>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QToolButton" name="buttonShowComments">
+ <property name="text">
+ <string/>
+ </property>
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ <property name="autoRaise">
+ <bool>true</bool>
+ </property>
</widget>
</item>
<item row="0" column="0">
</property>
</spacer>
</item>
- <item row="0" column="1">
- <widget class="QToolButton" name="buttonShowComments">
+ <item row="2" column="0" colspan="2">
+ <widget class="QLabel" name="labelComment">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
<property name="text">
<string/>
</property>
- <property name="checkable">
- <bool>true</bool>
+ <property name="textFormat">
+ <enum>Qt::RichText</enum>
</property>
- <property name="autoRaise">
+ <property name="alignment">
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+ </property>
+ <property name="wordWrap">
<bool>true</bool>
</property>
</widget>