本文整理汇总了C++中MultitrackModel类的典型用法代码示例。如果您正苦于以下问题:C++ MultitrackModel类的具体用法?C++ MultitrackModel怎么用?C++ MultitrackModel使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了MultitrackModel类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
InsertTrackCommand::InsertTrackCommand(MultitrackModel& model, int trackIndex, QUndoCommand* parent)
: QUndoCommand(parent)
, m_model(model)
, m_trackIndex(trackIndex)
, m_trackType(model.trackList().size() > 0 ? model.trackList().at(trackIndex).type : VideoTrackType)
{
if (m_trackType == AudioTrackType)
setText(QObject::tr("Insert audio track"));
else if (m_trackType == VideoTrackType)
setText(QObject::tr("Insert video track"));
}
示例2: QUndoCommand
HideTrackCommand::HideTrackCommand(MultitrackModel &model, int trackIndex, QUndoCommand *parent)
: QUndoCommand(parent)
, m_model(model)
, m_trackIndex(trackIndex)
, m_oldValue(model.data(m_model.index(trackIndex), MultitrackModel::IsHiddenRole).toBool())
{
setText(QObject::tr("Toggle track hidden"));
}
示例3: QUndoCommand
LockTrackCommand::LockTrackCommand(MultitrackModel &model, int trackIndex, bool value, QUndoCommand *parent)
: QUndoCommand(parent)
, m_model(model)
, m_trackIndex(trackIndex)
, m_value(value)
, m_oldValue(model.data(m_model.index(trackIndex), MultitrackModel::IsLockedRole).toBool())
{
setText(QObject::tr("Lock track"));
}
示例4: if
RemoveTrackCommand::RemoveTrackCommand(MultitrackModel& model, int trackIndex, QUndoCommand* parent)
: QUndoCommand(parent)
, m_model(model)
, m_trackIndex(trackIndex)
, m_trackType(model.trackList().at(trackIndex).type)
{
if (m_trackType == AudioTrackType)
setText(QObject::tr("Remove audio track"));
else if (m_trackType == VideoTrackType)
setText(QObject::tr("Remove video track"));
// Save track XML.
int mlt_index = m_model.trackList().at(m_trackIndex).mlt_index;
QScopedPointer<Mlt::Producer> producer(m_model.tractor()->multitrack()->track(mlt_index));
if (producer && producer->is_valid()) {
m_xml = MLT.XML(producer.data());
m_trackName = QString::fromUtf8(producer->get(kTrackNameProperty));
}
}