本文整理汇总了C++中ObjectItem::getDisplayFrameData方法的典型用法代码示例。如果您正苦于以下问题:C++ ObjectItem::getDisplayFrameData方法的具体用法?C++ ObjectItem::getDisplayFrameData怎么用?C++ ObjectItem::getDisplayFrameData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ObjectItem
的用法示例。
在下文中一共展示了ObjectItem::getDisplayFrameData方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: slot_changeSelectObject
// 選択オブジェクト変更
void AnimationForm::slot_changeSelectObject(QModelIndex index)
{
// m_pEditData->setSelIndex(index) ;
if ( !index.isValid() ) { return ; }
CObjectModel *pModel = m_pEditData->getObjectModel() ;
if ( pModel->isLayer(index) ) {
bool valid ;
ObjectItem *pItem = pModel->getItemFromIndex(index) ;
FrameData data = pItem->getDisplayFrameData(m_pEditData->getSelectFrame(), &valid) ;
if ( valid ) {
slot_setUI(data) ;
}
emit sig_changeSelectLayer(index) ;
}
ObjectItem *pObj = pModel->getObject(index) ;
if ( pObj ) {
ui->spinBox_loop->setValue(pObj->getLoop());
ui->spinBox_fps->setValue(pObj->getFps()) ;
}
m_pDataMarker->repaint();
m_pGlWidget->update();
}
示例2: getNowSelectFrameData
// 選択しているフレームデータ取得
bool EditData::getNowSelectFrameData(FrameData &ret)
{
QModelIndex index = getSelIndex();
if (!getObjectModel()->isLayer(index))
{
return false;
}
int frame = getSelectFrame();
ObjectItem *pItem = getObjectModel()->getItemFromIndex(index);
bool valid;
ret = pItem->getDisplayFrameData(frame, &valid);
return valid;
}
示例3: slot_frameChanged
// 現在フレーム変更
void AnimationForm::slot_frameChanged(int frame)
{
bool bChange = (m_pEditData->getSelectFrame() != frame) ;
ui->label_frame->setValue(frame) ;
m_pEditData->setSelectFrame( frame ) ;
if ( bChange ) {
if ( m_pEditData->getSelIndex().isValid() ) {
ObjectItem *pItem = m_pEditData->getObjectModel()->getItemFromIndex(m_pEditData->getSelIndex()) ;
if ( pItem ) {
bool valid ;
FrameData d = pItem->getDisplayFrameData(frame, &valid) ;
if ( valid ) {
slot_setUI(d) ;
}
}
}
m_pGlWidget->update();
}
}
示例4: copyFrameData
// フレームデータ コピー
void AnimationForm::copyFrameData( void )
{
CObjectModel *pModel = m_pEditData->getObjectModel() ;
QModelIndex index = m_pEditData->getSelIndex() ;
if ( !pModel->isLayer(index) ) { return ; }
ObjectItem *pItem = pModel->getItemFromIndex(index) ;
FrameData data, *p ;
int frame = m_pEditData->getSelectFrame() ;
p = pItem->getFrameDataPtr(frame) ;
if ( p ) {
data = *p ;
}
else {
bool valid ;
data = pItem->getDisplayFrameData(frame, &valid) ;
if ( !valid ) { return ; }
}
qDebug() << "Copy Framedata" ;
m_pEditData->setCopyFrameData(data) ;
}
示例5: keyPressEvent
// キー押しイベント
void AnimationForm::keyPressEvent(QKeyEvent *event)
{
if ( event->key() == Qt::Key_Control ) {
m_pGlWidget->setPressCtrl(true) ;
m_pGlWidget->update() ;
}
int key = event->key() ;
if ( event->modifiers() & Qt::ShiftModifier ) { key |= Qt::SHIFT ; }
if ( event->modifiers() & Qt::ControlModifier ) { key |= Qt::CTRL ; }
if ( event->modifiers() & Qt::MetaModifier ) { key |= Qt::META ; }
if ( event->modifiers() & Qt::AltModifier ) { key |= Qt::ALT ; }
QKeySequence ks(key) ;
if ( ks == m_pSetting->getShortcutCopyFrame() ) {
copyFrameData() ;
}
else if ( ks == m_pSetting->getShortcutPasteFrame() ) {
pasteFrameData() ;
}
else if ( ks == m_pSetting->getShortcutPosSelect() ) {
ui->radioButton_pos->setChecked(true) ;
slot_clickedRadioPos(true) ;
}
else if ( ks == m_pSetting->getShortcutRotSelect() ) {
ui->radioButton_rot->setChecked(true) ;
slot_clickedRadioRot(true) ;
}
else if ( ks == m_pSetting->getShortcutCenterSelect() ) {
ui->radioButton_center->setChecked(true) ;
slot_clickedRadioCenter(true) ;
}
else if ( ks == m_pSetting->getShortcutScaleSelect() ) {
ui->radioButton_scale->setChecked(true) ;
slot_clickedRadioScale(true) ;
}
else if ( ks == m_pSetting->getShortcutPathSelect() ) {
ui->radioButton_path->setChecked(true) ;
slot_clickedRadioPath(true) ;
}
else if ( ks == m_pSetting->getShortcutPlayAnime() ) {
if ( m_pEditData->getPlayAnime() ) {
slot_pauseAnimation() ;
}
else {
slot_playAnimation() ;
}
}
else if ( ks == m_pSetting->getShortcutStopAnime() ) {
slot_stopAnimation() ;
}
else if ( ks == m_pSetting->getShortcutJumpStartFrame() ) {
jumpStartFrame() ;
}
else if ( ks == m_pSetting->getShortcutJumpEndFrame() ) {
jumpEndFrame() ;
}
else if ( ks == m_pSetting->getShortcutAddFrameData() ) {
CObjectModel *pModel = m_pEditData->getObjectModel() ;
QModelIndex index = m_pEditData->getSelIndex() ;
int frame = m_pEditData->getSelectFrame() ;
if ( !pModel->isLayer(index) ) { return ; }
ObjectItem *pItem = pModel->getItemFromIndex(index) ;
FrameData data = pItem->getDisplayFrameData(frame) ;
data.frame = frame ;
slot_addNewFrameData(index, frame, data) ;
}
else if ( ks == m_pSetting->getShortcutDelFrameData() ) {
slot_deleteFrameData() ;
}
else if ( ks == m_pSetting->getShortcutDelItem() ) {
slot_deleteObject() ;
}
else if ( ks == m_pSetting->getShortcutDispItem() ) {
slot_changeLayerDisp() ;
}
else if ( ks == m_pSetting->getShortcutLockItem() ) {
slot_changeLayerLock() ;
}
else if ( ks == m_pSetting->getShortcutMoveAnimeWindow() ) {
m_pGlWidget->setPressWindowMove(true) ;
setCursor(QCursor(Qt::OpenHandCursor));
}
}