kpresenter
KPrLoadingInfo.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef KPRLOADINGINFO_H
00021 #define KPRLOADINGINFO_H
00022
00023 struct lstAnimation
00024 {
00025 QDomElement *element;
00026 int order;
00027 };
00028
00030 class KPrLoadingInfo
00031 {
00032 public:
00033 KPrLoadingInfo( bool oldFormat = false)
00034 : presSpeed( -1 )
00035 , m_header( false )
00036 , m_footer( false )
00037 , m_headerFooterByPage( false )
00038 , m_oldFormat( oldFormat )
00039 {
00040 m_animationsShowDict.setAutoDelete( true );
00041 m_animationsHideDict.setAutoDelete( true );
00042 }
00043 ~KPrLoadingInfo() {}
00044
00045 lstAnimation* animationShowById( const QString& id ) const {
00046 return m_animationsShowDict[id];
00047 }
00048 void storePresentationShowAnimation( lstAnimation * element, const QString& id ) {
00049 m_animationsShowDict.insert( id , element );
00050 }
00051 void clearAnimationShowDict() {
00052 QDictIterator<lstAnimation> it( m_animationsShowDict );
00053 for( ; it.current(); ++it )
00054 {
00055 delete it.current()->element;
00056 }
00057 m_animationsShowDict.clear();
00058 }
00059
00060 lstAnimation* animationHideById( const QString& id ) const {
00061 return m_animationsHideDict[id];
00062 }
00063 void storePresentationHideAnimation( lstAnimation * element, const QString& id ) {
00064 m_animationsHideDict.insert( id , element );
00065 }
00066 void clearAnimationHideDict() {
00067 QDictIterator<lstAnimation> it( m_animationsHideDict );
00068 for( ; it.current(); ++it )
00069 {
00070 delete it.current()->element;
00071 }
00072 m_animationsHideDict.clear();
00073 }
00074 bool oldFormat() const { return m_oldFormat; }
00075 int presSpeed;
00076 QMap<QString, KPrPage *> m_name2page;
00077 bool m_header;
00078 bool m_footer;
00079 bool m_headerFooterByPage;
00080 private:
00081 QDict<lstAnimation> m_animationsShowDict;
00082 QDict<lstAnimation> m_animationsHideDict;
00083 bool m_oldFormat;
00084 };
00085
00086 #endif
00087
|