[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/kpresenter/part
From: Thorsten Zachmann <t.zachmann () zagge ! de>
Date: 2010-10-28 7:43:33
Message-ID: 20101028074333.236E3AC899 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1190585 by zachmann:
Set the correct painting strategy when KoPACanvasItem is used.
This fixes the problem that placeholders are shown when KoPACanvasItem is used.
M +3 -3 KPrAnimationDirector.cpp
M +4 -0 KPrDocument.cpp
M +5 -4 KPrPageSelectStrategyActive.cpp
M +5 -3 KPrPageSelectStrategyActive.h
M +1 -1 KPrView.cpp
--- trunk/koffice/kpresenter/part/KPrAnimationDirector.cpp #1190584:1190585
@@ -80,9 +80,9 @@
m_timeLine.setUpdateInterval( 20 );
// set the animation strategy in the KoShapeManagers
m_canvas->shapeManager()->setPaintingStrategy( new \
KPrShapeManagerAnimationStrategy( m_canvas->shapeManager(), \
m_animationCache,
- new \
KPrPageSelectStrategyActive( m_view ) ) ); + \
new KPrPageSelectStrategyActive( m_view->kopaCanvas() ) ) );
m_canvas->masterShapeManager()->setPaintingStrategy( new \
KPrShapeManagerAnimationStrategy( m_canvas->masterShapeManager(), \
m_animationCache,
- new \
KPrPageSelectStrategyActive( m_view ) ) ); + \
new KPrPageSelectStrategyActive( m_view->kopaCanvas() ) ) );
if ( hasAnimation() ) {
startTimeLine( m_animations.at(m_stepIndex)->totalDuration() );
@@ -97,7 +97,7 @@
//set the KoShapeManagerPaintingStrategy in the KoShapeManagers
m_canvas->shapeManager()->setPaintingStrategy( new \
KoShapeManagerPaintingStrategy( m_canvas->shapeManager() ) );
m_canvas->masterShapeManager()->setPaintingStrategy( new \
KPrShapeManagerDisplayMasterStrategy( m_canvas->masterShapeManager(),
- new \
KPrPageSelectStrategyActive( m_view ) ) ); + \
new KPrPageSelectStrategyActive( m_view->kopaCanvas() ) ) ); }
--- trunk/koffice/kpresenter/part/KPrDocument.cpp #1190584:1190585
@@ -31,6 +31,8 @@
#include "KPrPlaceholderShapeFactory.h"
#include "KPrSoundCollection.h"
#include "KPrDeclarations.h"
+#include "KPrShapeManagerDisplayMasterStrategy.h"
+#include "KPrPageSelectStrategyActive.h"
#include "pagelayout/KPrPageLayouts.h"
#include "tools/KPrPlaceholderToolFactory.h"
#include "commands/KPrSetCustomSlideShowsCommand.h"
@@ -115,6 +117,8 @@
QGraphicsItem *KPrDocument::createCanvasItem()
{
KoPACanvasItem *canvasItem = new KoPACanvasItem(this);
+ canvasItem->masterShapeManager()->setPaintingStrategy(new \
KPrShapeManagerDisplayMasterStrategy(canvasItem->masterShapeManager(), + new \
KPrPageSelectStrategyActive(canvasItem))); return canvasItem;
}
--- trunk/koffice/kpresenter/part/KPrPageSelectStrategyActive.cpp #1190584:1190585
@@ -19,10 +19,9 @@
#include "KPrPageSelectStrategyActive.h"
-#include <KoPAView.h>
-KPrPageSelectStrategyActive::KPrPageSelectStrategyActive(KoPAView *view)
-: m_view(view)
+KPrPageSelectStrategyActive::KPrPageSelectStrategyActive(KoPACanvasBase *canvas)
+: m_canvas(canvas)
{
}
@@ -32,5 +31,7 @@
const KoPAPageBase *KPrPageSelectStrategyActive::page() const
{
- return m_view->activePage();
+ KoPAViewBase *view = m_canvas->koPAView();
+ Q_ASSERT(view);
+ return view->activePage();
}
--- trunk/koffice/kpresenter/part/KPrPageSelectStrategyActive.h #1190584:1190585
@@ -21,8 +21,10 @@
#define KPRPAGESELECTSTRATEGYACTIVE_H
#include "KPrPageSelectStrategyBase.h"
+#include <KoPACanvasBase.h>
+#include <KoPAView.h>
-class KoPAView;
+class KoPACanvasBase;
/**
* Get the active page for the view
@@ -30,13 +32,13 @@
class KPrPageSelectStrategyActive : public KPrPageSelectStrategyBase
{
public:
- KPrPageSelectStrategyActive(KoPAView *view);
+ KPrPageSelectStrategyActive(KoPACanvasBase *canvas);
~KPrPageSelectStrategyActive();
virtual const KoPAPageBase *page() const;
private:
- KoPAView *m_view;
+ KoPACanvasBase *m_canvas;
};
#endif /* KPRPAGESELECTSTRATEGYACTIVE_H */
--- trunk/koffice/kpresenter/part/KPrView.cpp #1190584:1190585
@@ -92,7 +92,7 @@
actionCollection()->action("configure")->setText(i18n("Configure \
KPresenter..."));
masterShapeManager()->setPaintingStrategy( new \
KPrShapeManagerDisplayMasterStrategy( masterShapeManager(),
- new KPrPageSelectStrategyActive( \
this ) ) ); + new \
KPrPageSelectStrategyActive( kopaCanvas() ) ) );
KoPACanvas * canvas = dynamic_cast<KoPACanvas*>(kopaCanvas());
if (canvas) {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic