[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/kpresenter
From: Marijn Kruisselbrink <m.kruisselbrink () student ! tue ! nl>
Date: 2008-02-26 3:12:12
Message-ID: 1203995532.998716.26142.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 779410 by mkruisselbrink:
add horizontal parallel snakes wipe
M +21 -1 part/dockers/KPrPageEffectDocker.cpp
M +21 -1 part/pageeffects/KPrPageEffect.h
M +3 -0 plugins/pageeffects/matrixwipe/CMakeLists.txt
M +20 -13 plugins/pageeffects/matrixwipe/KPrMatrixWipeStrategy.cpp
M +3 -0 plugins/pageeffects/matrixwipe/KPrMatrixWipeStrategy.h
M +2 -0 plugins/pageeffects/matrixwipe/Plugin.cpp
A plugins/pageeffects/matrixwipe/parallelsnakes (directory)
A plugins/pageeffects/matrixwipe/parallelsnakes/KPrParallelSnakesWipeEffectFactory.cpp \
[License: LGPL (v2+)] A \
plugins/pageeffects/matrixwipe/parallelsnakes/KPrParallelSnakesWipeEffectFactory.h \
[License: LGPL (v2+)] A \
plugins/pageeffects/matrixwipe/parallelsnakes/KPrParallelSnakesWipeHorizontalStrategy.cpp \
[License: LGPL (v2+)] A \
plugins/pageeffects/matrixwipe/parallelsnakes/KPrParallelSnakesWipeHorizontalStrategy.h \
plugins/pageeffects/matrixwipe/KPrMatrixWipeStrategy.h#779371 [License: LGPL (v2+)]
--- trunk/koffice/kpresenter/part/dockers/KPrPageEffectDocker.cpp #779409:779410
@@ -121,7 +121,27 @@
I18N_NOOP( "Counterclockwise Bottom Left In" ),
I18N_NOOP( "Counterclockwise Bottom Left Out" ),
I18N_NOOP( "Counterclockwise Bottom Right In" ),
- I18N_NOOP( "Counterclockwise Bottom Right Out" )
+ I18N_NOOP( "Counterclockwise Bottom Right Out" ),
+ I18N_NOOP( "Vertical Top Same In" ),
+ I18N_NOOP( "Vertical Top Same Out" ),
+ I18N_NOOP( "Vertical Bottom Same In" ),
+ I18N_NOOP( "Vertical Bottom Same Out" ),
+ I18N_NOOP( "Vertical Top Left Opposite In" ),
+ I18N_NOOP( "Vertical Top Left Opposite Out" ),
+ I18N_NOOP( "Vertical Bottom Left Opposite In" ),
+ I18N_NOOP( "Vertical Bottom Left Opposite Out" ),
+ I18N_NOOP( "Horizontal Left Same In" ),
+ I18N_NOOP( "Horizontal Left Same Out" ),
+ I18N_NOOP( "Horizontal Right Same In" ),
+ I18N_NOOP( "Horizontal Right Same Out" ),
+ I18N_NOOP( "Horizontal Top Left Opposite In" ),
+ I18N_NOOP( "Horizontal Top Left Opposite Out" ),
+ I18N_NOOP( "Horizontal Top Right Opposite In" ),
+ I18N_NOOP( "Horizontal Top Right Opposite Out" ),
+ I18N_NOOP( "Diagonal Bottom Left Opposite In" ),
+ I18N_NOOP( "Diagonal Bottom Left Opposite Out" ),
+ I18N_NOOP( "Diagonal Top Left Opposite in" ),
+ I18N_NOOP( "Diagonal Top Left Opposite Out" )
};
KPrPageEffectDocker::KPrPageEffectDocker( QWidget* parent, Qt::WindowFlags flags )
--- trunk/koffice/kpresenter/part/pageeffects/KPrPageEffect.h #779409:779410
@@ -126,7 +126,27 @@
CounterClockwiseBottomLeftIn,
CounterClockwiseBottomLeftOut,
CounterClockwiseBottomRightIn,
- CounterClockwiseBottomRightOut
+ CounterClockwiseBottomRightOut,
+ VerticalTopSameIn,
+ VerticalTopSameOut,
+ VerticalBottomSameIn,
+ VerticalBottomSameOut,
+ VerticalTopLeftOppositeIn,
+ VerticalTopLeftOppositeOut,
+ VerticalBottomLeftOppositeIn,
+ VerticalBottomLeftOppositeOut,
+ HorizontalLeftSameIn,
+ HorizontalLeftSameOut,
+ HorizontalRightSameIn,
+ HorizontalRightSameOut,
+ HorizontalTopLeftOppositeIn,
+ HorizontalTopLeftOppositeOut,
+ HorizontalTopRightOppositeIn,
+ HorizontalTopRightOppositeOut,
+ DiagonalBottomLeftOppositeIn,
+ DiagonalBottomLeftOppositeOut,
+ DiagonalTopLeftOppositeIn,
+ DiagonalTopLeftOppositeOut
};
/**
--- trunk/koffice/kpresenter/plugins/pageeffects/matrixwipe/CMakeLists.txt \
#779409:779410 @@ -18,6 +18,9 @@
spiralwipe/KPrSpiralWipeEffectFactory.cpp
spiralwipe/KPrSpiralWipeStrategy.cpp
+ parallelsnakes/KPrParallelSnakesWipeEffectFactory.cpp
+ parallelsnakes/KPrParallelSnakesWipeHorizontalStrategy.cpp
+
waterfallwipe/KPrWaterfallWipeEffectFactory.cpp
waterfallwipe/KPrWaterfallWipeTopLeftStrategy.cpp
waterfallwipe/KPrWaterfallWipeTopRightStrategy.cpp
--- trunk/koffice/kpresenter/plugins/pageeffects/matrixwipe/KPrMatrixWipeStrategy.cpp \
#779409:779410 @@ -28,7 +28,8 @@
static const int framesPerSquare = 16;
KPrMatrixWipeStrategy::KPrMatrixWipeStrategy(KPrPageEffect::SubType subType, const \
char * smilType, const char *smilSubType, bool reverse, bool smooth)
- : KPrPageEffectStrategy( subType, smilType, smilSubType, reverse ), \
m_smooth(smooth) + : KPrPageEffectStrategy( subType, smilType, smilSubType, \
reverse ), m_smooth(smooth), + m_squaresPerRow(squaresPerRow), \
m_squaresPerCol(squaresPerCol) {
}
@@ -36,9 +37,15 @@
{
}
+void KPrMatrixWipeStrategy::setNeedEvenSquares()
+{
+ m_squaresPerRow++;
+ m_squaresPerCol++;
+}
+
void KPrMatrixWipeStrategy::setup( const KPrPageEffect::Data &data, QTimeLine \
&timeLine ) {
- timeLine.setFrameRange( 0, (m_smooth ? framesPerSquare : 1) * \
maxIndex(squaresPerRow, squaresPerCol) ); + timeLine.setFrameRange( 0, (m_smooth ? \
framesPerSquare : 1) * maxIndex(m_squaresPerRow, m_squaresPerCol) ); }
static inline int floor(double d) { return (int) (d + 1e-5); }
@@ -66,16 +73,16 @@
int curSquare = currPos / (m_smooth ? framesPerSquare : 1);
- for (int i = 0; i < squaresPerRow; ++i) {
- for (int j = 0; j < squaresPerCol; ++j) {
- QRect rect(floor(qreal(width) / squaresPerRow * i), floor(qreal(height) \
/ squaresPerCol * j),
- ceil(qreal(width) / squaresPerRow), ceil(qreal(height) / \
squaresPerCol));
- int square = squareIndex(i, j, squaresPerRow, squaresPerCol);
+ for (int i = 0; i < m_squaresPerRow; ++i) {
+ for (int j = 0; j < m_squaresPerCol; ++j) {
+ QRect rect(floor(qreal(width) / m_squaresPerRow * i), \
floor(qreal(height) / m_squaresPerCol * j), + ceil(qreal(width) / \
m_squaresPerRow), ceil(qreal(height) / m_squaresPerCol)); + int square = \
squareIndex(i, j, m_squaresPerRow, m_squaresPerCol); if (square <= curSquare) {
if (square == curSquare && m_smooth) {
int squarePos = currPos % framesPerSquare;
p.drawPixmap( rect.topLeft(), data.m_oldPage, rect );
- rect = tileRect(squareDirection(i, j, squaresPerRow, \
squaresPerCol), squarePos, rect); + rect = \
tileRect(squareDirection(i, j, m_squaresPerRow, m_squaresPerCol), squarePos, rect); \
if (rect.width() > 0 && rect.height() > 0) {
p.drawPixmap( rect.topLeft(), data.m_newPage, rect );
}
@@ -100,11 +107,11 @@
int curSquare = currPos / (m_smooth ? framesPerSquare : 1);
int lastSquare = lastPos / (m_smooth ? framesPerSquare : 1);
- for (int i = 0; i < squaresPerRow; ++i) {
- for (int j = 0; j < squaresPerCol; ++j) {
- QRect rect(floor(qreal(width) / squaresPerRow * i), floor(qreal(height) \
/ squaresPerCol * j),
- ceil(qreal(width) / squaresPerRow), ceil(qreal(height) / \
squaresPerCol));
- int square = squareIndex(i, j, squaresPerRow, squaresPerCol);
+ for (int i = 0; i < m_squaresPerRow; ++i) {
+ for (int j = 0; j < m_squaresPerCol; ++j) {
+ QRect rect(floor(qreal(width) / m_squaresPerRow * i), \
floor(qreal(height) / m_squaresPerCol * j), + ceil(qreal(width) / \
m_squaresPerRow), ceil(qreal(height) / m_squaresPerCol)); + int square = \
squareIndex(i, j, m_squaresPerRow, m_squaresPerCol); if (square <= curSquare && \
square >= lastSquare) { data.m_widget->update(rect);
}
--- trunk/koffice/kpresenter/plugins/pageeffects/matrixwipe/KPrMatrixWipeStrategy.h \
#779409:779410 @@ -44,7 +44,10 @@
virtual int squareIndex(int x, int y, int collumns, int rows) = 0;
virtual Direction squareDirection(int x, int y, int collumns, int rows);
virtual int maxIndex(int collumns, int rows) = 0;
+ void setNeedEvenSquares();
bool m_smooth;
+private:
+ int m_squaresPerRow, m_squaresPerCol;
};
#endif // KPRMATRIXWIPESTRATEGY_H
--- trunk/koffice/kpresenter/plugins/pageeffects/matrixwipe/Plugin.cpp #779409:779410
@@ -23,6 +23,7 @@
#include "snakewipe/KPrSnakeWipeEffectFactory.h"
#include "spiralwipe/KPrSpiralWipeEffectFactory.h"
+#include "parallelsnakes/KPrParallelSnakesWipeEffectFactory.h"
#include "waterfallwipe/KPrWaterfallWipeEffectFactory.h"
K_EXPORT_COMPONENT_FACTORY( kpr_pageeffect_matrixwipe, KGenericFactory<Plugin>( \
"KPrPageEffect" ) ) @@ -32,6 +33,7 @@
{
KPrPageEffectRegistry::instance()->add(new KPrSnakeWipeEffectFactory());
KPrPageEffectRegistry::instance()->add(new KPrSpiralWipeEffectFactory());
+ KPrPageEffectRegistry::instance()->add(new \
KPrParallelSnakesWipeEffectFactory());
KPrPageEffectRegistry::instance()->add(new KPrWaterfallWipeEffectFactory());
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic