~ubuntu-branches/ubuntu/precise/koffice/precise

« back to all changes in this revision

Viewing changes to kpresenter/part/KPrShapeAnimations.h

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2010-10-27 17:52:57 UTC
  • mfrom: (0.12.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20101027175257-s04zqqk5bs8ckm9o
Tags: 1:2.2.83-0ubuntu1
* Merge with Debian git remaining changes:
 - Add build-deps on librcps-dev, opengtl-dev, libqtgtl-dev, freetds-dev,
   create-resources, libspnav-dev
 - Remove needless build-dep on libwv2-dev
 - koffice-libs recommends create-resources
 - krita recommends pstoedit
 - Keep our patches
* New upstream release 2.3 beta 3
  - Remove debian/patches fixed by upstream
  - Update install files

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* This file is part of the KDE project
2
2
 * Copyright ( C ) 2007 Thorsten Zachmann <zachmann@kde.org>
 
3
 * Copyright ( C ) 2010 Benjamin Port <port.benjamin@gmail.com>
3
4
 *
4
5
 * This library is free software; you can redistribute it and/or
5
6
 * modify it under the terms of the GNU Library General Public
20
21
#ifndef KPRSHAPEANIMATIONS_H
21
22
#define KPRSHAPEANIMATIONS_H
22
23
 
23
 
#define BOOST_MULTI_INDEX_DISABLE_SERIALIZATION
24
 
#include <boost/multi_index_container.hpp>
25
 
#include <boost/multi_index/composite_key.hpp>
26
 
#include <boost/multi_index/mem_fun.hpp>
27
 
#include <boost/multi_index/ordered_index.hpp>
28
 
 
29
 
#include <QMap>
30
 
 
31
 
#include "kpresenter_export.h"
32
 
#include "shapeanimations/KPrShapeAnimation.h"
33
 
 
34
 
struct shape_step_key : boost::multi_index::composite_key<
35
 
    KPrShapeAnimation,
36
 
    boost::multi_index::const_mem_fun<KPrShapeAnimation, KoShape *, &KPrShapeAnimation::shape>,
37
 
    boost::multi_index::const_mem_fun<KPrShapeAnimation, int, &KPrShapeAnimation::step>
38
 
>
39
 
{
40
 
};
41
 
 
42
 
typedef boost::multi_index_container<
43
 
    KPrShapeAnimation *,
44
 
    boost::multi_index::indexed_by<
45
 
        boost::multi_index::ordered_unique<
46
 
            shape_step_key
47
 
        >,
48
 
        boost::multi_index::ordered_non_unique<
49
 
            boost::multi_index::const_mem_fun<KPrShapeAnimation, int, &KPrShapeAnimation::step>
50
 
        >
51
 
    >
52
 
> ShapeAnimations;
53
 
 
54
 
typedef boost::multi_index::nth_index<ShapeAnimations,1>::type ShapeAnimationsByStep;
55
 
 
56
 
class KPRESENTER_TEST_EXPORT KPrShapeAnimations
 
24
#include <QList>
 
25
#include "animations/KPrShapeAnimation.h"
 
26
#include "animations/KPrAnimationStep.h"
 
27
 
 
28
 
 
29
class KPrShapeAnimations
57
30
{
58
31
public:
59
32
    KPrShapeAnimations();
60
33
    ~KPrShapeAnimations();
61
 
 
 
34
    void init(const QList<KPrAnimationStep *> animations);
62
35
    /**
63
36
     * Add animation to the animations
64
37
     *
79
52
     * Get the animations for the given step
80
53
     *
81
54
     * @param step the step for which the animations should be returned
82
 
     * @return A map of the shape -> animation if the animation is 0 the shape 
 
55
     * @return A map of the shape -> animation if the animation is 0 the shape
83
56
     *         is not visible
84
57
     */
85
 
    QMap<KoShape *, KPrShapeAnimation *> animations( int step ) const;
86
 
 
 
58
/*    QMap<KoShape *, KPrShapeAnimation *> animations( int step ) const;
 
59
*/
87
60
    /**
88
 
     * Get a list of used steps in the animations
89
 
     *
90
 
     * Step 0 is the step for showing a new page. The list will always contain 
91
 
     * step 0 even when there is no animation for it.
 
61
     * Get all steps
92
62
     */
93
 
    QList<int> steps() const;
 
63
    QList<KPrAnimationStep *> steps() const;
94
64
 
95
65
private:
96
 
    ShapeAnimations m_shapeAnimations;
 
66
    QList<KPrAnimationStep *> m_shapeAnimations;
97
67
};
98
68
 
99
69
#endif /* KPRSHAPEANIMATIONS_H */