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

« back to all changes in this revision

Viewing changes to kchart/kdchart/src/KDChartDiagramObserver.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
 
/****************************************************************************
2
 
 ** Copyright (C) 2001-2007 Klarälvdalens Datakonsult AB.  All rights reserved.
3
 
 **
4
 
 ** This file is part of the KD Chart library.
5
 
 **
6
 
 ** This file may be used under the terms of the GNU General Public
7
 
 ** License versions 2.0 or 3.0 as published by the Free Software
8
 
 ** Foundation and appearing in the files LICENSE.GPL2 and LICENSE.GPL3
9
 
 ** included in the packaging of this file.  Alternatively you may (at
10
 
 ** your option) use any later version of the GNU General Public
11
 
 ** License if such license has been publicly approved by
12
 
 ** Klarälvdalens Datakonsult AB (or its successors, if any).
13
 
 ** 
14
 
 ** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
15
 
 ** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
16
 
 ** A PARTICULAR PURPOSE. Klarälvdalens Datakonsult AB reserves all rights
17
 
 ** not expressly granted herein.
18
 
 ** 
19
 
 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
20
 
 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21
 
 **
22
 
 **********************************************************************/
23
 
#ifndef __KDCHARTDIAGRAMOBSERVER_H_
24
 
#define __KDCHARTDIAGRAMOBSERVER_H_
25
 
 
26
 
#include "KDChartGlobal.h"
27
 
 
28
 
#include <QObject>
29
 
#include <QPointer>
30
 
#include <QModelIndex>
31
 
 
32
 
class QAbstractItemModel;
33
 
 
34
 
namespace KDChart {
35
 
 
36
 
    class AbstractDiagram;
37
 
 
38
 
    /**
39
 
     * \brief A DiagramObserver watches the associated diagram for
40
 
     * changes and deletion and emits corresponsing signals.
41
 
     */
42
 
    class KDCHART_EXPORT DiagramObserver : public QObject
43
 
    {
44
 
        Q_OBJECT
45
 
    public:
46
 
       /**
47
 
         * Constructs a new observer observing the given diagram.
48
 
         */
49
 
        explicit DiagramObserver( AbstractDiagram * diagram, QObject* parent = 0 );
50
 
        ~DiagramObserver();
51
 
 
52
 
        const AbstractDiagram* diagram() const;
53
 
        AbstractDiagram* diagram();
54
 
 
55
 
    Q_SIGNALS:
56
 
        /** This signal is emitted immediately before the diagram is
57
 
          * being destroyed. */
58
 
        void diagramDestroyed( AbstractDiagram* diagram );
59
 
        /** This signal is emitted whenever the data of the diagram changes. */
60
 
        void diagramDataChanged( AbstractDiagram* diagram );
61
 
        /** This signal is emitted whenever any of the data of the diagram was set (un)hidden. */
62
 
        void diagramDataHidden( AbstractDiagram* diagram );
63
 
        /** This signal is emitted whenever the attributes of the diagram change. */
64
 
        void diagramAttributesChanged( AbstractDiagram* diagram );
65
 
 
66
 
    private Q_SLOTS:
67
 
        void slotDestroyed(QObject*);
68
 
        void slotHeaderDataChanged(Qt::Orientation,int,int);
69
 
        void slotDataChanged(QModelIndex,QModelIndex);
70
 
        void slotDataChanged();
71
 
        void slotDataHidden();
72
 
        void slotAttributesChanged();
73
 
        void slotAttributesChanged(QModelIndex,QModelIndex);
74
 
        void slotModelsChanged();
75
 
 
76
 
    private:
77
 
        void init();
78
 
 
79
 
        AbstractDiagram*    m_diagram;
80
 
        QPointer<QAbstractItemModel> m_model;
81
 
        QPointer<QAbstractItemModel> m_attributesmodel;
82
 
   };
83
 
}
84
 
 
85
 
#endif // KDChartDiagramObserver_H