114
117
QVariant value(KoTextBlockData *textBlockData, const QString &id, const QVariant &defaultValue);
119
// 1. Init cache with values that take effect even before the animation is started
120
// This information should be kept in the first stack entry
121
// I think this is only needed for visibility as the other take only effect in the presentation step
122
// 2. For the animation on 1. step
123
// copy falues from previous step that are still there.
124
// update values with the values from the animations of that current step
125
// when all is finished start with the next step
126
// do the same for each time the effect is triggert until all effects in this step are finished.
127
// go on with step 2 until there are no more steps left
130
// copy over all what is at the end of the last step
132
// if we go backward in a presentation we need to setup all steps
133
// if we go forward we can do it while we are at it but maybe it would be better to initilialize also
134
// everything right away.
136
// initialize step with values that will be there at the end of the step
137
// step 0 is the value the object has before any animation is started
138
// step n is the value of the object after the animation, only needed when there is a change to the real value of the object
139
// e.g. the object has been moved to its original position, one the animation is done the value is removed
140
void init(int step, KoShape *shape, KoTextBlockData * textBlockData, const QString &id, const QVariant &value);
142
// update step value by values
143
// will do different things depending on type of QVariant
144
// e.g. for QTransform it will add the value to the matrix
145
// the default action when there is no special handling is to copy the value over
146
// if QVariant is emty it will remove the id from the step
147
// the step in update must match the step of startStep
148
// this will update the values used for the animation.
149
// maybe have an internal method to also use it for updating the stack while init
150
void update(KoShape *shape, KoTextBlockData * textBlockData, const QString &id, const QVariant &value);
152
// trigger copying of data from the last step to the current one
153
// these values will be updated by update.
154
// the step in update must match the step of startStep
155
void startStep(int step);
156
void endStep(int step);
158
QVariant value(int step, KoShape *shape, const QString &id, const QVariant &defaultValue);
159
QVariant value(int step, KoShape *shape, const QString &id);
161
virtual bool hasValue(int step, KoShape *shape, const QString &id);
163
// ending and animation will just activate the values of the step
164
QSizeF pageSize() const;
165
void setPageSize(const QSizeF size);
167
void setZoom(const qreal zoom);
117
QMap<KoShape *, QMap<QString, QVariant> > m_shapeValues;
118
QMap<KoTextBlockData *, QMap<QString, QVariant> > m_textBlockDataValues;
170
QList<QMap<KoShape *, QMap<QString, QVariant> > > m_shapeValuesStack;
171
QList<QMap<KoTextBlockData *, QMap<QString, QVariant> > > m_textBlockDataValuesStack;
172
QMap<KoShape *, QMap<QString, QVariant> > m_currentShapeValues;
173
QMap<KoTextBlockData *, QMap<QString, QVariant> > m_currentTextBlockDataValues;