本文整理汇总了C++中mlt::GeometryItem::key方法的典型用法代码示例。如果您正苦于以下问题:C++ GeometryItem::key方法的具体用法?C++ GeometryItem::key怎么用?C++ GeometryItem::key使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mlt::GeometryItem
的用法示例。
在下文中一共展示了GeometryItem::key方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: slotPositionChanged
void Geometryval::slotPositionChanged(int pos, bool seek)
{
if (seek && KdenliveSettings::transitionfollowcursor()) emit seekToPos(pos);
m_ui.spinPos->setValue(pos);
m_helper->setValue(pos);
Mlt::GeometryItem item;
int error = m_geom->fetch(&item, pos);
if (error || item.key() == false) {
// no keyframe under cursor, adjust buttons
m_ui.buttonAdd->setEnabled(true);
m_ui.buttonDelete->setEnabled(false);
m_ui.widget->setEnabled(false);
m_ui.spinTransp->setEnabled(false);
m_scaleMenu->setEnabled(false);
m_alignMenu->setEnabled(false);
} else {
m_ui.buttonAdd->setEnabled(false);
m_ui.buttonDelete->setEnabled(true);
m_ui.widget->setEnabled(true);
m_ui.spinTransp->setEnabled(true);
m_scaleMenu->setEnabled(true);
m_alignMenu->setEnabled(true);
}
m_paramRect->setPos(item.x(), item.y());
m_paramRect->setRect(0, 0, item.w(), item.h());
m_ui.spinTransp->setValue(item.mix());
m_paramRect->setBrush(QColor(255, 0, 0, item.mix()));
}
示例2: keyframeSelected
bool Geometryval::keyframeSelected()
{
Mlt::GeometryItem item;
int pos = m_timePos.getValue();
if (m_geom->fetch(&item, pos) || item.key() == false) return false;
return true;
}
示例3: slotUpdateTransitionProperties
void Geometryval::slotResize200()
{
int pos = m_ui.spinPos->value();
Mlt::GeometryItem item;
int error = m_geom->fetch(&item, pos);
if (error || item.key() == false) {
// no keyframe under cursor
return;
}
m_paramRect->setRect(0, 0, m_profile.width * 2, m_profile.height * 2);
slotUpdateTransitionProperties();
}
示例4: slotAlignRight
void Geometryval::slotAlignRight()
{
int pos = m_ui.spinPos->value();
Mlt::GeometryItem item;
int error = m_geom->fetch(&item, pos);
if (error || item.key() == false) {
// no keyframe under cursor
return;
}
m_paramRect->setPos(m_profile.width - m_paramRect->rect().width(), m_paramRect->pos().y());
slotUpdateTransitionProperties();
}
示例5: slotResizeOriginal
void Geometryval::slotResizeOriginal()
{
if (m_frameSize.isNull()) slotResize100();
int pos = m_ui.spinPos->value();
Mlt::GeometryItem item;
int error = m_geom->fetch(&item, pos);
if (error || item.key() == false) {
// no keyframe under cursor
return;
}
m_paramRect->setRect(0, 0, m_frameSize.x(), m_frameSize.y());
slotUpdateTransitionProperties();
}
示例6: slotTransparencyChanged
void Geometryval::slotTransparencyChanged(int transp)
{
int pos = m_ui.spinPos->value();
Mlt::GeometryItem item;
int error = m_geom->fetch(&item, pos);
if (error || item.key() == false) {
// no keyframe under cursor
return;
}
item.mix(transp);
m_paramRect->setBrush(QColor(255, 0, 0, transp));
m_geom->insert(item);
emit parameterChanged();
}
示例7: slotResizeCustom
void Geometryval::slotResizeCustom()
{
int pos = m_ui.spinPos->value();
Mlt::GeometryItem item;
int error = m_geom->fetch(&item, pos);
if (error || item.key() == false) {
// no keyframe under cursor
return;
}
int scale = m_paramRect->rect().width() * 100 / m_profile.width;
bool ok;
scale = QInputDialog::getInteger(this, i18n("Resize..."), i18n("Scale"), scale, 1, 2147483647, 10, &ok);
if (!ok) return;
m_paramRect->setRect(0, 0, m_profile.width * scale / 100, m_profile.height * scale / 100);
slotUpdateTransitionProperties();
}
示例8: slotPositionChanged
void Geometryval::slotPositionChanged(int pos, bool seek)
{
if (pos == -1) {
pos = m_timePos.getValue();
}
if (seek && KdenliveSettings::transitionfollowcursor()) emit seekToPos(pos + m_startPoint);
m_timePos.setValue(pos);
//spinPos->setValue(pos);
m_helper->blockSignals(true);
m_helper->setValue(pos);
m_helper->blockSignals(false);
Mlt::GeometryItem item;
int error = m_geom->fetch(&item, pos);
if (error || item.key() == false) {
// no keyframe under cursor, adjust buttons
buttonAdd->setEnabled(true);
buttonDelete->setEnabled(false);
widget->setEnabled(false);
spinTransp->setEnabled(false);
frameOptions->setEnabled(false);
m_reset->setEnabled(false);
} else {
buttonAdd->setEnabled(false);
buttonDelete->setEnabled(true);
widget->setEnabled(true);
spinTransp->setEnabled(true);
frameOptions->setEnabled(true);
m_reset->setEnabled(true);
}
m_paramRect->setPos(item.x() * m_dar, item.y());
m_paramRect->setRect(0, 0, item.w() * m_dar, item.h());
spinTransp->setValue(item.mix());
m_paramRect->setBrush(QColor(255, 0, 0, item.mix()));
slotUpdateGeometry();
}