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

List:       kde-commits
Subject:    [calligra/stage-singlecanvas-aakriti]
From:       Aakriti Gupta <aakriti.a.gupta () gmail ! com>
Date:       2011-07-31 20:39:25
Message-ID: 20110731203925.40702A60D2 () git ! kde ! org
[Download RAW message or body]

Git commit 421e2d7528d7d789628c0d1cc98a53be10445ee1 by Aakriti Gupta.
Committed on 29/07/2011 at 16:21.
Pushed by aakritigupta into branch 'stage-singlecanvas-aakriti'.

Deleted SvgAnimationData and Frame

D  +0    -112  filters/kpresenter/svgsinglecanvas/Frame.h
D  +0    -57   filters/kpresenter/svgsinglecanvas/SvgAnimationData.cpp
M  +0    -4    filters/kpresenter/svgsinglecanvas/SvgWriter_Stage.h
D  +0    -61   filters/kpresenter/svgsinglecanvas/SvgAnimationData.h
D  +0    -261  filters/kpresenter/svgsinglecanvas/Frame.cpp

http://commits.kde.org/calligra/421e2d7528d7d789628c0d1cc98a53be10445ee1

diff --git a/filters/kpresenter/svgsinglecanvas/Frame.cpp \
b/filters/kpresenter/svgsinglecanvas/Frame.cpp deleted file mode 100644
index a068c73..0000000
--- a/filters/kpresenter/svgsinglecanvas/Frame.cpp
+++ /dev/null
@@ -1,261 +0,0 @@
-/* This file is part of the KDE project
- * Copyright (C) 2011 Aakriti Gupta <aakriti.a.gupta@gmail.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "Frame.h"
-
-Frame::Frame(const KoXmlElement& e)
-{
-  //static int s = 0;
-  //TODO:Use namespace instead of writing 'calligra:' again and again
-    if(e.hasAttribute("calligra:title")) {
-      setTitle(e.attribute("calligra:title"));
-      }
-
-    if(e.hasAttribute("calligra:refid")) {
-      setRefId(e.attribute("calligra:refid"));
-      }
-
-    if(e.hasAttribute("calligra:clip")) {
-      setClip((e.attribute("calligra:clip") == "true"));
-      }
-
-    if(e.hasAttribute("calligra:hide")) {
-      setHide((e.attribute("calligra:hide") == "true"));
-      }
-
-    if(e.hasAttribute("calligra:sequence")) {
-      setSequence(e.attribute("calligra:sequence").toInt());
-      //setSequence(++s);
-      }
-     
-     if(e.hasAttribute("calligra:timeout-ms")) {
-      setTimeout(e.attribute("calligra:timeout-ms").toInt());
-      }
-    
-    if(e.hasAttribute("calligra:timeout-enable")) {
-      enableTimeout(e.attribute("calligra:timeout-enable").toInt());
-      }
-    
-    if(e.hasAttribute("calligra:transition-profile")) {
-      setTransitionProfile(e.attribute("calligra:transition-profile"));
-      }
-    
-    if(e.hasAttribute("calligra:transition-duration-ms")) {
-      setTransitionDuration(e.attribute("calligra:transition-duration-ms").toInt());
-      }
-      
-    if(e.hasAttribute("calligra:transition-zoom-percent")) {
-      setZoomPercent(e.attribute("calligra:transition-zoom-percent").toInt());
-      }
-    
-    Frame();
-}
-
-Frame::Frame() 
-{
-    m_attributes.append("title");
-    m_attributes.append("refid");
-    m_attributes.append("transition-profile");
-    m_attributes.append("hide");
-    m_attributes.append("clip");
-    m_attributes.append("timeout-enable");
-    m_attributes.append("sequence");
-    m_attributes.append("transition-zoom-percent");
-    m_attributes.append("timeout-ms");
-    m_attributes.append("transition-duration-ms");
-        
-    setDefaultValues();
-    }
-
-Frame::~Frame() 
-{
-}
-        
-static void printIndentation(QTextStream *stream, unsigned int indent)
-//void SvgWriter_generic::printIndentation(QTextStream* stream, unsigned int indent)
-{
-    static const QString INDENT("  ");
-    for (unsigned int i = 0; i < indent;++i)
-    *stream << INDENT;
-}
-
-void Frame::writeToStream(QTextStream * stream)
-{
-    unsigned indent = 1;
-    //QTextStream * stream;
-    
-    printIndentation(stream, indent++);
-    *stream << "<calligra:frame" << endl;
-       
-    printIndentation(stream, indent);
-    *stream << "calligra:" << "title=\"" << title() << "\"" << endl;
-    printIndentation(stream, indent);
-    *stream << "calligra:" << "refid=\"" << refId() << "\"" << endl;
-    printIndentation(stream, indent);
-    *stream << "calligra:" << "transition-profile=\"" << transitionProfile() << "\"" \
                << endl;
-    printIndentation(stream, indent);
-    *stream << "calligra:" << "hide=\"";
-    if(isHide())
-      *stream << "true";
-    else
-     *stream << "false";
-    *stream << "\"" << endl;
-     
-    printIndentation(stream, indent);
-    *stream << "calligra:" << "clip=\"";
-    if(isClip())
-      *stream << "true";
-    else
-      *stream << "false";
-    *stream << "\"" << endl;
-    
-    printIndentation(stream, indent);
-    *stream << "calligra:" << "timeout-enable=\"" << isEnableTimeout() << "\"" << \
                endl;
-    printIndentation(stream, indent);
-    *stream << "calligra:" << "sequence=\"" << sequence() << "\"" << endl;
-    printIndentation(stream, indent);
-    *stream << "calligra:" << "transition-zoom-percent=\"" << zoomPercent() << "\"" \
                << endl;
-    printIndentation(stream, indent);
-    *stream << "calligra:" << "timeout-ms=\"" << timeout() << "\"" << endl;
-    printIndentation(stream, indent);
-    *stream << "calligra:" << "transition-duration-ms=\"" << transitionDuration() << \
                "\"" << endl;
-              
-    //*stream << "/>" << endl; because transform needs to be added
-     
-}
-   
-void Frame::setDefaultValues()
-{
-    m_title = "No Title";
-    m_refId = "No Ref ID"; 
-    m_transitionProfile = "linear";
-    m_hide = true;
-    m_clip = true;
-    m_timeoutEnable = false;
-
-    m_sequence = 0;
-    m_transitionZoomPercent = 1;
-    m_transitionDurationMs = 1000; 
-    m_timeoutMs = 5000;
-}
-
-void Frame::setTitle(const QString& title) 
-{  
-    m_title = title;
-}
-        
-void Frame::setRefId(const QString& refId)
-{
-    m_refId = refId;
-}
-        
-void Frame::setSequence(int sequence) 
-{
-    m_sequence = sequence;
-}
-        
-void Frame::setZoomPercent(int zoomPercent) 
-{
-    m_transitionZoomPercent = zoomPercent;
-}
-        
-void Frame::setTransitionProfile(const QString& transProfile) 
-{
-    m_transitionProfile = transProfile;
-}
-        
-void Frame::setTransitionDuration(int timeMs) 
-{
-    m_transitionDurationMs = timeMs;
-}
-        
-void Frame::setTimeout(int timeoutMs)
-{
-    m_timeoutMs = timeoutMs;
-}
-
-void Frame::enableTimeout(bool condition)
-{
-    m_timeoutEnable = condition;
-}
-
-void Frame::setClip(bool condition)
-{
-    m_clip = condition;
-}
-
-void Frame::setHide(bool condition)
-{
-    m_hide = condition;
- }
-
-QString Frame::title() const
-{
-    return m_title;
-}
-        
-QString Frame::refId() const
-{
-    return m_refId;
-}
-       
-QString Frame::transitionProfile() const
-{
-    return m_transitionProfile;
-}
-
-bool Frame::isHide() const
-{
-    return m_hide;
-}
-
-bool Frame::isClip() const
-{
-    return m_clip;
-}
-
-bool Frame::isEnableTimeout() const
-{
-    return m_timeoutEnable;
-}
-
-int Frame::sequence() const
-{
-    return m_sequence;
-}
-        
-int Frame::zoomPercent() const
-{
-    return m_transitionZoomPercent;
-}
-        
-int Frame::timeout() const
-{
-    return m_timeoutMs;
-}
-
-int Frame::transitionDuration() const 
-{
-    return m_transitionDurationMs;
-}
-          
-QList< QString > Frame::attributes() const
-{
-    return m_attributes;
-}
diff --git a/filters/kpresenter/svgsinglecanvas/Frame.h \
b/filters/kpresenter/svgsinglecanvas/Frame.h deleted file mode 100644
index 8026a14..0000000
--- a/filters/kpresenter/svgsinglecanvas/Frame.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/* This file is part of the KDE project
- * Copyright (C) 2011 Aakriti Gupta <aakriti.a.gupta@gmail.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef FRAME_H
-#define FRAME_H
-
-#include <QString>
-#include <KoXmlReader.h>
-
-/**
- * This class is used to define the attributes of frames.
- * Frames are used in making an animated SVSG presentation.
- * Instead of a new slide, in an animated SVG presentation, 
- * each frame is zoomed into.
- */
-class Frame
-{
-  public:
-    /**
-     * @brief Frame() - Constructor
-     * Calls setDefaultValues()
-     */
-    Frame();
-    /**
-     * @brief Frame(const KoXmlElement& e) - Overloaded constructor
-     * Parses frame information from a KoXmlElement,
-     * And saves it into this frame.
-     */
-    Frame(const KoXmlElement& e);
-    /**
-     * @brief ~Frame() - Destructor
-     */
-    ~Frame();
-    
-    /**
-     * Sets the default values for all frame attrbutes
-     */
-    void setDefaultValues();
-    /**
-     * @param stream QTextStream to which all frame data is written in specific \
                format.
-     */
-    void writeToStream(QTextStream * stream);
-    
-    void setTitle(const QString& title);
-    void setRefId(const QString& refId); 
-    void setTransitionProfile(const QString& transProfile);
-
-    void setHide(bool condition);
-    void setClip(bool condition);
-    void enableTimeout(bool condition);
-
-    void setSequence(int seq);
-    void setZoomPercent(int zoomPercent);
-    void setTimeout(int timeoutMs);
-    void setTransitionDuration(int timeMs);
-      
-    QString title() const;
-    QString refId() const; 
-    QString transitionProfile() const;
-      
-    bool isHide() const;
-    bool isClip() const;
-    bool isEnableTimeout() const;
-      
-    int sequence() const;
-    int zoomPercent() const;
-    int timeout() const;
-    int transitionDuration() const;
-     
-    /**
-     * @return m_attributes 
-     */
-    QList<QString> attributes() const;
-      
-  private:
-    
-    QString m_title;
-    QString m_refId;
-    QString m_transitionProfile;
-      
-    bool m_hide;
-    bool m_clip;
-    bool m_timeoutEnable;
-
-    int m_sequence;
-    int m_transitionZoomPercent;
-    int m_transitionDurationMs;
-    int m_timeoutMs;
-    
-    /**
-     * @brief m_attributes List of all attributes a frame can have
-     */
-    QList<QString> m_attributes;
-};
-    
-#endif /*FRAME_H*/
diff --git a/filters/kpresenter/svgsinglecanvas/SvgAnimationData.cpp \
b/filters/kpresenter/svgsinglecanvas/SvgAnimationData.cpp deleted file mode 100644
index 7bceea5..0000000
--- a/filters/kpresenter/svgsinglecanvas/SvgAnimationData.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-/* This file is part of the KDE project
- * Copyright (C) 2011 Aakriti Gupta <aakriti.a.gupta@gmail.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-#include "SvgAnimationData.h"
-#include "Frame.h"
-#include "KoShape.h"
-
-SvgAnimationData::SvgAnimationData()
-{
-}
-
-SvgAnimationData::~SvgAnimationData()
-{
-}
-
-void SvgAnimationData::setFrame(Frame *frame)
-{
-    m_frame = *frame;
-}
-
-Frame SvgAnimationData::frame()
-{
-    return m_frame;
-}
-
-  ///Temporary function.
-  ///Only for testing
-void SvgAnimationData::addNewFrame(KoShape *shape, Frame *frame)
-{
-    SvgAnimationData *applicationData = dynamic_cast<SvgAnimationData*>( \
                shape->applicationData() );
-
-    if ( applicationData == 0 ) {
-        applicationData = new SvgAnimationData();
-        applicationData->setFrame(frame);
-    }
-    
-    shape->setApplicationData(applicationData);
-  
-    //'frame' saved as a part of 'shape' now.
-    //The SvgWriter will use this 'frame' to extract frame specific attributes.
-}
-    
diff --git a/filters/kpresenter/svgsinglecanvas/SvgAnimationData.h \
b/filters/kpresenter/svgsinglecanvas/SvgAnimationData.h deleted file mode 100644
index 78fcdc0..0000000
--- a/filters/kpresenter/svgsinglecanvas/SvgAnimationData.h
+++ /dev/null
@@ -1,61 +0,0 @@
-  /* This file is part of the KDE project
-  * Copyright (C) 2011 Aakriti Gupta <aakriti.a.gupta@gmail.com>
-  *
-  * This library is free software; you can redistribute it and/or
-  * modify it under the terms of the GNU Library General Public
-  * License as published by the Free Software Foundation; either
-  * version 2 of the License, or (at your option) any later version.
-  *
-  * This library is distributed in the hope that it will be useful,
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-  * Library General Public License for more details.
-  *
-  * You should have received a copy of the GNU Library General Public License
-  * along with this library; see the file COPYING.LIB.  If not, write to
-  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-  * Boston, MA 02110-1301, USA.
-  */
-
-#ifndef SVGANIMATIONDATA_H
-#define SVGANIMATIONDATA_H
-
-#include "Frame.h"
-#include <libs/flake/KoShapeApplicationData.h>
-
-class Frame;
-class KoShape;
-
-/**
- * Inherits from KoshapeApplicationData
- * To store a Frame object to a KoShape
- */
-class SvgAnimationData : public KoShapeApplicationData
-{
-  public:
-    SvgAnimationData();
-    ~SvgAnimationData();
-
-    /**
-     * Sets the frame properties for the calling shape
-     */
-    void setFrame(Frame *frame);
-    /**
-     * Returns the Frame object which contains information for the shape animation.
-     */
-    Frame frame();
-    /**
-     * This function adds a new frame to a shape.
-     * This function will only be used for tests.
-     * Eventually, will be removed from here.
-     */
-    void addNewFrame(KoShape *shape, Frame *frame);
-    
-  private:
-      /**
-       * The Frame object which contains frame attributes and their values
-       */
-      Frame m_frame;
-};
-
-#endif /*SVGANIMATIONDATA_H */
diff --git a/filters/kpresenter/svgsinglecanvas/SvgWriter_Stage.h \
b/filters/kpresenter/svgsinglecanvas/SvgWriter_Stage.h index 14946aa..639c710 100644
--- a/filters/kpresenter/svgsinglecanvas/SvgWriter_Stage.h
+++ b/filters/kpresenter/svgsinglecanvas/SvgWriter_Stage.h
@@ -21,15 +21,11 @@
 #define SVG_WRITER_STAGE_H
 
 #include "SvgWriter_generic.h"
-#include <plugins/presentationviewportshape/PresentationViewPortShape.h>
-#include <KoPathShape.h>
 
-class Frame;
 class KoShape;
 class QTextStream;
 class SvgWriter;
 class KoShapeLayer;
-class SvgAnimationData;
 
 class SvgWriter_Stage : public SvgWriter_generic
 {


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

Configure | About | News | Add a list | Sponsored by KoreLogic