[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    RFC: kpresenter effects
From:       Thorsten Zachmann <t.zachmann () zagge ! de>
Date:       2004-06-21 6:51:44
Message-ID: 200406210851.44743.t.zachmann () zagge ! de
[Download RAW message or body]

Hello all,

during my works on the object and page effects I found out that Laurent 
removed the option for the automatic screen presentation speed, and made it 
possible to have a different speed for each page effect. 
However the different speed for each slide is not jet saved in the native 
kpresenter format. The attached patch solves this. It checks if the tag 
PRESSPEED is set, if set it sets the speed in all the page effects, if not 
set the seed in the pages is used, otherwise it is overwritten by the speed 
in the tag. 

Is it ok to commit this patch?

I had a closer look and found out that the object effetcs are now using the 
speed of the page effect what I think is not very good. Here is what I 
propose:

1. Add a speed property to each effect.
2. Should we also use the speed Slow, Medium and Fast as OO does for object 
effects as Laurent has introduced for page effects? It would make the hole 
more consistend. 
3. I also would like to add a global speed option to slow, speed up all 
effects ( page / object ). This would be valid not only for automatic 
presentation but also for manual one.

Please let me know what you are thinking, so I can start working on this task.

Have a nice day

Thorsten

["effect.diff" (text/x-diff)]

Index: kpbackground.cc
===================================================================
RCS file: /home/kde/koffice/kpresenter/kpbackground.cc,v
retrieving revision 1.126
diff -u -3 -p -r1.126 kpbackground.cc
--- kpbackground.cc	14 Jun 2004 19:33:43 -0000	1.126
+++ kpbackground.cc	21 Jun 2004 06:50:37 -0000
@@ -185,6 +185,7 @@ QDomElement KPBackGround::save( QDomDocu
     if (pageEffect!=PEF_NONE) {
         element=doc.createElement("PGEFFECT");
         element.setAttribute("value", static_cast<int>( pageEffect ));
+        element.setAttribute("speed", static_cast<int>( m_presSpeed ));
         page.appendChild(element);
     }
 
@@ -816,6 +817,9 @@ void KPBackGround::load( const QDomEleme
         if(e.hasAttribute("value"))
             tmp=e.attribute("value").toInt();
         setPageEffect(static_cast<PageEffect>(tmp));
+        if(e.hasAttribute("speed"))
+            tmp=e.attribute("speed").toInt();
+        setPresSpeed(static_cast<PresSpeed>(tmp));
     }
     e=element.namedItem("BGRADIENT").toElement();
     if(!e.isNull()) {
Index: kpresenter_doc.cc
===================================================================
RCS file: /home/kde/koffice/kpresenter/kpresenter_doc.cc,v
retrieving revision 1.794
diff -u -3 -p -r1.794 kpresenter_doc.cc
--- kpresenter_doc.cc	14 Jun 2004 18:22:02 -0000	1.794
+++ kpresenter_doc.cc	21 Jun 2004 06:50:37 -0000
@@ -716,7 +716,7 @@ void KPresenterDoc::saveEmbeddedObject(K
 
 void KPresenterDoc::compatibilityPresSpeed()
 {
-    if ( m_loadingInfo )
+    if ( m_loadingInfo && m_loadingInfo->presSpeed != - 1 )
     {
         int newValue = 5;
         if ( m_loadingInfo->presSpeed < 3 )
Index: kprloadinginfo.h
===================================================================
RCS file: /home/kde/koffice/kpresenter/kprloadinginfo.h,v
retrieving revision 1.6
diff -u -3 -p -r1.6 kprloadinginfo.h
--- kprloadinginfo.h	25 May 2004 16:57:45 -0000	1.6
+++ kprloadinginfo.h	21 Jun 2004 06:50:37 -0000
@@ -24,7 +24,7 @@
 class KPRLoadingInfo
 {
 public:
-    KPRLoadingInfo() { presSpeed = 5; }
+    KPRLoadingInfo() { presSpeed = -1; }
     ~KPRLoadingInfo() {}
 
     QDomElement* animationShowById( const QString& id ) const {


_______________________________________________
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