[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [calligra/stage-paulm-test3] stage/part: Code style fixing
From: Paul Mendez <paulestebanms () gmail ! com>
Date: 2012-07-31 22:21:38
Message-ID: 20120731222138.2A786A60A6 () git ! kde ! org
[Download RAW message or body]
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/KPrAnimationsTimeLineView.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 =
- static_cast<KPrShapeAnimation::Preset_Class>(m_model->data(m_model->index(row, \
KPrShapeAnimations::AnimationClass)).toInt()); + \
KPrShapeAnimation::PresetClass type = + \
static_cast<KPrShapeAnimation::PresetClass>(m_model->data(m_model->index(row, \
KPrShapeAnimations::AnimationClass)).toInt()); if (type == \
KPrShapeAnimation::Entrance) { return Qt::darkGreen;
} else if (type == KPrShapeAnimation::Emphasis) {
@@ -299,17 +299,17 @@ QColor KPrAnimationsTimeLineView::colorforRow(int row)
int KPrAnimationsTimeLineView::calculateStartOffset(int row)
{
//calculate real start
- KPrShapeAnimation::Node_Type triggerEvent = \
static_cast<KPrShapeAnimation::Node_Type>(
- m_model->data(m_model->index(row, \
KPrShapeAnimations::Node_Type)).toInt()); + KPrShapeAnimation::NodeType \
triggerEvent = static_cast<KPrShapeAnimation::NodeType>( + \
m_model->data(m_model->index(row, KPrShapeAnimations::NodeType)).toInt()); if (row \
<= 0) { return 0;
}
- if (triggerEvent == KPrShapeAnimation::After_Previous) {
- QModelIndex sourceIndex = m_model->mapToSource(m_model->index(row - 1, \
KPrShapeAnimations::Node_Type)); + if (triggerEvent == \
KPrShapeAnimation::AfterPrevious) { + QModelIndex sourceIndex = \
m_model->mapToSource(m_model->index(row - 1, KPrShapeAnimations::NodeType)); return \
m_shapeModel->animationEndByIndex(sourceIndex); }
- if (triggerEvent == KPrShapeAnimation::With_Previous) {
- QModelIndex sourceIndex = m_model->mapToSource(m_model->index(row - 1, \
KPrShapeAnimations::Node_Type)); + if (triggerEvent == \
KPrShapeAnimation::WithPrevious) { + QModelIndex sourceIndex = \
m_model->mapToSource(m_model->index(row - 1, KPrShapeAnimations::NodeType)); return \
m_shapeModel->scaleBeginForAnimation(sourceIndex); }
return 0;
diff --git a/stage/part/KPrShapeAnimations.cpp b/stage/part/KPrShapeAnimations.cpp
index 398c135..429a21a 100644
--- a/stage/part/KPrShapeAnimations.cpp
+++ b/stage/part/KPrShapeAnimations.cpp
@@ -98,7 +98,7 @@ QVariant KPrShapeAnimations::data(const QModelIndex &index, int \
role) const switch (index.column()) {
case Group: return groupCount;
case StepCount:
- if (thisAnimation->NodeType() == KPrShapeAnimation::On_Click) {
+ if (thisAnimation->nodeType() == KPrShapeAnimation::OnClick) {
return groupCount;
}
else {
@@ -111,7 +111,7 @@ QVariant KPrShapeAnimations::data(const QModelIndex &index, 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() == KPrShapeAnimation::On_Click)
+ if (thisAnimation->nodeType() == KPrShapeAnimation::OnClick)
return KIcon("onclick").pixmap(KIconLoader::SizeSmall,
KIconLoader::SizeSmall);
- if (thisAnimation->NodeType() == KPrShapeAnimation::After_Previous)
+ if (thisAnimation->nodeType() == KPrShapeAnimation::AfterPrevious)
return KIcon("after_previous").pixmap(KIconLoader::SizeSmall,
KIconLoader::SizeSmall);
- if (thisAnimation->NodeType() == KPrShapeAnimation::With_Previous)
+ if (thisAnimation->nodeType() == KPrShapeAnimation::WithPrevious)
return KIcon("with_previous").pixmap(KIconLoader::SizeSmall,
KIconLoader::SizeSmall);
case Name: return QVariant();
@@ -141,7 +141,7 @@ QVariant KPrShapeAnimations::data(const QModelIndex &index, 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 &index, 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() == KPrShapeAnimation::On_Click)
+ if (thisAnimation->nodeType() == KPrShapeAnimation::OnClick)
return i18n("start on mouse click");
- if (thisAnimation->NodeType() == KPrShapeAnimation::After_Previous)
+ if (thisAnimation->nodeType() == KPrShapeAnimation::AfterPrevious)
return i18n("start after previous animation");
- if (thisAnimation->NodeType() == KPrShapeAnimation::With_Previous)
+ if (thisAnimation->nodeType() == KPrShapeAnimation::WithPrevious)
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 &index, 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(KPrShapeAnimation \
*oldAnimation, KPrShap QModelIndex indexNew = 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() == KPrShapeAnimation::On_Click) ||
- (oldAnimation->NodeType() == KPrShapeAnimation::On_Click)) {
+ if ((newAnimation->nodeType() == KPrShapeAnimation::OnClick) ||
+ (oldAnimation->nodeType() == KPrShapeAnimation::OnClick)) {
notifyOnClickEventChanged();
}
@@ -459,17 +459,17 @@ int KPrShapeAnimations::animationEndByIndex(const QModelIndex \
&index) {
if (index.isValid()) {
KPrShapeAnimation *previousAnimation = animationByRow(index.row());
- KPrShapeAnimation::Node_Type previousNodeType =
- static_cast<KPrShapeAnimation::Node_Type>(data(this->index(index.row(),
- \
KPrShapeAnimations::Node_Type)).toInt());
- if (previousNodeType == KPrShapeAnimation::On_Click) {
+ KPrShapeAnimation::NodeType previousNodeType =
+ static_cast<KPrShapeAnimation::NodeType>(data(this->index(index.row(),
+ \
KPrShapeAnimations::NodeType)).toInt()); + if (previousNodeType == \
KPrShapeAnimation::OnClick) { return previousAnimation->timeRange().second;
}
- if (previousNodeType == KPrShapeAnimation::With_Previous) {
+ if (previousNodeType == KPrShapeAnimation::WithPrevious) {
return previousAnimation->timeRange().second +
scaleBeginForAnimation(this->index(index.row() - 1, \
index.column(), QModelIndex())); }
- else if (previousNodeType == KPrShapeAnimation::After_Previous) {
+ else if (previousNodeType == 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 = animationByRow(index.row());
- KPrShapeAnimation::Node_Type previousNodeType =
- static_cast<KPrShapeAnimation::Node_Type>(data(this->index(index.row(),
- \
KPrShapeAnimations::Node_Type)).toInt());
- if (previousNodeType == KPrShapeAnimation::On_Click) {
+ KPrShapeAnimation::NodeType previousNodeType =
+ static_cast<KPrShapeAnimation::NodeType>(data(this->index(index.row(),
+ \
KPrShapeAnimations::NodeType)).toInt()); + if (previousNodeType == \
KPrShapeAnimation::OnClick) { return previousAnimation->timeRange().first;
}
- if (previousNodeType == KPrShapeAnimation::With_Previous) {
+ if (previousNodeType == KPrShapeAnimation::WithPrevious) {
return scaleBeginForAnimation(this->index(index.row() - 1, \
index.column(), QModelIndex())); }
- else if (previousNodeType == KPrShapeAnimation::After_Previous) {
+ else if (previousNodeType == KPrShapeAnimation::AfterPrevious) {
return animationEndByIndex(this->index(index.row() - 1, index.column(), \
QModelIndex())); }
}
@@ -509,19 +509,19 @@ QModelIndex KPrShapeAnimations::replaceAnimation(const \
QModelIndex &index, KPrSh return index;
}
-bool KPrShapeAnimations::setTriggerEvent(const QModelIndex &index, const \
KPrShapeAnimation::Node_Type type) +bool KPrShapeAnimations::setTriggerEvent(const \
QModelIndex &index, const KPrShapeAnimation::NodeType type) {
KPrShapeAnimation *animation = animationByRow(index.row());
if (animation) {
- KPrShapeAnimation::Node_Type currentType =
- static_cast<KPrShapeAnimation::Node_Type>(data(this->index(index.row(),
- \
KPrShapeAnimations::Node_Type)).toInt());
- if (currentType == KPrShapeAnimation::After_Previous) {
- if (type == KPrShapeAnimation::With_Previous) {
+ KPrShapeAnimation::NodeType currentType =
+ static_cast<KPrShapeAnimation::NodeType>(data(this->index(index.row(),
+ \
KPrShapeAnimations::NodeType)).toInt()); + if (currentType == \
KPrShapeAnimation::AfterPrevious) { + if (type == \
KPrShapeAnimation::WithPrevious) { Q_ASSERT(index.row() > 0);
}
}
- else if (currentType == KPrShapeAnimation::On_Click) {
+ else if (currentType == KPrShapeAnimation::OnClick) {
if (index.row() < 1) {
// Resync trigger event edit widget
emit layoutChanged();
@@ -535,7 +535,7 @@ bool KPrShapeAnimations::setTriggerEvent(const QModelIndex \
&index, const KPrShap return false;
}
-bool KPrShapeAnimations::setNodeType(KPrShapeAnimation *animation, const \
KPrShapeAnimation::Node_Type type) +bool \
KPrShapeAnimations::setNodeType(KPrShapeAnimation *animation, const \
KPrShapeAnimation::NodeType type) {
resyncStepsWithAnimations();
if (animation) {
@@ -547,12 +547,12 @@ bool KPrShapeAnimations::setNodeType(KPrShapeAnimation \
*animation, const KPrShap
QList<KPrAnimationSubStep *>movedSubSteps = QList<KPrAnimationSubStep *>();
KPrAnimationSubStep *newSubStep = 0;
KPrAnimationStep *newStep = 0;
- KPrShapeAnimation::Node_Type currentType =
- static_cast<KPrShapeAnimation::Node_Type>(data(this->index(index.row(),
- \
KPrShapeAnimations::Node_Type)).toInt());
- if (currentType == KPrShapeAnimation::After_Previous) {
+ KPrShapeAnimation::NodeType currentType =
+ static_cast<KPrShapeAnimation::NodeType>(data(this->index(index.row(),
+ \
KPrShapeAnimations::NodeType)).toInt()); + if (currentType == \
KPrShapeAnimation::AfterPrevious) { // After Previous to With Previous
- if (type == KPrShapeAnimation::With_Previous) {
+ if (type == KPrShapeAnimation::WithPrevious) {
//use previous animation to reparent current animation
Q_ASSERT(index.row() > 0);
KPrShapeAnimation * previousAnimation = animationByRow(index.row() - \
1); @@ -561,7 +561,7 @@ bool KPrShapeAnimations::setNodeType(KPrShapeAnimation \
*animation, const KPrShap }
// After Previous to On Click
- else if (type == KPrShapeAnimation::On_Click) {
+ else if (type == KPrShapeAnimation::OnClick) {
// Get index of current substep
int currentSubStepIndex = \
animation->step()->indexOfAnimation(animation->subStep()); int subStepCount = \
animation->step()->animationCount(); @@ -582,9 +582,9 @@ bool \
KPrShapeAnimations::setNodeType(KPrShapeAnimation *animation, const KPrShap return \
false; }
}
- else if (currentType == KPrShapeAnimation::With_Previous) {
+ else if (currentType == KPrShapeAnimation::WithPrevious) {
// With Previous to After Previous
- if (type == KPrShapeAnimation::After_Previous) {
+ if (type == KPrShapeAnimation::AfterPrevious) {
// Get index of current substep
int currentSubStepIndex = \
animation->step()->indexOfAnimation(animation->subStep());
//Create new substep to reparent currrent item and all following \
items. @@ -597,7 +597,7 @@ bool KPrShapeAnimations::setNodeType(KPrShapeAnimation \
*animation, const KPrShap movedChildren = getWithPreviousSiblings(animation);
}
// With Previous to On Click
- else if (type == KPrShapeAnimation::On_Click) {
+ else if (type == KPrShapeAnimation::OnClick) {
// Get index of current substep
int currentSubStepIndex = \
animation->step()->indexOfAnimation(animation->subStep()); int subStepCount = \
animation->step()->animationCount(); @@ -623,14 +623,14 @@ bool \
KPrShapeAnimations::setNodeType(KPrShapeAnimation *animation, const KPrShap return \
false; }
}
- else if (currentType == KPrShapeAnimation::On_Click) {
+ else if (currentType == KPrShapeAnimation::OnClick) {
if (index.row() < 1) {
// Resync trigger event edit widget
emit layoutChanged();
return false;
}
// On click to With Previous
- if (type == KPrShapeAnimation::With_Previous) {
+ if (type == KPrShapeAnimation::WithPrevious) {
// Get previous animation
KPrShapeAnimation *previousAnimation = animationByRow(index.row() - \
1); newStep = previousAnimation->step();
@@ -646,7 +646,7 @@ bool KPrShapeAnimations::setNodeType(KPrShapeAnimation \
*animation, const KPrShap }
// On click to After Previous
- else if (type == KPrShapeAnimation::After_Previous) {
+ else if (type == KPrShapeAnimation::AfterPrevious) {
// Get previous animation
KPrShapeAnimation *previousAnimation = animationByRow(index.row() - \
1); newStep = previousAnimation->step();
@@ -701,7 +701,7 @@ bool KPrShapeAnimations::setNodeType(KPrShapeAnimation \
*animation, const KPrShap removeStep(oldStep);
}
- if ((currentType == KPrShapeAnimation::On_Click) || (type == \
KPrShapeAnimation::On_Click)) { + if ((currentType == \
KPrShapeAnimation::OnClick) || (type == KPrShapeAnimation::OnClick)) { \
notifyOnClickEventChanged(); }
notifyAnimationChanged(animation);
@@ -721,14 +721,14 @@ void KPrShapeAnimations::recalculateStart(const QModelIndex \
&mIndex) }
KPrShapeAnimation *animation = animationByRow(mIndex.row());
- KPrShapeAnimation::Node_Type type =
- static_cast<KPrShapeAnimation::Node_Type>(data(this->index(mIndex.row(),
- \
KPrShapeAnimations::Node_Type)).toInt());
- if (type == KPrShapeAnimation::After_Previous) {
+ KPrShapeAnimation::NodeType type =
+ static_cast<KPrShapeAnimation::NodeType>(data(this->index(mIndex.row(),
+ \
KPrShapeAnimations::NodeType)).toInt()); + if (type == \
KPrShapeAnimation::AfterPrevious) {
setTimeRange(animation, animationEndByIndex(mIndex), \
animation->globalDuration());
- setTriggerEvent(mIndex, KPrShapeAnimation::With_Previous);
+ setTriggerEvent(mIndex, KPrShapeAnimation::WithPrevious);
}
- else if (type == KPrShapeAnimation::With_Previous) {
+ else if (type == KPrShapeAnimation::WithPrevious) {
recalculateStart(index(mIndex.row() - 1, 0));
}
}
@@ -883,14 +883,14 @@ KPrShapeAnimation *KPrShapeAnimations::animationByRow(const int \
row, int &groupC stepChild++;
subStepChild++;
if (stepChild == 0) {
- b->setNodeType(KPrShapeAnimation::On_Click);
+ b->setNodeType(KPrShapeAnimation::OnClick);
groupCount = groupCount + 1;
}
else if (subStepChild == 0) {
- b->setNodeType(KPrShapeAnimation::After_Previous);
+ b->setNodeType(KPrShapeAnimation::AfterPrevious);
}
else {
- b->setNodeType(KPrShapeAnimation::With_Previous);
+ b->setNodeType(KPrShapeAnimation::WithPrevious);
}
if (rowCount == row) {
return b;
@@ -1115,7 +1115,7 @@ QList<KPrAnimationSubStep *> \
KPrShapeAnimations::getSubSteps(int start, int end, return movedSubSteps;
}
-bool KPrShapeAnimations::createTriggerEventEditCmd(KPrShapeAnimation *animation, \
KPrShapeAnimation::Node_Type oldType, KPrShapeAnimation::Node_Type newType) +bool \
KPrShapeAnimations::createTriggerEventEditCmd(KPrShapeAnimation *animation, \
KPrShapeAnimation::NodeType oldType, KPrShapeAnimation::NodeType newType) {
KPrAnimationEditNodeTypeCommand *command =new \
KPrAnimationEditNodeTypeCommand(animation, oldType, newType, this); if (m_document) \
{
diff --git a/stage/part/KPrShapeAnimations.h b/stage/part/KPrShapeAnimations.h
index 8ba8de6..b1bbfe2 100644
--- a/stage/part/KPrShapeAnimations.h
+++ b/stage/part/KPrShapeAnimations.h
@@ -58,7 +58,7 @@ public:
StartTime = 6,
Duration = 7,
AnimationClass = 8,
- Node_Type = 9
+ NodeType = 9
};
explicit KPrShapeAnimations(QObject *parent = 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 minimun limit
@@ -299,7 +299,7 @@ private:
void setTimeRangeIncrementalChange(KPrShapeAnimation *item, const int begin, \
const int duration, TimeUpdated updatedTimes);
QList<KPrShapeAnimation *> getWithPreviousSiblings(KPrShapeAnimation \
*animation);
QList<KPrAnimationSubStep *> getSubSteps(int start, int end, KPrAnimationStep \
*step);
- bool createTriggerEventEditCmd(KPrShapeAnimation *animation, \
KPrShapeAnimation::Node_Type oldType, KPrShapeAnimation::Node_Type newType); + \
bool createTriggerEventEditCmd(KPrShapeAnimation *animation, \
KPrShapeAnimation::NodeType oldType, KPrShapeAnimation::NodeType newType);
QList<KPrAnimationStep *> 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 = 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/animations/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(KPrAnimationStep \
**animationStep, cons shapeAnimation->setPresetClass(KPrShapeAnimation::Emphasis);
}
else if (presetClass == "motion-path") {
- shapeAnimation->setPresetClass(KPrShapeAnimation::Motion_Path);
+ shapeAnimation->setPresetClass(KPrShapeAnimation::MotionPath);
}
else if (presetClass == "ole-action") {
- shapeAnimation->setPresetClass(KPrShapeAnimation::Ole_Action);
+ shapeAnimation->setPresetClass(KPrShapeAnimation::OleAction);
}
else if (presetClass == "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/animations/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 *textBlockData)
: 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 != m_triggerEvent) {
m_triggerEvent = type;
}
}
-void KPrShapeAnimation::setPresetClass(KPrShapeAnimation::Preset_Class presetClass)
+void KPrShapeAnimation::setPresetClass(KPrShapeAnimation::PresetClass presetClass)
{
m_class = presetClass;
}
@@ -236,12 +236,12 @@ void KPrShapeAnimation::setPresetSubType(QString subType)
m_presetSubType = 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() == KPrShapeAnimation::Exit) {
return QString("exit");
}
- else if (presetClass() == KPrShapeAnimation::Motion_Path) {
+ else if (presetClass() == KPrShapeAnimation::MotionPath) {
return QString("motion-path");
}
- else if (presetClass() == KPrShapeAnimation::Ole_Action) {
+ else if (presetClass() == KPrShapeAnimation::OleAction) {
return QString("ole-action");
}
- else if (presetClass() == KPrShapeAnimation::Media_Call) {
+ else if (presetClass() == KPrShapeAnimation::MediaCall) {
return QString("media-call");
}
else {
diff --git a/stage/part/animations/KPrShapeAnimation.h \
b/stage/part/animations/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 \
QParallelAnimationGroup, 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/stage/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 = -1;
-KPrAnimationEditNodeTypeCommand::KPrAnimationEditNodeTypeCommand(KPrShapeAnimation \
*animation, KPrShapeAnimation::Node_Type oldType,
- \
KPrShapeAnimation::Node_Type newType, \
+KPrAnimationEditNodeTypeCommand::KPrAnimationEditNodeTypeCommand(KPrShapeAnimation \
*animation, KPrShapeAnimation::NodeType oldType, + \
KPrShapeAnimation::NodeType newType,
KPrShapeAnimations \
*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, \
KPrShapeAnimation::Node_Type oldType, KPrShapeAnimation::Node_Type newType, \
KPrShapeAnimations *animationModel, KUndo2Command *parent=0); + \
KPrAnimationEditNodeTypeCommand(KPrShapeAnimation *animation, \
KPrShapeAnimation::NodeType oldType, KPrShapeAnimation::NodeType newType, \
KPrShapeAnimations *animationModel, KUndo2Command *parent=0);
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/TestShapeAnimations.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::NodeType)).toInt(), + \
(int)KPrShapeAnimation::OnClick); + QCOMPARE(animations.data(animations.index(1, \
KPrShapeAnimations::NodeType)).toInt(), + \
(int)KPrShapeAnimation::WithPrevious); + \
QCOMPARE(animations.data(animations.index(2, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::WithPrevious); + \
QCOMPARE(animations.data(animations.index(3, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::AfterPrevious); + \
QCOMPARE(animations.data(animations.index(4, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::WithPrevious); + \
QCOMPARE(animations.data(animations.index(5, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::OnClick); + \
QCOMPARE(animations.data(animations.index(6, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::AfterPrevious); + \
QCOMPARE(animations.data(animations.index(7, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::OnClick); + \
QCOMPARE(animations.data(animations.index(8, KPrShapeAnimations::NodeType)).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_Previous);
- 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::AfterPrevious);
+ QCOMPARE(animations.data(animations.index(0, \
KPrShapeAnimations::NodeType)).toInt(), + \
(int)KPrShapeAnimation::OnClick); + QCOMPARE(animations.data(animations.index(1, \
KPrShapeAnimations::NodeType)).toInt(), + \
(int)KPrShapeAnimation::WithPrevious); + \
QCOMPARE(animations.data(animations.index(2, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::WithPrevious); + \
QCOMPARE(animations.data(animations.index(3, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::AfterPrevious); + \
QCOMPARE(animations.data(animations.index(4, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::WithPrevious); + \
QCOMPARE(animations.data(animations.index(5, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::AfterPrevious); + \
QCOMPARE(animations.data(animations.index(6, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::AfterPrevious); + \
QCOMPARE(animations.data(animations.index(7, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::OnClick); + \
QCOMPARE(animations.data(animations.index(8, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::WithPrevious); checkOrder(&animations);
QVERIFY(animations.rowCount() == ANIMATIONS_COUNT);
// To With Previous
- animations.setNodeType(m_animation[7], KPrShapeAnimation::With_Previous);
- 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::NodeType)).toInt(), + \
(int)KPrShapeAnimation::OnClick); + QCOMPARE(animations.data(animations.index(1, \
KPrShapeAnimations::NodeType)).toInt(), + \
(int)KPrShapeAnimation::WithPrevious); + \
QCOMPARE(animations.data(animations.index(2, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::WithPrevious); + \
QCOMPARE(animations.data(animations.index(3, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::AfterPrevious); + \
QCOMPARE(animations.data(animations.index(4, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::WithPrevious); + \
QCOMPARE(animations.data(animations.index(5, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::AfterPrevious); + \
QCOMPARE(animations.data(animations.index(6, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::AfterPrevious); + \
QCOMPARE(animations.data(animations.index(7, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::WithPrevious); + \
QCOMPARE(animations.data(animations.index(8, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::WithPrevious); checkOrder(&animations);
QVERIFY(animations.rowCount() == 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::NodeType)).toInt(), + \
(int)KPrShapeAnimation::OnClick); + QCOMPARE(animations.data(animations.index(1, \
KPrShapeAnimations::NodeType)).toInt(), + \
(int)KPrShapeAnimation::WithPrevious); + \
QCOMPARE(animations.data(animations.index(2, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::WithPrevious); + \
QCOMPARE(animations.data(animations.index(3, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::OnClick); + \
QCOMPARE(animations.data(animations.index(4, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::WithPrevious); + \
QCOMPARE(animations.data(animations.index(5, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::AfterPrevious); + \
QCOMPARE(animations.data(animations.index(6, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::AfterPrevious); + \
QCOMPARE(animations.data(animations.index(7, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::WithPrevious); + \
QCOMPARE(animations.data(animations.index(8, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::WithPrevious); checkOrder(&animations);
QVERIFY(animations.rowCount() == ANIMATIONS_COUNT);
// To With previous
- animations.setNodeType(m_animation[6], KPrShapeAnimation::With_Previous);
- 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::NodeType)).toInt(), + \
(int)KPrShapeAnimation::OnClick); + QCOMPARE(animations.data(animations.index(1, \
KPrShapeAnimations::NodeType)).toInt(), + \
(int)KPrShapeAnimation::WithPrevious); + \
QCOMPARE(animations.data(animations.index(2, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::WithPrevious); + \
QCOMPARE(animations.data(animations.index(3, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::OnClick); + \
QCOMPARE(animations.data(animations.index(4, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::WithPrevious); + \
QCOMPARE(animations.data(animations.index(5, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::AfterPrevious); + \
QCOMPARE(animations.data(animations.index(6, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::WithPrevious); + \
QCOMPARE(animations.data(animations.index(7, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::WithPrevious); + \
QCOMPARE(animations.data(animations.index(8, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::WithPrevious); checkOrder(&animations);
QVERIFY(animations.rowCount() == 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::NodeType)).toInt(), + \
(int)KPrShapeAnimation::OnClick); + QCOMPARE(animations.data(animations.index(1, \
KPrShapeAnimations::NodeType)).toInt(), + \
(int)KPrShapeAnimation::OnClick); + QCOMPARE(animations.data(animations.index(2, \
KPrShapeAnimations::NodeType)).toInt(), + \
(int)KPrShapeAnimation::WithPrevious); + \
QCOMPARE(animations.data(animations.index(3, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::OnClick); + \
QCOMPARE(animations.data(animations.index(4, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::WithPrevious); + \
QCOMPARE(animations.data(animations.index(5, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::AfterPrevious); + \
QCOMPARE(animations.data(animations.index(6, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::WithPrevious); + \
QCOMPARE(animations.data(animations.index(7, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::WithPrevious); + \
QCOMPARE(animations.data(animations.index(8, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::WithPrevious); checkOrder(&animations);
QVERIFY(animations.rowCount() == ANIMATIONS_COUNT);
// To after previous
- animations.setNodeType(m_animation[6], KPrShapeAnimation::After_Previous);
- 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::AfterPrevious);
+ QCOMPARE(animations.data(animations.index(0, \
KPrShapeAnimations::NodeType)).toInt(), + \
(int)KPrShapeAnimation::OnClick); + QCOMPARE(animations.data(animations.index(1, \
KPrShapeAnimations::NodeType)).toInt(), + \
(int)KPrShapeAnimation::OnClick); + QCOMPARE(animations.data(animations.index(2, \
KPrShapeAnimations::NodeType)).toInt(), + \
(int)KPrShapeAnimation::WithPrevious); + \
QCOMPARE(animations.data(animations.index(3, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::OnClick); + \
QCOMPARE(animations.data(animations.index(4, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::WithPrevious); + \
QCOMPARE(animations.data(animations.index(5, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::AfterPrevious); + \
QCOMPARE(animations.data(animations.index(6, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::AfterPrevious); + \
QCOMPARE(animations.data(animations.index(7, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::WithPrevious); + \
QCOMPARE(animations.data(animations.index(8, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::WithPrevious); checkOrder(&animations);
QVERIFY(animations.rowCount() == ANIMATIONS_COUNT);
// From On click
// To After Previous (with childrem)
- animations.setNodeType(m_animation[3], KPrShapeAnimation::After_Previous);
- 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::AfterPrevious);
+ QCOMPARE(animations.data(animations.index(0, \
KPrShapeAnimations::NodeType)).toInt(), + \
(int)KPrShapeAnimation::OnClick); + QCOMPARE(animations.data(animations.index(1, \
KPrShapeAnimations::NodeType)).toInt(), + \
(int)KPrShapeAnimation::OnClick); + QCOMPARE(animations.data(animations.index(2, \
KPrShapeAnimations::NodeType)).toInt(), + \
(int)KPrShapeAnimation::WithPrevious); + \
QCOMPARE(animations.data(animations.index(3, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::AfterPrevious); + \
QCOMPARE(animations.data(animations.index(4, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::WithPrevious); + \
QCOMPARE(animations.data(animations.index(5, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::AfterPrevious); + \
QCOMPARE(animations.data(animations.index(6, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::AfterPrevious); + \
QCOMPARE(animations.data(animations.index(7, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::WithPrevious); + \
QCOMPARE(animations.data(animations.index(8, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::WithPrevious); checkOrder(&animations);
QVERIFY(animations.rowCount() == ANIMATIONS_COUNT);
//From On Click
// To after previous (invald for the first animation)
- animations.setNodeType(m_animation[0], KPrShapeAnimation::After_Previous);
- 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::AfterPrevious);
+ QCOMPARE(animations.data(animations.index(0, \
KPrShapeAnimations::NodeType)).toInt(), + \
(int)KPrShapeAnimation::OnClick); + QCOMPARE(animations.data(animations.index(1, \
KPrShapeAnimations::NodeType)).toInt(), + \
(int)KPrShapeAnimation::OnClick); + QCOMPARE(animations.data(animations.index(2, \
KPrShapeAnimations::NodeType)).toInt(), + \
(int)KPrShapeAnimation::WithPrevious); + \
QCOMPARE(animations.data(animations.index(3, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::AfterPrevious); + \
QCOMPARE(animations.data(animations.index(4, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::WithPrevious); + \
QCOMPARE(animations.data(animations.index(5, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::AfterPrevious); + \
QCOMPARE(animations.data(animations.index(6, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::AfterPrevious); + \
QCOMPARE(animations.data(animations.index(7, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::WithPrevious); + \
QCOMPARE(animations.data(animations.index(8, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::WithPrevious); checkOrder(&animations);
QVERIFY(animations.rowCount() == ANIMATIONS_COUNT);
//To with previous (invalid for the first item)
- animations.setNodeType(m_animation[0], KPrShapeAnimation::With_Previous);
- 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::NodeType)).toInt(), + \
(int)KPrShapeAnimation::OnClick); + QCOMPARE(animations.data(animations.index(1, \
KPrShapeAnimations::NodeType)).toInt(), + \
(int)KPrShapeAnimation::OnClick); + QCOMPARE(animations.data(animations.index(2, \
KPrShapeAnimations::NodeType)).toInt(), + \
(int)KPrShapeAnimation::WithPrevious); + \
QCOMPARE(animations.data(animations.index(3, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::AfterPrevious); + \
QCOMPARE(animations.data(animations.index(4, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::WithPrevious); + \
QCOMPARE(animations.data(animations.index(5, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::AfterPrevious); + \
QCOMPARE(animations.data(animations.index(6, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::AfterPrevious); + \
QCOMPARE(animations.data(animations.index(7, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::WithPrevious); + \
QCOMPARE(animations.data(animations.index(8, KPrShapeAnimations::NodeType)).toInt(), \
+ (int)KPrShapeAnimation::WithPrevious); checkOrder(&animations);
QVERIFY(animations.rowCount() == ANIMATIONS_COUNT);
}
diff --git a/stage/part/tools/animationtool/KPrEditAnimationsWidget.cpp \
b/stage/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() == m_timeLineView->currentIndex().row())) {
- QModelIndex triggerIndex = m_timeLineModel->index(index.row(), \
KPrShapeAnimations::Node_Type); + QModelIndex triggerIndex = \
m_timeLineModel->index(index.row(), KPrShapeAnimations::NodeType);
QModelIndex beginTimeIndex = m_timeLineModel->index(index.row(), \
KPrShapeAnimations::StartTime);
QModelIndex durationIndex = m_timeLineModel->index(index.row(), \
KPrShapeAnimations::Duration);
m_triggerEventList->setCurrentIndex(m_timeLineModel->data(triggerIndex).toInt());
@@ -198,12 +198,12 @@ void KPrEditAnimationsWidget::setTriggerEvent(int row)
{
QModelIndex index = m_timeLineView->currentIndex();
if ((row >= 0) && index.isValid()) {
- QModelIndex triggerIndex = m_timeLineModel->index(index.row(), \
KPrShapeAnimations::Node_Type); + QModelIndex triggerIndex = \
m_timeLineModel->index(index.row(), KPrShapeAnimations::NodeType); if (row != \
m_timeLineModel->data(triggerIndex).toInt()) {
- KPrShapeAnimation::Node_Type newType;
- if (row == 0) newType = KPrShapeAnimation::On_Click;
- else if (row == 1) newType = KPrShapeAnimation::After_Previous;
- else newType = KPrShapeAnimation::With_Previous;
+ KPrShapeAnimation::NodeType newType;
+ if (row == 0) newType = KPrShapeAnimation::OnClick;
+ else if (row == 1) newType = KPrShapeAnimation::AfterPrevious;
+ else newType = KPrShapeAnimation::WithPrevious;
m_docker->mainModel()->setTriggerEvent(m_timeLineModel->mapToSource(m_timeLineView->currentIndex()), \
newType); }
}
@@ -231,30 +231,30 @@ void \
KPrEditAnimationsWidget::showTimeLineCustomContextMenu(const QPoint &pos) if \
(!index.isValid()) { return;
}
- QModelIndex triggerIndex = m_timeLineModel->index(index.row(), \
KPrShapeAnimations::Node_Type);
- KPrShapeAnimation::Node_Type currentType = static_cast \
<KPrShapeAnimation::Node_Type>(m_timeLineModel->data(triggerIndex).toInt()); + \
QModelIndex triggerIndex = m_timeLineModel->index(index.row(), \
KPrShapeAnimations::NodeType); + KPrShapeAnimation::NodeType currentType = \
static_cast <KPrShapeAnimation::NodeType>(m_timeLineModel->data(triggerIndex).toInt());
QActionGroup *actionGroup = new QActionGroup(m_timeLineView);
actionGroup->setExclusive(true);
KAction *onClickAction = new KAction(KIcon("onclick"), i18n("start on mouse \
click"), m_timeLineView); onClickAction->setCheckable(true);
- onClickAction->setData(KPrShapeAnimation::On_Click);
+ onClickAction->setData(KPrShapeAnimation::OnClick);
KAction *afterAction = 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 = 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 == KPrShapeAnimation::On_Click) {
+ if (currentType == KPrShapeAnimation::OnClick) {
onClickAction->setChecked(true);
}
- else if (currentType == KPrShapeAnimation::After_Previous) {
+ else if (currentType == KPrShapeAnimation::AfterPrevious) {
afterAction->setChecked(true);
}
else {
diff --git a/stage/part/tools/animationtool/KPrPredefinedAnimationsLoader.cpp \
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::loadDefaultAnimations()
temp.name = animationName(animId);
temp.toolTip = temp.name;
temp.animationContext = m_animationContext.value(row);
- if (animation->presetClass() == KPrShapeAnimation::Motion_Path) {
+ if (animation->presetClass() == KPrShapeAnimation::MotionPath) {
temp.icon = loadMotionPathIcon(temp.animationContext);
}
else {
@@ -157,13 +157,13 @@ void KPrPredefinedAnimationsLoader::loadDefaultAnimations()
else if (animation->presetClass() == KPrShapeAnimation::Custom) {
customList.append(temp);
}
- else if (animation->presetClass() == KPrShapeAnimation::Motion_Path) {
+ else if (animation->presetClass() == KPrShapeAnimation::MotionPath) {
motion_PathList.append(temp);
}
- else if (animation->presetClass() == KPrShapeAnimation::Ole_Action) {
+ else if (animation->presetClass() == KPrShapeAnimation::OleAction) {
ole_ActionList.append(temp);
}
- else if (animation->presetClass() == KPrShapeAnimation::Media_Call) {
+ else if (animation->presetClass() == KPrShapeAnimation::MediaCall) {
media_CallList.append(temp);
}
}
@@ -363,7 +363,7 @@ KPrShapeAnimation \
*KPrPredefinedAnimationsLoader::loadOdfShapeAnimation(const Ko }
if (shapeAnimation) {
- shapeAnimation->setNodeType(KPrShapeAnimation::On_Click);
+ shapeAnimation->setNodeType(KPrShapeAnimation::OnClick);
if (presetClass == "custom") {
shapeAnimation->setPresetClass(KPrShapeAnimation::Custom);
}
@@ -377,13 +377,13 @@ KPrShapeAnimation \
*KPrPredefinedAnimationsLoader::loadOdfShapeAnimation(const Ko \
shapeAnimation->setPresetClass(KPrShapeAnimation::Emphasis); }
else if (presetClass == "motion-path") {
- shapeAnimation->setPresetClass(KPrShapeAnimation::Motion_Path);
+ shapeAnimation->setPresetClass(KPrShapeAnimation::MotionPath);
}
else if (presetClass == "ole-action") {
- shapeAnimation->setPresetClass(KPrShapeAnimation::Ole_Action);
+ shapeAnimation->setPresetClass(KPrShapeAnimation::OleAction);
}
else if (presetClass == "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/stage/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::showAnimationsCustomContextMenu(const QPoint &pos) \
actionGroup->setExclusive(true);
KAction *onClickAction = new KAction(KIcon("onclick"), i18n("start on mouse \
click"), m_animationsView); onClickAction->setCheckable(true);
- onClickAction->setData(KPrShapeAnimation::On_Click);
+ onClickAction->setData(KPrShapeAnimation::OnClick);
KAction *afterAction = 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 = 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() == KPrShapeAnimation::On_Click) {
+ if (currentAnimation->nodeType() == KPrShapeAnimation::OnClick) {
onClickAction->setChecked(true);
}
- else if (currentAnimation->NodeType() == KPrShapeAnimation::After_Previous) \
{ + else if (currentAnimation->nodeType() == KPrShapeAnimation::AfterPrevious) \
{ afterAction->setChecked(true);
}
else {
@@ -548,12 +548,12 @@ void KPrShapeAnimationDocker::setTriggerEvent(QAction *action)
int row = action->data().toInt();
QModelIndex triggerIndex = \
m_animationsModel->index(m_animationsView->currentIndex().row(),
- \
KPrShapeAnimations::Node_Type); + \
KPrShapeAnimations::NodeType); if (row != \
m_animationsModel->data(triggerIndex).toInt()) {
- KPrShapeAnimation::Node_Type newType;
- if (row == 0) newType = KPrShapeAnimation::On_Click;
- else if (row == 1) newType = KPrShapeAnimation::After_Previous;
- else newType = KPrShapeAnimation::With_Previous;
+ KPrShapeAnimation::NodeType newType;
+ if (row == 0) newType = KPrShapeAnimation::OnClick;
+ else if (row == 1) newType = KPrShapeAnimation::AfterPrevious;
+ else newType = KPrShapeAnimation::WithPrevious;
m_animationsModel->setTriggerEvent(m_animationsView->currentIndex(), \
newType); }
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic