[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: kpresenter patch
From: Thorsten Zachmann <t.zachmann () zagge ! de>
Date: 2004-03-21 18:09:36
Message-ID: 200403211909.36480.t.zachmann () zagge ! de
[Download RAW message or body]
Hello all,
here is the next patch for the presentation handling. This patch does:
-animate effects on effect step 0. (at the moment the effects are not working)
-when going back, go allways to the last sub step of a effect step (so the
paragraphs can no longer appear again, when they are allready shown, as they
do at the moment).
I think this new behaviour is more what the user is expecting. What do you
think?
Have a nice day
Thorsten
["patch75" (text/x-diff)]
Index: kprcanvas.cc
===================================================================
RCS file: /home/kde/koffice/kpresenter/kprcanvas.cc,v
retrieving revision 1.392
diff -u -3 -p -r1.392 kprcanvas.cc
--- kprcanvas.cc 19 Mar 2004 06:57:52 -0000 1.392
+++ kprcanvas.cc 21 Mar 2004 18:09:29 -0000
@@ -409,7 +409,7 @@ void KPrCanvas::drawObjectsPres( QPainte
|| it.current()->getDisappear()
&& it.current()->getDisappearStep() > step.m_step ) )
{
- if ( step.m_animate && it.current()->getAppearStep() == step.m_step )
+ if ( step.m_animate && it.current()->getAppearStep() == step.m_step && \
it.current()->getEffect() != EF_NONE ) continue;
if ( step.m_animateSub && it.current()->getAppearStep() == step.m_step )
@@ -2098,12 +2098,10 @@ void KPrCanvas::keyPressEvent( QKeyEvent
m_view->autoScreenPresStopTimer();
slotGotoPage(); break;
case Key_Home: // go to first page
- if ( m_presentationSlidesIterator != m_presentationSlides.begin() ) {
- gotoPage( *m_presentationSlides.begin() );
- if ( !spManualSwitch() ) {
- m_view->setCurrentTimer( 1 );
- setNextPageTimer( true );
- }
+ gotoPage( *m_presentationSlides.begin() );
+ if ( !spManualSwitch() ) {
+ m_view->setCurrentTimer( 1 );
+ setNextPageTimer( true );
}
break;
case Key_End: // go to last page
@@ -3255,6 +3253,7 @@ bool KPrCanvas::pNext( bool )
if ( !spManualSwitch() )
m_view->autoScreenPresReStartTimer();
+ doObjEffects();
return true;
}
@@ -3305,13 +3304,17 @@ bool KPrCanvas::pPrev( bool /*manual*/ )
if ( m_step.m_step > *m_pageEffectSteps.begin() ) {
QValueList<int>::ConstIterator it = m_pageEffectSteps.find( m_step.m_step );
m_step.m_step = *( --it );
+ //hopefully there are never more thean 1000 sub steps :-)
+ m_step.m_subStep = 1000;
repaint( false );
return false;
} else {
+ // when we go back on the first slide, thats like starting the presentation \
again
if ( m_presentationSlidesIterator == m_presentationSlides.begin() ) {
m_pageEffectSteps = m_view->kPresenterDoc()->getPageEffectSteps( \
m_step.m_pageNumber ); m_step.m_step = *m_pageEffectSteps.begin();
- repaint( false );
+ goingBack = false;
+ doObjEffects();
return false;
}
m_step.m_pageNumber = *( --m_presentationSlidesIterator ) - 1;
@@ -3476,7 +3479,7 @@ void KPrCanvas::drawCurrentPageInPix( QP
p.begin( &_pix );
drawBackground( &p, _pix.rect(), m_view->kPresenterDoc()->pageList().at( \
m_step.m_pageNumber ) );
- PresStep step( m_step.m_pageNumber, m_step.m_step, m_step.m_subStep, false, true \
); + PresStep step( m_step.m_pageNumber, m_step.m_step, m_step.m_subStep, true, \
true ); drawPresPage( &p, _pix.rect(), step );
p.end();
@@ -4942,7 +4945,7 @@ void KPrCanvas::slotGotoPage()
void KPrCanvas::gotoPage( int pg )
{
int page = pg - 1;
- if ( page != m_step.m_pageNumber ) {
+ if ( page != m_step.m_pageNumber || m_step.m_step != *m_pageEffectSteps.begin() \
|| m_step.m_subStep != 0 ) { m_step.m_pageNumber = page;
kdDebug(33001) << "Page::gotoPage m_step.m_pageNumber =" << \
m_step.m_pageNumber << endl;
m_presentationSlidesIterator = m_presentationSlides.find( \
m_step.m_pageNumber + 1 ); @@ -4962,7 +4965,7 @@ void KPrCanvas::gotoPage( int pg )
#else
resize( QApplication::desktop()->screenGeometry(this).size());
#endif
- repaint( false );
+ doObjEffects();
setFocus();
m_view->refreshPageButton();
}
_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic