Git commit 49caf779ab66fdd241196e1803ebc7a5921f46eb by Paul Mendez. Committed on 01/08/2012 at 00:20. Pushed by mendez into branch 'stage-paulm-test3'. Code style fixing M +8 -8 stage/part/KPrAnimationsTimeLineView.cpp M +56 -56 stage/part/KPrShapeAnimations.cpp M +4 -4 stage/part/KPrShapeAnimations.h M +3 -5 stage/part/KPrTimeLineView.h M +3 -3 stage/part/animations/KPrAnimationLoader.cpp M +8 -8 stage/part/animations/KPrShapeAnimation.cpp M +15 -15 stage/part/animations/KPrShapeAnimation.h M +2 -2 stage/part/commands/KPrAnimationEditNodeTypeCommand.cpp M +3 -3 stage/part/commands/KPrAnimationEditNodeTypeCommand.h M +189 -189 stage/part/tests/TestShapeAnimations.cpp M +13 -13 stage/part/tools/animationtool/KPrEditAnimationsWidget.cpp M +8 -8 stage/part/tools/animationtool/KPrPredefinedAnimationsLoader= .cpp M +10 -10 stage/part/tools/animationtool/KPrShapeAnimationDocker.cpp http://commits.kde.org/calligra/49caf779ab66fdd241196e1803ebc7a5921f46eb diff --git a/stage/part/KPrAnimationsTimeLineView.cpp b/stage/part/KPrAnima= tionsTimeLineView.cpp index ee4b7d5..514c41a 100644 --- a/stage/part/KPrAnimationsTimeLineView.cpp +++ b/stage/part/KPrAnimationsTimeLineView.cpp @@ -281,8 +281,8 @@ void KPrAnimationsTimeLineView::setMaxLineLength(qreal = length) QColor KPrAnimationsTimeLineView::colorforRow(int row) { if (m_model) { - KPrShapeAnimation::Preset_Class type =3D - static_cast(m_model->data= (m_model->index(row, KPrShapeAnimations::AnimationClass)).toInt()); + KPrShapeAnimation::PresetClass type =3D + static_cast(m_model->data(= m_model->index(row, KPrShapeAnimations::AnimationClass)).toInt()); if (type =3D=3D KPrShapeAnimation::Entrance) { return Qt::darkGreen; } else if (type =3D=3D KPrShapeAnimation::Emphasis) { @@ -299,17 +299,17 @@ QColor KPrAnimationsTimeLineView::colorforRow(int row) int KPrAnimationsTimeLineView::calculateStartOffset(int row) { //calculate real start - KPrShapeAnimation::Node_Type triggerEvent =3D static_cast( - m_model->data(m_model->index(row, KPrShapeAnimations::Node_= Type)).toInt()); + KPrShapeAnimation::NodeType triggerEvent =3D static_cast( + m_model->data(m_model->index(row, KPrShapeAnimations::NodeT= ype)).toInt()); if (row <=3D 0) { return 0; } - if (triggerEvent =3D=3D KPrShapeAnimation::After_Previous) { - QModelIndex sourceIndex =3D m_model->mapToSource(m_model->index(ro= w - 1, KPrShapeAnimations::Node_Type)); + if (triggerEvent =3D=3D KPrShapeAnimation::AfterPrevious) { + QModelIndex sourceIndex =3D m_model->mapToSource(m_model->index(ro= w - 1, KPrShapeAnimations::NodeType)); return m_shapeModel->animationEndByIndex(sourceIndex); } - if (triggerEvent =3D=3D KPrShapeAnimation::With_Previous) { - QModelIndex sourceIndex =3D m_model->mapToSource(m_model->index(ro= w - 1, KPrShapeAnimations::Node_Type)); + if (triggerEvent =3D=3D KPrShapeAnimation::WithPrevious) { + QModelIndex sourceIndex =3D m_model->mapToSource(m_model->index(ro= w - 1, KPrShapeAnimations::NodeType)); return m_shapeModel->scaleBeginForAnimation(sourceIndex); } return 0; diff --git a/stage/part/KPrShapeAnimations.cpp b/stage/part/KPrShapeAnimati= ons.cpp index 398c135..429a21a 100644 --- a/stage/part/KPrShapeAnimations.cpp +++ b/stage/part/KPrShapeAnimations.cpp @@ -98,7 +98,7 @@ QVariant KPrShapeAnimations::data(const QModelIndex &inde= x, int role) const switch (index.column()) { case Group: return groupCount; case StepCount: - if (thisAnimation->NodeType() =3D=3D KPrShapeAnimation::On= _Click) { + if (thisAnimation->nodeType() =3D=3D KPrShapeAnimation::On= Click) { return groupCount; } else { @@ -111,7 +111,7 @@ QVariant KPrShapeAnimations::data(const QModelIndex &in= dex, int role) const case StartTime: return thisAnimation->timeRange().first; case Duration: return thisAnimation->globalDuration(); case AnimationClass: return thisAnimation->presetClass(); - case Node_Type: return thisAnimation->NodeType(); + case NodeType: return thisAnimation->nodeType(); default: Q_ASSERT(false); } } @@ -126,13 +126,13 @@ QVariant KPrShapeAnimations::data(const QModelIndex &= index, int role) const case Group: return QVariant(); case StepCount: return QVariant(); case TriggerEvent: - if (thisAnimation->NodeType() =3D=3D KPrShapeAnimation::On= _Click) + if (thisAnimation->nodeType() =3D=3D KPrShapeAnimation::On= Click) return KIcon("onclick").pixmap(KIconLoader::SizeSmall, KIconLoader::SizeSmall); - if (thisAnimation->NodeType() =3D=3D KPrShapeAnimation::Af= ter_Previous) + if (thisAnimation->nodeType() =3D=3D KPrShapeAnimation::Af= terPrevious) return KIcon("after_previous").pixmap(KIconLoader::Siz= eSmall, KIconLoader::Siz= eSmall); - if (thisAnimation->NodeType() =3D=3D KPrShapeAnimation::Wi= th_Previous) + if (thisAnimation->nodeType() =3D=3D KPrShapeAnimation::Wi= thPrevious) return KIcon("with_previous").pixmap(KIconLoader::Size= Small, KIconLoader::Size= Small); case Name: return QVariant(); @@ -141,7 +141,7 @@ QVariant KPrShapeAnimations::data(const QModelIndex &in= dex, int role) const case StartTime: return QVariant(); case Duration: return QVariant(); case AnimationClass: return QVariant(); - case Node_Type: return QVariant(); + case NodeType: return QVariant(); default: Q_ASSERT(false); } } @@ -156,7 +156,7 @@ QVariant KPrShapeAnimations::data(const QModelIndex &in= dex, int role) const case StartTime: case Duration: case AnimationClass: return QVariant(); - case Node_Type: return QVariant(); + case NodeType: return QVariant(); default: Q_ASSERT(false); } } @@ -165,11 +165,11 @@ QVariant KPrShapeAnimations::data(const QModelIndex &= index, int role) const case Group: case StepCount: return QVariant(); case TriggerEvent: - if (thisAnimation->NodeType() =3D=3D KPrShapeAnimation::On= _Click) + if (thisAnimation->nodeType() =3D=3D KPrShapeAnimation::On= Click) return i18n("start on mouse click"); - if (thisAnimation->NodeType() =3D=3D KPrShapeAnimation::Af= ter_Previous) + if (thisAnimation->nodeType() =3D=3D KPrShapeAnimation::Af= terPrevious) return i18n("start after previous animation"); - if (thisAnimation->NodeType() =3D=3D KPrShapeAnimation::Wi= th_Previous) + if (thisAnimation->nodeType() =3D=3D KPrShapeAnimation::Wi= thPrevious) return i18n("start with previous animation"); case Name: return QVariant(); case ShapeThumbnail: return thisAnimation->shape()->name(); @@ -179,7 +179,7 @@ QVariant KPrShapeAnimations::data(const QModelIndex &in= dex, int role) const arg(thisAnimation->globalDuration() / = 1000); case Duration: return QVariant(); case AnimationClass: return thisAnimation->presetClassText(); - case Node_Type: return QVariant(); + case NodeType: return QVariant(); default: Q_ASSERT(false); } } @@ -396,8 +396,8 @@ void KPrShapeAnimations::swapAnimations(KPrShapeAnimati= on *oldAnimation, KPrShap QModelIndex indexNew =3D indexByAnimation(newAnimation); emit dataChanged(this->index(indexOld.row(), 0), this->index(indexOld.= row(), COLUMN_COUNT)); emit dataChanged(this->index(indexNew.row(), 0), this->index(indexNew.= row(), COLUMN_COUNT)); - if ((newAnimation->NodeType() =3D=3D KPrShapeAnimation::On_Click) || - (oldAnimation->NodeType() =3D=3D KPrShapeAnimation::On_Click))= { + if ((newAnimation->nodeType() =3D=3D KPrShapeAnimation::OnClick) || + (oldAnimation->nodeType() =3D=3D KPrShapeAnimation::OnClick)) { notifyOnClickEventChanged(); } = @@ -459,17 +459,17 @@ int KPrShapeAnimations::animationEndByIndex(const QMo= delIndex &index) { if (index.isValid()) { KPrShapeAnimation *previousAnimation =3D animationByRow(index.row(= )); - KPrShapeAnimation::Node_Type previousNodeType =3D - static_cast(data(this->index= (index.row(), - = KPrShapeAnimations::Node_Type)).toInt()); - if (previousNodeType =3D=3D KPrShapeAnimation::On_Click) { + KPrShapeAnimation::NodeType previousNodeType =3D + static_cast(data(this->index(= index.row(), + = KPrShapeAnimations::NodeType)).toInt()); + if (previousNodeType =3D=3D KPrShapeAnimation::OnClick) { return previousAnimation->timeRange().second; } - if (previousNodeType =3D=3D KPrShapeAnimation::With_Previous) { + if (previousNodeType =3D=3D KPrShapeAnimation::WithPrevious) { return previousAnimation->timeRange().second + scaleBeginForAnimation(this->index(index.row() - 1, in= dex.column(), QModelIndex())); } - else if (previousNodeType =3D=3D KPrShapeAnimation::After_Previous= ) { + else if (previousNodeType =3D=3D KPrShapeAnimation::AfterPrevious)= { return previousAnimation->timeRange().second + animationEndByIndex(this->index(index.row() - 1, index= .column(), QModelIndex())); } @@ -481,16 +481,16 @@ int KPrShapeAnimations::scaleBeginForAnimation(const = QModelIndex &index) { if (index.isValid()) { KPrShapeAnimation *previousAnimation =3D animationByRow(index.row(= )); - KPrShapeAnimation::Node_Type previousNodeType =3D - static_cast(data(this->index= (index.row(), - = KPrShapeAnimations::Node_Type)).toInt()); - if (previousNodeType =3D=3D KPrShapeAnimation::On_Click) { + KPrShapeAnimation::NodeType previousNodeType =3D + static_cast(data(this->index(= index.row(), + = KPrShapeAnimations::NodeType)).toInt()); + if (previousNodeType =3D=3D KPrShapeAnimation::OnClick) { return previousAnimation->timeRange().first; } - if (previousNodeType =3D=3D KPrShapeAnimation::With_Previous) { + if (previousNodeType =3D=3D KPrShapeAnimation::WithPrevious) { return scaleBeginForAnimation(this->index(index.row() - 1, ind= ex.column(), QModelIndex())); } - else if (previousNodeType =3D=3D KPrShapeAnimation::After_Previous= ) { + else if (previousNodeType =3D=3D KPrShapeAnimation::AfterPrevious)= { return animationEndByIndex(this->index(index.row() - 1, index.= column(), QModelIndex())); } } @@ -509,19 +509,19 @@ QModelIndex KPrShapeAnimations::replaceAnimation(cons= t QModelIndex &index, KPrSh return index; } = -bool KPrShapeAnimations::setTriggerEvent(const QModelIndex &index, const K= PrShapeAnimation::Node_Type type) +bool KPrShapeAnimations::setTriggerEvent(const QModelIndex &index, const K= PrShapeAnimation::NodeType type) { KPrShapeAnimation *animation =3D animationByRow(index.row()); if (animation) { - KPrShapeAnimation::Node_Type currentType =3D - static_cast(data(this->index= (index.row(), - = KPrShapeAnimations::Node_Type)).toInt()); - if (currentType =3D=3D KPrShapeAnimation::After_Previous) { - if (type =3D=3D KPrShapeAnimation::With_Previous) { + KPrShapeAnimation::NodeType currentType =3D + static_cast(data(this->index(= index.row(), + = KPrShapeAnimations::NodeType)).toInt()); + if (currentType =3D=3D KPrShapeAnimation::AfterPrevious) { + if (type =3D=3D KPrShapeAnimation::WithPrevious) { Q_ASSERT(index.row() > 0); } } - else if (currentType =3D=3D KPrShapeAnimation::On_Click) { + else if (currentType =3D=3D KPrShapeAnimation::OnClick) { if (index.row() < 1) { // Resync trigger event edit widget emit layoutChanged(); @@ -535,7 +535,7 @@ bool KPrShapeAnimations::setTriggerEvent(const QModelIn= dex &index, const KPrShap return false; } = -bool KPrShapeAnimations::setNodeType(KPrShapeAnimation *animation, const K= PrShapeAnimation::Node_Type type) +bool KPrShapeAnimations::setNodeType(KPrShapeAnimation *animation, const K= PrShapeAnimation::NodeType type) { resyncStepsWithAnimations(); if (animation) { @@ -547,12 +547,12 @@ bool KPrShapeAnimations::setNodeType(KPrShapeAnimatio= n *animation, const KPrShap QListmovedSubSteps =3D QList(); KPrAnimationSubStep *newSubStep =3D 0; KPrAnimationStep *newStep =3D 0; - KPrShapeAnimation::Node_Type currentType =3D - static_cast(data(this->index= (index.row(), - = KPrShapeAnimations::Node_Type)).toInt()); - if (currentType =3D=3D KPrShapeAnimation::After_Previous) { + KPrShapeAnimation::NodeType currentType =3D + static_cast(data(this->index(= index.row(), + = KPrShapeAnimations::NodeType)).toInt()); + if (currentType =3D=3D KPrShapeAnimation::AfterPrevious) { // After Previous to With Previous - if (type =3D=3D KPrShapeAnimation::With_Previous) { + if (type =3D=3D KPrShapeAnimation::WithPrevious) { //use previous animation to reparent current animation Q_ASSERT(index.row() > 0); KPrShapeAnimation * previousAnimation =3D animationByRow(i= ndex.row() - 1); @@ -561,7 +561,7 @@ bool KPrShapeAnimations::setNodeType(KPrShapeAnimation = *animation, const KPrShap } = // After Previous to On Click - else if (type =3D=3D KPrShapeAnimation::On_Click) { + else if (type =3D=3D KPrShapeAnimation::OnClick) { // Get index of current substep int currentSubStepIndex =3D animation->step()->indexOfAni= mation(animation->subStep()); int subStepCount =3D animation->step()->animationCount(); @@ -582,9 +582,9 @@ bool KPrShapeAnimations::setNodeType(KPrShapeAnimation = *animation, const KPrShap return false; } } - else if (currentType =3D=3D KPrShapeAnimation::With_Previous) { + else if (currentType =3D=3D KPrShapeAnimation::WithPrevious) { // With Previous to After Previous - if (type =3D=3D KPrShapeAnimation::After_Previous) { + if (type =3D=3D KPrShapeAnimation::AfterPrevious) { // Get index of current substep int currentSubStepIndex =3D animation->step()->indexOfAnima= tion(animation->subStep()); //Create new substep to reparent currrent item and all foll= owing items. @@ -597,7 +597,7 @@ bool KPrShapeAnimations::setNodeType(KPrShapeAnimation = *animation, const KPrShap movedChildren =3D getWithPreviousSiblings(animation); } // With Previous to On Click - else if (type =3D=3D KPrShapeAnimation::On_Click) { + else if (type =3D=3D KPrShapeAnimation::OnClick) { // Get index of current substep int currentSubStepIndex =3D animation->step()->indexOfAnim= ation(animation->subStep()); int subStepCount =3D animation->step()->animationCount(); @@ -623,14 +623,14 @@ bool KPrShapeAnimations::setNodeType(KPrShapeAnimatio= n *animation, const KPrShap return false; } } - else if (currentType =3D=3D KPrShapeAnimation::On_Click) { + else if (currentType =3D=3D KPrShapeAnimation::OnClick) { if (index.row() < 1) { // Resync trigger event edit widget emit layoutChanged(); return false; } // On click to With Previous - if (type =3D=3D KPrShapeAnimation::With_Previous) { + if (type =3D=3D KPrShapeAnimation::WithPrevious) { // Get previous animation KPrShapeAnimation *previousAnimation =3D animationByRow(in= dex.row() - 1); newStep =3D previousAnimation->step(); @@ -646,7 +646,7 @@ bool KPrShapeAnimations::setNodeType(KPrShapeAnimation = *animation, const KPrShap } = // On click to After Previous - else if (type =3D=3D KPrShapeAnimation::After_Previous) { + else if (type =3D=3D KPrShapeAnimation::AfterPrevious) { // Get previous animation KPrShapeAnimation *previousAnimation =3D animationByRow(i= ndex.row() - 1); newStep =3D previousAnimation->step(); @@ -701,7 +701,7 @@ bool KPrShapeAnimations::setNodeType(KPrShapeAnimation = *animation, const KPrShap removeStep(oldStep); } = - if ((currentType =3D=3D KPrShapeAnimation::On_Click) || (type =3D= =3D KPrShapeAnimation::On_Click)) { + if ((currentType =3D=3D KPrShapeAnimation::OnClick) || (type =3D= =3D KPrShapeAnimation::OnClick)) { notifyOnClickEventChanged(); } notifyAnimationChanged(animation); @@ -721,14 +721,14 @@ void KPrShapeAnimations::recalculateStart(const QMode= lIndex &mIndex) } KPrShapeAnimation *animation =3D animationByRow(mIndex.row()); = - KPrShapeAnimation::Node_Type type =3D - static_cast(data(this->index(mIn= dex.row(), - KPr= ShapeAnimations::Node_Type)).toInt()); - if (type =3D=3D KPrShapeAnimation::After_Previous) { + KPrShapeAnimation::NodeType type =3D + static_cast(data(this->index(mInd= ex.row(), + KPr= ShapeAnimations::NodeType)).toInt()); + if (type =3D=3D KPrShapeAnimation::AfterPrevious) { setTimeRange(animation, animationEndByIndex(mIndex), animation->gl= obalDuration()); - setTriggerEvent(mIndex, KPrShapeAnimation::With_Previous); + setTriggerEvent(mIndex, KPrShapeAnimation::WithPrevious); } - else if (type =3D=3D KPrShapeAnimation::With_Previous) { + else if (type =3D=3D KPrShapeAnimation::WithPrevious) { recalculateStart(index(mIndex.row() - 1, 0)); } } @@ -883,14 +883,14 @@ KPrShapeAnimation *KPrShapeAnimations::animationByRow= (const int row, int &groupC stepChild++; subStepChild++; if (stepChild =3D=3D 0) { - b->setNodeType(KPrShapeAnimation::On_Click= ); + b->setNodeType(KPrShapeAnimation::OnClick); groupCount =3D groupCount + 1; } else if (subStepChild =3D=3D 0) { - b->setNodeType(KPrShapeAnimation::After_Pr= evious); + b->setNodeType(KPrShapeAnimation::AfterPre= vious); } else { - b->setNodeType(KPrShapeAnimation::With_Pre= vious); + b->setNodeType(KPrShapeAnimation::WithPrev= ious); } if (rowCount =3D=3D row) { return b; @@ -1115,7 +1115,7 @@ QList KPrShapeAnimations::getS= ubSteps(int start, int end, return movedSubSteps; } = -bool KPrShapeAnimations::createTriggerEventEditCmd(KPrShapeAnimation *anim= ation, KPrShapeAnimation::Node_Type oldType, KPrShapeAnimation::Node_Type n= ewType) +bool KPrShapeAnimations::createTriggerEventEditCmd(KPrShapeAnimation *anim= ation, KPrShapeAnimation::NodeType oldType, KPrShapeAnimation::NodeType new= Type) { KPrAnimationEditNodeTypeCommand *command =3Dnew KPrAnimationEditNodeTy= peCommand(animation, oldType, newType, this); if (m_document) { diff --git a/stage/part/KPrShapeAnimations.h b/stage/part/KPrShapeAnimation= s.h index 8ba8de6..b1bbfe2 100644 --- a/stage/part/KPrShapeAnimations.h +++ b/stage/part/KPrShapeAnimations.h @@ -58,7 +58,7 @@ public: StartTime =3D 6, Duration =3D 7, AnimationClass =3D 8, - Node_Type =3D 9 + NodeType =3D 9 }; = explicit KPrShapeAnimations(QObject *parent =3D 0); @@ -189,7 +189,7 @@ public: * @param index index of the animation * @param type new Node Type for the animation */ - bool setTriggerEvent(const QModelIndex &index, const KPrShapeAnimation= ::Node_Type type); + bool setTriggerEvent(const QModelIndex &index, const KPrShapeAnimation= ::NodeType type); = /** * @brief Change trigger event of the animation @@ -197,7 +197,7 @@ public: * @param animation * @param type new Node Type for the animation */ - bool setNodeType(KPrShapeAnimation *animation, const KPrShapeAnimation= ::Node_Type type); + bool setNodeType(KPrShapeAnimation *animation, const KPrShapeAnimation= ::NodeType type); = /** * @brief Redefine start of the animation if is moved below the minimu= n limit @@ -299,7 +299,7 @@ private: void setTimeRangeIncrementalChange(KPrShapeAnimation *item, const int = begin, const int duration, TimeUpdated updatedTimes); QList getWithPreviousSiblings(KPrShapeAnimation *= animation); QList getSubSteps(int start, int end, KPrAnimat= ionStep *step); - bool createTriggerEventEditCmd(KPrShapeAnimation *animation, KPrShapeA= nimation::Node_Type oldType, KPrShapeAnimation::Node_Type newType); + bool createTriggerEventEditCmd(KPrShapeAnimation *animation, KPrShapeA= nimation::NodeType oldType, KPrShapeAnimation::NodeType newType); = QList m_shapeAnimations; KPrShapeAnimation *m_currentEditedAnimation; diff --git a/stage/part/KPrTimeLineView.h b/stage/part/KPrTimeLineView.h index 99ca40e..50b7334 100644 --- a/stage/part/KPrTimeLineView.h +++ b/stage/part/KPrTimeLineView.h @@ -38,6 +38,9 @@ class KPrTimeLineView: public QWidget Q_OBJECT public: KPrTimeLineView(QWidget* parent =3D 0); + virtual QSize sizeHint() const; + virtual QSize minimumSizeHint() const; + virtual bool eventFilter(QObject *target, QEvent *event); = signals: void clicked(const QModelIndex&); @@ -45,9 +48,6 @@ signals: void timeValuesChanged(const QModelIndex&); = private: - QSize sizeHint() const; - QSize minimumSizeHint() const; - bool eventFilter(QObject *target, QEvent *event); void keyPressEvent(QKeyEvent *event); void mousePressEvent(QMouseEvent *event); void mouseMoveEvent(QMouseEvent *event); @@ -72,8 +72,6 @@ private: int m_resizedRow; int startDragPos; bool m_adjust; - - friend class KPrAnimationsTimeLineView; }; = #endif // KPRTIMELINEVIEW_H diff --git a/stage/part/animations/KPrAnimationLoader.cpp b/stage/part/anim= ations/KPrAnimationLoader.cpp index af250a8..6270ed6 100644 --- a/stage/part/animations/KPrAnimationLoader.cpp +++ b/stage/part/animations/KPrAnimationLoader.cpp @@ -227,13 +227,13 @@ bool KPrAnimationLoader::loadOdfAnimation(KPrAnimatio= nStep **animationStep, cons shapeAnimation->setPresetClass(KPrShapeAnimation::Emphasis); } else if (presetClass =3D=3D "motion-path") { - shapeAnimation->setPresetClass(KPrShapeAnimation::Motion_Path); + shapeAnimation->setPresetClass(KPrShapeAnimation::MotionPath); } else if (presetClass =3D=3D "ole-action") { - shapeAnimation->setPresetClass(KPrShapeAnimation::Ole_Action); + shapeAnimation->setPresetClass(KPrShapeAnimation::OleAction); } else if (presetClass =3D=3D "media-call") { - shapeAnimation->setPresetClass(KPrShapeAnimation::Media_Call); + shapeAnimation->setPresetClass(KPrShapeAnimation::MediaCall); } else{ shapeAnimation->setPresetClass(KPrShapeAnimation::None); diff --git a/stage/part/animations/KPrShapeAnimation.cpp b/stage/part/anima= tions/KPrShapeAnimation.cpp index 83815fd..239e1fc 100644 --- a/stage/part/animations/KPrShapeAnimation.cpp +++ b/stage/part/animations/KPrShapeAnimation.cpp @@ -32,7 +32,7 @@ KPrShapeAnimation::KPrShapeAnimation(KoShape *shape, KoTextBlockData *text= BlockData) : m_shape(shape) , m_textBlockData(textBlockData) -, m_triggerEvent(KPrShapeAnimation::On_Click) +, m_triggerEvent(KPrShapeAnimation::OnClick) , m_class(KPrShapeAnimation::None) , m_id(QString()) , m_presetSubType(QString()) @@ -214,14 +214,14 @@ void KPrShapeAnimation::deactivate() = = = -void KPrShapeAnimation::setNodeType(KPrShapeAnimation::Node_Type type) +void KPrShapeAnimation::setNodeType(KPrShapeAnimation::NodeType type) { if (type !=3D m_triggerEvent) { m_triggerEvent =3D type; } } = -void KPrShapeAnimation::setPresetClass(KPrShapeAnimation::Preset_Class pre= setClass) +void KPrShapeAnimation::setPresetClass(KPrShapeAnimation::PresetClass pres= etClass) { m_class =3D presetClass; } @@ -236,12 +236,12 @@ void KPrShapeAnimation::setPresetSubType(QString subT= ype) m_presetSubType =3D subType; } = -KPrShapeAnimation::Node_Type KPrShapeAnimation::NodeType() const +KPrShapeAnimation::NodeType KPrShapeAnimation::nodeType() const { return m_triggerEvent; } = -KPrShapeAnimation::Preset_Class KPrShapeAnimation::presetClass() const +KPrShapeAnimation::PresetClass KPrShapeAnimation::presetClass() const { return m_class; } @@ -265,13 +265,13 @@ QString KPrShapeAnimation::presetClassText() const else if (presetClass() =3D=3D KPrShapeAnimation::Exit) { return QString("exit"); } - else if (presetClass() =3D=3D KPrShapeAnimation::Motion_Path) { + else if (presetClass() =3D=3D KPrShapeAnimation::MotionPath) { return QString("motion-path"); } - else if (presetClass() =3D=3D KPrShapeAnimation::Ole_Action) { + else if (presetClass() =3D=3D KPrShapeAnimation::OleAction) { return QString("ole-action"); } - else if (presetClass() =3D=3D KPrShapeAnimation::Media_Call) { + else if (presetClass() =3D=3D KPrShapeAnimation::MediaCall) { return QString("media-call"); } else { diff --git a/stage/part/animations/KPrShapeAnimation.h b/stage/part/animati= ons/KPrShapeAnimation.h index 1706c03..e53c2c2 100644 --- a/stage/part/animations/KPrShapeAnimation.h +++ b/stage/part/animations/KPrShapeAnimation.h @@ -43,26 +43,26 @@ class STAGE_EXPORT KPrShapeAnimation : public QParallel= AnimationGroup, KPrAnimat public: = /// Node Type (Trigger Event of the animation) - enum Node_Type { - On_Click, - After_Previous, - With_Previous + enum NodeType { + OnClick, + AfterPrevious, + WithPrevious }; = /// Animation class - enum Preset_Class { + enum PresetClass { None, Entrance, Exit, Emphasis, Custom, - Motion_Path, - Ole_Action, - Media_Call + MotionPath, + OleAction, + MediaCall }; = /// State of the animation - enum Animation_State { + enum AnimationState { Valid, Invalid }; @@ -135,14 +135,14 @@ public: * * @param type Node Type */ - void setNodeType(Node_Type type); + void setNodeType(NodeType type); = /** * @brief Set class of the animation * * @param presetClass */ - void setPresetClass(Preset_Class presetClass); + void setPresetClass(PresetClass presetClass); = /** * @brief Set the id (name) of the animation @@ -158,14 +158,14 @@ public: * * @return Node_Type */ - Node_Type NodeType() const; + NodeType nodeType() const; = /** * @brief Returns stored class of the animation * * @return Preset_Class */ - Preset_Class presetClass() const; + PresetClass presetClass() const; = /** * @brief Returns the id (name) of the animation @@ -232,8 +232,8 @@ signals: private: KoShape *m_shape; KoTextBlockData *m_textBlockData; - Node_Type m_triggerEvent; - Preset_Class m_class; + NodeType m_triggerEvent; + PresetClass m_class; QString m_id; QString m_presetSubType; KPrAnimationStep *m_step; diff --git a/stage/part/commands/KPrAnimationEditNodeTypeCommand.cpp b/stag= e/part/commands/KPrAnimationEditNodeTypeCommand.cpp index ccf81ae..e3a5b2d 100644 --- a/stage/part/commands/KPrAnimationEditNodeTypeCommand.cpp +++ b/stage/part/commands/KPrAnimationEditNodeTypeCommand.cpp @@ -24,8 +24,8 @@ = const int INVALID =3D -1; = -KPrAnimationEditNodeTypeCommand::KPrAnimationEditNodeTypeCommand(KPrShapeA= nimation *animation, KPrShapeAnimation::Node_Type oldType, - KPrShapeA= nimation::Node_Type newType, +KPrAnimationEditNodeTypeCommand::KPrAnimationEditNodeTypeCommand(KPrShapeA= nimation *animation, KPrShapeAnimation::NodeType oldType, + KPrShapeA= nimation::NodeType newType, KPrShapeA= nimations *animationModel, KUndo2Command *parent) : KUndo2Command(parent) , m_animation(animation) diff --git a/stage/part/commands/KPrAnimationEditNodeTypeCommand.h b/stage/= part/commands/KPrAnimationEditNodeTypeCommand.h index 9078966..27dc1e7 100644 --- a/stage/part/commands/KPrAnimationEditNodeTypeCommand.h +++ b/stage/part/commands/KPrAnimationEditNodeTypeCommand.h @@ -31,7 +31,7 @@ class KPrShapeAnimations; class STAGE_EXPORT KPrAnimationEditNodeTypeCommand : public KUndo2Command { public: - KPrAnimationEditNodeTypeCommand(KPrShapeAnimation *animation, KPrShape= Animation::Node_Type oldType, KPrShapeAnimation::Node_Type newType, KPrShap= eAnimations *animationModel, KUndo2Command *parent=3D0); + KPrAnimationEditNodeTypeCommand(KPrShapeAnimation *animation, KPrShape= Animation::NodeType oldType, KPrShapeAnimation::NodeType newType, KPrShapeA= nimations *animationModel, KUndo2Command *parent=3D0); = = virtual ~KPrAnimationEditNodeTypeCommand(); @@ -43,8 +43,8 @@ public: = private: KPrShapeAnimation * m_animation; - KPrShapeAnimation::Node_Type m_newType; - KPrShapeAnimation::Node_Type m_oldType; + KPrShapeAnimation::NodeType m_newType; + KPrShapeAnimation::NodeType m_oldType; KPrShapeAnimations *m_model; }; = diff --git a/stage/part/tests/TestShapeAnimations.cpp b/stage/part/tests/Te= stShapeAnimations.cpp index 5d392c1..f0212fd 100644 --- a/stage/part/tests/TestShapeAnimations.cpp +++ b/stage/part/tests/TestShapeAnimations.cpp @@ -153,24 +153,24 @@ void TestShapeAnimations::getTriggerEvent() new ModelTest(&animations, this); createAnimationTree(&animations); // Test Trigger Event - QCOMPARE(animations.data(animations.index(0, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::On_Click); - QCOMPARE(animations.data(animations.index(1, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); - QCOMPARE(animations.data(animations.index(2, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); - QCOMPARE(animations.data(animations.index(3, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::After_Previous); - QCOMPARE(animations.data(animations.index(4, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); - QCOMPARE(animations.data(animations.index(5, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::On_Click); - QCOMPARE(animations.data(animations.index(6, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::After_Previous); - QCOMPARE(animations.data(animations.index(7, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::On_Click); - QCOMPARE(animations.data(animations.index(8, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); + QCOMPARE(animations.data(animations.index(0, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::OnClick); + QCOMPARE(animations.data(animations.index(1, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); + QCOMPARE(animations.data(animations.index(2, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); + QCOMPARE(animations.data(animations.index(3, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::AfterPrevious); + QCOMPARE(animations.data(animations.index(4, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); + QCOMPARE(animations.data(animations.index(5, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::OnClick); + QCOMPARE(animations.data(animations.index(6, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::AfterPrevious); + QCOMPARE(animations.data(animations.index(7, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::OnClick); + QCOMPARE(animations.data(animations.index(8, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); // Test group QCOMPARE(animations.data(animations.index(0, KPrShapeAnimations::Group= )).toInt(), 1); QCOMPARE(animations.data(animations.index(1, KPrShapeAnimations::Group= )).toInt(), 1); @@ -194,213 +194,213 @@ void TestShapeAnimations::setTriggerEvent() createAnimationTree(&animations); // From On click // To After Previous - animations.setNodeType(m_animation[5], KPrShapeAnimation::After_Previo= us); - QCOMPARE(animations.data(animations.index(0, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::On_Click); - QCOMPARE(animations.data(animations.index(1, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); - QCOMPARE(animations.data(animations.index(2, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); - QCOMPARE(animations.data(animations.index(3, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::After_Previous); - QCOMPARE(animations.data(animations.index(4, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); - QCOMPARE(animations.data(animations.index(5, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::After_Previous); - QCOMPARE(animations.data(animations.index(6, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::After_Previous); - QCOMPARE(animations.data(animations.index(7, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::On_Click); - QCOMPARE(animations.data(animations.index(8, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); + animations.setNodeType(m_animation[5], KPrShapeAnimation::AfterPreviou= s); + QCOMPARE(animations.data(animations.index(0, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::OnClick); + QCOMPARE(animations.data(animations.index(1, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); + QCOMPARE(animations.data(animations.index(2, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); + QCOMPARE(animations.data(animations.index(3, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::AfterPrevious); + QCOMPARE(animations.data(animations.index(4, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); + QCOMPARE(animations.data(animations.index(5, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::AfterPrevious); + QCOMPARE(animations.data(animations.index(6, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::AfterPrevious); + QCOMPARE(animations.data(animations.index(7, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::OnClick); + QCOMPARE(animations.data(animations.index(8, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); checkOrder(&animations); QVERIFY(animations.rowCount() =3D=3D ANIMATIONS_COUNT); = // To With Previous - animations.setNodeType(m_animation[7], KPrShapeAnimation::With_Previou= s); - QCOMPARE(animations.data(animations.index(0, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::On_Click); - QCOMPARE(animations.data(animations.index(1, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); - QCOMPARE(animations.data(animations.index(2, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); - QCOMPARE(animations.data(animations.index(3, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::After_Previous); - QCOMPARE(animations.data(animations.index(4, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); - QCOMPARE(animations.data(animations.index(5, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::After_Previous); - QCOMPARE(animations.data(animations.index(6, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::After_Previous); - QCOMPARE(animations.data(animations.index(7, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); - QCOMPARE(animations.data(animations.index(8, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); + animations.setNodeType(m_animation[7], KPrShapeAnimation::WithPrevious= ); + QCOMPARE(animations.data(animations.index(0, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::OnClick); + QCOMPARE(animations.data(animations.index(1, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); + QCOMPARE(animations.data(animations.index(2, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); + QCOMPARE(animations.data(animations.index(3, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::AfterPrevious); + QCOMPARE(animations.data(animations.index(4, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); + QCOMPARE(animations.data(animations.index(5, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::AfterPrevious); + QCOMPARE(animations.data(animations.index(6, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::AfterPrevious); + QCOMPARE(animations.data(animations.index(7, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); + QCOMPARE(animations.data(animations.index(8, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); checkOrder(&animations); QVERIFY(animations.rowCount() =3D=3D ANIMATIONS_COUNT); = // From After Previous // To On click - animations.setNodeType(m_animation[3], KPrShapeAnimation::On_Click); - QCOMPARE(animations.data(animations.index(0, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::On_Click); - QCOMPARE(animations.data(animations.index(1, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); - QCOMPARE(animations.data(animations.index(2, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); - QCOMPARE(animations.data(animations.index(3, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::On_Click); - QCOMPARE(animations.data(animations.index(4, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); - QCOMPARE(animations.data(animations.index(5, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::After_Previous); - QCOMPARE(animations.data(animations.index(6, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::After_Previous); - QCOMPARE(animations.data(animations.index(7, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); - QCOMPARE(animations.data(animations.index(8, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); + animations.setNodeType(m_animation[3], KPrShapeAnimation::OnClick); + QCOMPARE(animations.data(animations.index(0, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::OnClick); + QCOMPARE(animations.data(animations.index(1, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); + QCOMPARE(animations.data(animations.index(2, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); + QCOMPARE(animations.data(animations.index(3, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::OnClick); + QCOMPARE(animations.data(animations.index(4, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); + QCOMPARE(animations.data(animations.index(5, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::AfterPrevious); + QCOMPARE(animations.data(animations.index(6, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::AfterPrevious); + QCOMPARE(animations.data(animations.index(7, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); + QCOMPARE(animations.data(animations.index(8, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); checkOrder(&animations); QVERIFY(animations.rowCount() =3D=3D ANIMATIONS_COUNT); = // To With previous - animations.setNodeType(m_animation[6], KPrShapeAnimation::With_Previou= s); - QCOMPARE(animations.data(animations.index(0, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::On_Click); - QCOMPARE(animations.data(animations.index(1, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); - QCOMPARE(animations.data(animations.index(2, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); - QCOMPARE(animations.data(animations.index(3, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::On_Click); - QCOMPARE(animations.data(animations.index(4, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); - QCOMPARE(animations.data(animations.index(5, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::After_Previous); - QCOMPARE(animations.data(animations.index(6, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); - QCOMPARE(animations.data(animations.index(7, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); - QCOMPARE(animations.data(animations.index(8, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); + animations.setNodeType(m_animation[6], KPrShapeAnimation::WithPrevious= ); + QCOMPARE(animations.data(animations.index(0, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::OnClick); + QCOMPARE(animations.data(animations.index(1, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); + QCOMPARE(animations.data(animations.index(2, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); + QCOMPARE(animations.data(animations.index(3, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::OnClick); + QCOMPARE(animations.data(animations.index(4, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); + QCOMPARE(animations.data(animations.index(5, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::AfterPrevious); + QCOMPARE(animations.data(animations.index(6, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); + QCOMPARE(animations.data(animations.index(7, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); + QCOMPARE(animations.data(animations.index(8, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); checkOrder(&animations); QVERIFY(animations.rowCount() =3D=3D ANIMATIONS_COUNT); = // From with previous // To On click - animations.setNodeType(m_animation[1], KPrShapeAnimation::On_Click); - QCOMPARE(animations.data(animations.index(0, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::On_Click); - QCOMPARE(animations.data(animations.index(1, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::On_Click); - QCOMPARE(animations.data(animations.index(2, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); - QCOMPARE(animations.data(animations.index(3, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::On_Click); - QCOMPARE(animations.data(animations.index(4, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); - QCOMPARE(animations.data(animations.index(5, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::After_Previous); - QCOMPARE(animations.data(animations.index(6, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); - QCOMPARE(animations.data(animations.index(7, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); - QCOMPARE(animations.data(animations.index(8, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); + animations.setNodeType(m_animation[1], KPrShapeAnimation::OnClick); + QCOMPARE(animations.data(animations.index(0, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::OnClick); + QCOMPARE(animations.data(animations.index(1, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::OnClick); + QCOMPARE(animations.data(animations.index(2, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); + QCOMPARE(animations.data(animations.index(3, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::OnClick); + QCOMPARE(animations.data(animations.index(4, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); + QCOMPARE(animations.data(animations.index(5, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::AfterPrevious); + QCOMPARE(animations.data(animations.index(6, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); + QCOMPARE(animations.data(animations.index(7, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); + QCOMPARE(animations.data(animations.index(8, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); checkOrder(&animations); QVERIFY(animations.rowCount() =3D=3D ANIMATIONS_COUNT); = // To after previous - animations.setNodeType(m_animation[6], KPrShapeAnimation::After_Previo= us); - QCOMPARE(animations.data(animations.index(0, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::On_Click); - QCOMPARE(animations.data(animations.index(1, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::On_Click); - QCOMPARE(animations.data(animations.index(2, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); - QCOMPARE(animations.data(animations.index(3, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::On_Click); - QCOMPARE(animations.data(animations.index(4, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); - QCOMPARE(animations.data(animations.index(5, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::After_Previous); - QCOMPARE(animations.data(animations.index(6, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::After_Previous); - QCOMPARE(animations.data(animations.index(7, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); - QCOMPARE(animations.data(animations.index(8, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); + animations.setNodeType(m_animation[6], KPrShapeAnimation::AfterPreviou= s); + QCOMPARE(animations.data(animations.index(0, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::OnClick); + QCOMPARE(animations.data(animations.index(1, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::OnClick); + QCOMPARE(animations.data(animations.index(2, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); + QCOMPARE(animations.data(animations.index(3, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::OnClick); + QCOMPARE(animations.data(animations.index(4, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); + QCOMPARE(animations.data(animations.index(5, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::AfterPrevious); + QCOMPARE(animations.data(animations.index(6, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::AfterPrevious); + QCOMPARE(animations.data(animations.index(7, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); + QCOMPARE(animations.data(animations.index(8, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); checkOrder(&animations); QVERIFY(animations.rowCount() =3D=3D ANIMATIONS_COUNT); = // From On click // To After Previous (with childrem) - animations.setNodeType(m_animation[3], KPrShapeAnimation::After_Previo= us); - QCOMPARE(animations.data(animations.index(0, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::On_Click); - QCOMPARE(animations.data(animations.index(1, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::On_Click); - QCOMPARE(animations.data(animations.index(2, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); - QCOMPARE(animations.data(animations.index(3, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::After_Previous); - QCOMPARE(animations.data(animations.index(4, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); - QCOMPARE(animations.data(animations.index(5, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::After_Previous); - QCOMPARE(animations.data(animations.index(6, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::After_Previous); - QCOMPARE(animations.data(animations.index(7, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); - QCOMPARE(animations.data(animations.index(8, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); + animations.setNodeType(m_animation[3], KPrShapeAnimation::AfterPreviou= s); + QCOMPARE(animations.data(animations.index(0, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::OnClick); + QCOMPARE(animations.data(animations.index(1, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::OnClick); + QCOMPARE(animations.data(animations.index(2, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); + QCOMPARE(animations.data(animations.index(3, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::AfterPrevious); + QCOMPARE(animations.data(animations.index(4, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); + QCOMPARE(animations.data(animations.index(5, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::AfterPrevious); + QCOMPARE(animations.data(animations.index(6, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::AfterPrevious); + QCOMPARE(animations.data(animations.index(7, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); + QCOMPARE(animations.data(animations.index(8, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); checkOrder(&animations); QVERIFY(animations.rowCount() =3D=3D ANIMATIONS_COUNT); = //From On Click // To after previous (invald for the first animation) - animations.setNodeType(m_animation[0], KPrShapeAnimation::After_Previo= us); - QCOMPARE(animations.data(animations.index(0, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::On_Click); - QCOMPARE(animations.data(animations.index(1, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::On_Click); - QCOMPARE(animations.data(animations.index(2, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); - QCOMPARE(animations.data(animations.index(3, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::After_Previous); - QCOMPARE(animations.data(animations.index(4, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); - QCOMPARE(animations.data(animations.index(5, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::After_Previous); - QCOMPARE(animations.data(animations.index(6, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::After_Previous); - QCOMPARE(animations.data(animations.index(7, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); - QCOMPARE(animations.data(animations.index(8, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); + animations.setNodeType(m_animation[0], KPrShapeAnimation::AfterPreviou= s); + QCOMPARE(animations.data(animations.index(0, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::OnClick); + QCOMPARE(animations.data(animations.index(1, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::OnClick); + QCOMPARE(animations.data(animations.index(2, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); + QCOMPARE(animations.data(animations.index(3, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::AfterPrevious); + QCOMPARE(animations.data(animations.index(4, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); + QCOMPARE(animations.data(animations.index(5, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::AfterPrevious); + QCOMPARE(animations.data(animations.index(6, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::AfterPrevious); + QCOMPARE(animations.data(animations.index(7, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); + QCOMPARE(animations.data(animations.index(8, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); checkOrder(&animations); QVERIFY(animations.rowCount() =3D=3D ANIMATIONS_COUNT); = //To with previous (invalid for the first item) - animations.setNodeType(m_animation[0], KPrShapeAnimation::With_Previou= s); - QCOMPARE(animations.data(animations.index(0, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::On_Click); - QCOMPARE(animations.data(animations.index(1, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::On_Click); - QCOMPARE(animations.data(animations.index(2, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); - QCOMPARE(animations.data(animations.index(3, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::After_Previous); - QCOMPARE(animations.data(animations.index(4, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); - QCOMPARE(animations.data(animations.index(5, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::After_Previous); - QCOMPARE(animations.data(animations.index(6, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::After_Previous); - QCOMPARE(animations.data(animations.index(7, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); - QCOMPARE(animations.data(animations.index(8, KPrShapeAnimations::Node_= Type)).toInt(), - (int)KPrShapeAnimation::With_Previous); + animations.setNodeType(m_animation[0], KPrShapeAnimation::WithPrevious= ); + QCOMPARE(animations.data(animations.index(0, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::OnClick); + QCOMPARE(animations.data(animations.index(1, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::OnClick); + QCOMPARE(animations.data(animations.index(2, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); + QCOMPARE(animations.data(animations.index(3, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::AfterPrevious); + QCOMPARE(animations.data(animations.index(4, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); + QCOMPARE(animations.data(animations.index(5, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::AfterPrevious); + QCOMPARE(animations.data(animations.index(6, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::AfterPrevious); + QCOMPARE(animations.data(animations.index(7, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); + QCOMPARE(animations.data(animations.index(8, KPrShapeAnimations::NodeT= ype)).toInt(), + (int)KPrShapeAnimation::WithPrevious); checkOrder(&animations); QVERIFY(animations.rowCount() =3D=3D ANIMATIONS_COUNT); } diff --git a/stage/part/tools/animationtool/KPrEditAnimationsWidget.cpp b/s= tage/part/tools/animationtool/KPrEditAnimationsWidget.cpp index 77e9efc..d16b4a5 100644 --- a/stage/part/tools/animationtool/KPrEditAnimationsWidget.cpp +++ b/stage/part/tools/animationtool/KPrEditAnimationsWidget.cpp @@ -171,7 +171,7 @@ QModelIndex KPrEditAnimationsWidget::currentIndex() void KPrEditAnimationsWidget::updateIndex(const QModelIndex &index) { if (index.isValid() && (index.row() =3D=3D m_timeLineView->currentInde= x().row())) { - QModelIndex triggerIndex =3D m_timeLineModel->index(index.row(), K= PrShapeAnimations::Node_Type); + QModelIndex triggerIndex =3D m_timeLineModel->index(index.row(), K= PrShapeAnimations::NodeType); QModelIndex beginTimeIndex =3D m_timeLineModel->index(index.row(),= KPrShapeAnimations::StartTime); QModelIndex durationIndex =3D m_timeLineModel->index(index.row(), = KPrShapeAnimations::Duration); m_triggerEventList->setCurrentIndex(m_timeLineModel->data(triggerI= ndex).toInt()); @@ -198,12 +198,12 @@ void KPrEditAnimationsWidget::setTriggerEvent(int row) { QModelIndex index =3D m_timeLineView->currentIndex(); if ((row >=3D 0) && index.isValid()) { - QModelIndex triggerIndex =3D m_timeLineModel->index(index.row(), K= PrShapeAnimations::Node_Type); + QModelIndex triggerIndex =3D m_timeLineModel->index(index.row(), K= PrShapeAnimations::NodeType); if (row !=3D m_timeLineModel->data(triggerIndex).toInt()) { - KPrShapeAnimation::Node_Type newType; - if (row =3D=3D 0) newType =3D KPrShapeAnimation::On_Click; - else if (row =3D=3D 1) newType =3D KPrShapeAnimation::After_Pr= evious; - else newType =3D KPrShapeAnimation::With_Previous; + KPrShapeAnimation::NodeType newType; + if (row =3D=3D 0) newType =3D KPrShapeAnimation::OnClick; + else if (row =3D=3D 1) newType =3D KPrShapeAnimation::AfterPre= vious; + else newType =3D KPrShapeAnimation::WithPrevious; m_docker->mainModel()->setTriggerEvent(m_timeLineModel->mapToS= ource(m_timeLineView->currentIndex()), newType); } } @@ -231,30 +231,30 @@ void KPrEditAnimationsWidget::showTimeLineCustomConte= xtMenu(const QPoint &pos) if (!index.isValid()) { return; } - QModelIndex triggerIndex =3D m_timeLineModel->index(index.row(), K= PrShapeAnimations::Node_Type); - KPrShapeAnimation::Node_Type currentType =3D static_cast (m_timeLineModel->data(triggerIndex).toInt()); + QModelIndex triggerIndex =3D m_timeLineModel->index(index.row(), K= PrShapeAnimations::NodeType); + KPrShapeAnimation::NodeType currentType =3D static_cast (m_timeLineModel->data(triggerIndex).toInt()); = QActionGroup *actionGroup =3D new QActionGroup(m_timeLineView); actionGroup->setExclusive(true); KAction *onClickAction =3D new KAction(KIcon("onclick"), i18n("sta= rt on mouse click"), m_timeLineView); onClickAction->setCheckable(true); - onClickAction->setData(KPrShapeAnimation::On_Click); + onClickAction->setData(KPrShapeAnimation::OnClick); KAction *afterAction =3D new KAction(KIcon("after_previous"), i18n= ("start after previous animation"), m_timeLineView); afterAction->setCheckable(true); - afterAction->setData(KPrShapeAnimation::After_Previous); + afterAction->setData(KPrShapeAnimation::AfterPrevious); KAction *withAction =3D new KAction(KIcon("with_previous"), i18n("= start with previous animation"), m_timeLineView); withAction->setCheckable(true); - withAction->setData(KPrShapeAnimation::With_Previous); + withAction->setData(KPrShapeAnimation::WithPrevious); = actionGroup->addAction(onClickAction); actionGroup->addAction(afterAction); actionGroup->addAction(withAction); actionGroup->setExclusive(true); = - if (currentType =3D=3D KPrShapeAnimation::On_Click) { + if (currentType =3D=3D KPrShapeAnimation::OnClick) { onClickAction->setChecked(true); } - else if (currentType =3D=3D KPrShapeAnimation::After_Previous) { + else if (currentType =3D=3D KPrShapeAnimation::AfterPrevious) { afterAction->setChecked(true); } else { diff --git a/stage/part/tools/animationtool/KPrPredefinedAnimationsLoader.c= pp b/stage/part/tools/animationtool/KPrPredefinedAnimationsLoader.cpp index 152996d..48beeee 100644 --- a/stage/part/tools/animationtool/KPrPredefinedAnimationsLoader.cpp +++ b/stage/part/tools/animationtool/KPrPredefinedAnimationsLoader.cpp @@ -138,7 +138,7 @@ void KPrPredefinedAnimationsLoader::loadDefaultAnimatio= ns() temp.name =3D animationName(animId); temp.toolTip =3D temp.name; = temp.animationContext =3D m_animationContext.value(row); - if (animation->presetClass() =3D=3D KPrShapeAnimation::Motion_Path= ) { + if (animation->presetClass() =3D=3D KPrShapeAnimation::MotionPath)= { temp.icon =3D loadMotionPathIcon(temp.animationContext); } else { @@ -157,13 +157,13 @@ void KPrPredefinedAnimationsLoader::loadDefaultAnimat= ions() else if (animation->presetClass() =3D=3D KPrShapeAnimation::Custom= ) { customList.append(temp); } - else if (animation->presetClass() =3D=3D KPrShapeAnimation::Motion= _Path) { + else if (animation->presetClass() =3D=3D KPrShapeAnimation::Motion= Path) { motion_PathList.append(temp); } - else if (animation->presetClass() =3D=3D KPrShapeAnimation::Ole_Ac= tion) { + else if (animation->presetClass() =3D=3D KPrShapeAnimation::OleAct= ion) { ole_ActionList.append(temp); } - else if (animation->presetClass() =3D=3D KPrShapeAnimation::Media_= Call) { + else if (animation->presetClass() =3D=3D KPrShapeAnimation::MediaC= all) { media_CallList.append(temp); } } @@ -363,7 +363,7 @@ KPrShapeAnimation *KPrPredefinedAnimationsLoader::loadO= dfShapeAnimation(const Ko } = if (shapeAnimation) { - shapeAnimation->setNodeType(KPrShapeAnimation::On_Click); + shapeAnimation->setNodeType(KPrShapeAnimation::OnClick); if (presetClass =3D=3D "custom") { shapeAnimation->setPresetClass(KPrShapeAnimation::Custom); } @@ -377,13 +377,13 @@ KPrShapeAnimation *KPrPredefinedAnimationsLoader::loa= dOdfShapeAnimation(const Ko shapeAnimation->setPresetClass(KPrShapeAnimation::Emphasis); } else if (presetClass =3D=3D "motion-path") { - shapeAnimation->setPresetClass(KPrShapeAnimation::Motion_Path); + shapeAnimation->setPresetClass(KPrShapeAnimation::MotionPath); } else if (presetClass =3D=3D "ole-action") { - shapeAnimation->setPresetClass(KPrShapeAnimation::Ole_Action); + shapeAnimation->setPresetClass(KPrShapeAnimation::OleAction); } else if (presetClass =3D=3D "media-call") { - shapeAnimation->setPresetClass(KPrShapeAnimation::Media_Call); + shapeAnimation->setPresetClass(KPrShapeAnimation::MediaCall); } else{ shapeAnimation->setPresetClass(KPrShapeAnimation::None); diff --git a/stage/part/tools/animationtool/KPrShapeAnimationDocker.cpp b/s= tage/part/tools/animationtool/KPrShapeAnimationDocker.cpp index 8327aac..eb89e67 100644 --- a/stage/part/tools/animationtool/KPrShapeAnimationDocker.cpp +++ b/stage/part/tools/animationtool/KPrShapeAnimationDocker.cpp @@ -510,23 +510,23 @@ void KPrShapeAnimationDocker::showAnimationsCustomCon= textMenu(const QPoint &pos) actionGroup->setExclusive(true); KAction *onClickAction =3D new KAction(KIcon("onclick"), i18n("sta= rt on mouse click"), m_animationsView); onClickAction->setCheckable(true); - onClickAction->setData(KPrShapeAnimation::On_Click); + onClickAction->setData(KPrShapeAnimation::OnClick); KAction *afterAction =3D new KAction(KIcon("after_previous"), i18n= ("start after previous animation"), m_animationsView); afterAction->setCheckable(true); - afterAction->setData(KPrShapeAnimation::After_Previous); + afterAction->setData(KPrShapeAnimation::AfterPrevious); KAction *withAction =3D new KAction(KIcon("with_previous"), i18n("= start with previous animation"), m_animationsView); withAction->setCheckable(true); - withAction->setData(KPrShapeAnimation::With_Previous); + withAction->setData(KPrShapeAnimation::WithPrevious); = actionGroup->addAction(onClickAction); actionGroup->addAction(afterAction); actionGroup->addAction(withAction); actionGroup->setExclusive(true); = - if (currentAnimation->NodeType() =3D=3D KPrShapeAnimation::On_Clic= k) { + if (currentAnimation->nodeType() =3D=3D KPrShapeAnimation::OnClick= ) { onClickAction->setChecked(true); } - else if (currentAnimation->NodeType() =3D=3D KPrShapeAnimation::Af= ter_Previous) { + else if (currentAnimation->nodeType() =3D=3D KPrShapeAnimation::Af= terPrevious) { afterAction->setChecked(true); } else { @@ -548,12 +548,12 @@ void KPrShapeAnimationDocker::setTriggerEvent(QAction= *action) = int row =3D action->data().toInt(); QModelIndex triggerIndex =3D m_animationsModel->index(m_animationsView= ->currentIndex().row(), - KPrShapeAnimations= ::Node_Type); + KPrShapeAnimations= ::NodeType); if (row !=3D m_animationsModel->data(triggerIndex).toInt()) { - KPrShapeAnimation::Node_Type newType; - if (row =3D=3D 0) newType =3D KPrShapeAnimation::On_Click; - else if (row =3D=3D 1) newType =3D KPrShapeAnimation::After_Previo= us; - else newType =3D KPrShapeAnimation::With_Previous; + KPrShapeAnimation::NodeType newType; + if (row =3D=3D 0) newType =3D KPrShapeAnimation::OnClick; + else if (row =3D=3D 1) newType =3D KPrShapeAnimation::AfterPreviou= s; + else newType =3D KPrShapeAnimation::WithPrevious; m_animationsModel->setTriggerEvent(m_animationsView->currentIndex(= ), newType); } }