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

« back to all changes in this revision

Viewing changes to kchart/kdchart/kdchartserializer/src/KDChartDiagramsSerializer.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2010-09-21 15:36:35 UTC
  • mfrom: (1.4.1 upstream) (60.2.11 maverick)
  • Revision ID: james.westby@ubuntu.com-20100921153635-6tejqkiro2u21ydi
Tags: 1:2.2.2-0ubuntu3
Add kubuntu_03_fix-crash-on-closing-sqlite-connection-2.2.2.diff and
kubuntu_04_support-large-memo-values-for-msaccess-2.2.2.diff as
recommended by upstream http://kexi-
project.org/wiki/wikiview/index.php@Kexi2.2_Patches.html#sqlite_stab
ility

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*- Mode: C++ -*-
2
 
   KDChart - a multi-platform charting engine
3
 
   */
4
 
 
5
 
/****************************************************************************
6
 
 ** Copyright (C) 2001-2003 Klarälvdalens Datakonsult AB.  All rights reserved.
7
 
 **
8
 
 ** This file is part of the KDChart library.
9
 
 **
10
 
 ** This file may be used under the terms of the GNU General Public
11
 
 ** License versions 2.0 or 3.0 as published by the Free Software
12
 
 ** Foundation and appearing in the files LICENSE.GPL2 and LICENSE.GPL3
13
 
 ** included in the packaging of this file.  Alternatively you may (at
14
 
 ** your option) use any later version of the GNU General Public
15
 
 ** License if such license has been publicly approved by
16
 
 ** Klarälvdalens Datakonsult AB (or its successors, if any).
17
 
 ** 
18
 
 ** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
19
 
 ** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
20
 
 ** A PARTICULAR PURPOSE. Klarälvdalens Datakonsult AB reserves all rights
21
 
 ** not expressly granted herein.
22
 
 ** 
23
 
 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
24
 
 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
25
 
 **
26
 
 **********************************************************************/
27
 
#ifndef __KDCHARTDIAGRAMSSERIALIZER_H__
28
 
#define __KDCHARTDIAGRAMSSERIALIZER_H__
29
 
 
30
 
/** \file KDChartDiagramsSerializer.h
31
 
    \brief Auxiliary methods for reading/saving KD Chart data and configuration in streams.
32
 
  */
33
 
 
34
 
#include "KDChartAbstractSerializer"
35
 
#include "KDChartLegendsSerializer"
36
 
 
37
 
#include "KDChartAttributesSerializer"
38
 
 
39
 
#include <KDChartChart>
40
 
#include <KDChartLineDiagram>
41
 
#include <KDChartBarDiagram>
42
 
#include <KDChartPieDiagram>
43
 
#include <KDChartPolarDiagram>
44
 
#include <KDChartRingDiagram>
45
 
#include <KDChartPlotter>
46
 
 
47
 
namespace KDChart {
48
 
 
49
 
    class CoordPlanesSerializer;
50
 
    class AxesSerializer;
51
 
    class AttributesModelSerializer;
52
 
 
53
 
    class KDCHARTSERIALIZER_EXPORT DiagramsSerializer : public QObject, public AbstractSerializer
54
 
    {
55
 
        Q_OBJECT
56
 
        Q_DISABLE_COPY( DiagramsSerializer )
57
 
 
58
 
        KDCHART_DECLARE_PRIVATE_BASE_POLYMORPHIC( DiagramsSerializer )
59
 
 
60
 
        friend class Private;
61
 
        friend class CoordPlanesSerializer;
62
 
        friend class LegendsSerializer;
63
 
        friend class LegendsSerializer::Private;
64
 
 
65
 
    public:
66
 
        explicit DiagramsSerializer( CoordPlanesSerializer* coordS = 0 );
67
 
        virtual ~DiagramsSerializer();
68
 
 
69
 
        /** reimp */
70
 
        void saveElement( QDomDocument& doc, QDomElement& e, const QObject* obj ) const;
71
 
 
72
 
        /**
73
 
         * reimp
74
 
         * 
75
 
         * Parse the diagram element, and store it in \c ptr.
76
 
         *
77
 
         * Make sure that you have called
78
 
         * \c KDChart::SerializeCollector::instance()->initializeParsedGlobalPointers()
79
 
         * before invoking this method, or it will stop parsing and return false.
80
 
         */
81
 
        bool parseElement( const QDomElement& container, QObject* ptr ) const;
82
 
 
83
 
       /**
84
 
         * Parse the diagram element, and return a AbstractDiagram* in \c diagramPtr
85
 
         * if the respective diagram was found in the list of global elements.
86
 
         *
87
 
         * This method is called transparently by the Serializer, so you should
88
 
         * not need to call it explicitly.
89
 
         *
90
 
         * In case still want to call it just make sure that you have called
91
 
         * \c KDChart::SerializeCollector::instance()->initializeParsedGlobalPointers()
92
 
         * \em before invoking this method, or it will stop parsing and return false.
93
 
        */
94
 
        bool parseDiagram( const QDomNode& rootNode, const QDomNode& pointerNode,
95
 
                           AbstractDiagram*& diagramPtr ) const;
96
 
        void saveDiagrams( QDomDocument& doc, QDomElement& e,
97
 
                           const ConstAbstractDiagramList& diags, const QString& title ) const;
98
 
    };
99
 
 
100
 
} // end of namespace
101
 
 
102
 
#endif