KD Chart 2: KDChart::DiagramObserver class Reference

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

# KDChart::DiagramObserver Class Reference

`#include <KDChartDiagramObserver.h>`

Inheritance diagram for KDChart::DiagramObserver:

[legend]
Collaboration diagram for KDChart::DiagramObserver:
[legend]
List of all members.

## Detailed Description

A DiagramObserver watches the associated diagram for changes and deletion and emits corresponsing signals.

Definition at line 44 of file KDChartDiagramObserver.h.

## Public Member Functions
AbstractDiagram * | diagram ()
const AbstractDiagram * | diagram () const
void | diagramAttributesChanged (AbstractDiagram *diagram)
| This signal is emitted whenever the attributes of the diagram change.
void | diagramDataChanged (AbstractDiagram *diagram)
| This signal is emitted whenever the data of the diagram changes.
void | diagramDataHidden (AbstractDiagram *diagram)
| This signal is emitted whenever any of the data of the diagram was set (un)hidden.
| DiagramObserver (AbstractDiagram *diagram, QObject *parent=0)
| Constructs a new observer observing the given diagram.
void | slotAttributesChanged (QModelIndex, QModelIndex)
void | slotAttributesChanged ()
void | slotDataChanged ()
void | slotDataChanged (QModelIndex, QModelIndex)
void | slotDataHidden ()
void | slotHeaderDataChanged (Qt::Orientation, int, int)
void | slotModelsChanged ()
| ~DiagramObserver ()
## Public Attributes
Q_SIGNALS | __pad0__: void diagramDestroyed( AbstractDiagram* diagram )
private | Q_SLOTS: void slotDestroyed(QObject*)

## Constructor & Destructor Documentation

DiagramObserver::DiagramObserver | ( | AbstractDiagram * | diagram,
|  | QObject * | parent = 0
| ) | `[explicit]`

| Constructs a new observer observing the given diagram. Definition at line 40 of file KDChartDiagramObserver.cpp. References slotModelsChanged().
    00041     : QObject( parent ), m_diagram( diagram )
    00042 {
    00043     if ( m_diagram ) {
    00044         connect( m_diagram, SIGNAL(destroyed(QObject*)), SLOT(slotDestroyed(QObject*)));
    00045         connect( m_diagram, SIGNAL(modelsChanged()), SLOT(slotModelsChanged()));
    00046     }
    00047     init();
    00048 }

DiagramObserver::~DiagramObserver | ( |  | ) |

| Definition at line 50 of file KDChartDiagramObserver.cpp.
    00051 {
    00052 }

## Member Function Documentation

AbstractDiagram * DiagramObserver::diagram | ( |  | ) |

| Definition at line 59 of file KDChartDiagramObserver.cpp.
    00060 {
    00061     return m_diagram;
    00062 }

const AbstractDiagram * DiagramObserver::diagram | ( |  | ) | const

| Definition at line 54 of file KDChartDiagramObserver.cpp. Referenced by KDChart::Legend::datasetCount().
    00055 {
    00056     return m_diagram;
    00057 }

void KDChart::DiagramObserver::diagramAttributesChanged | ( | AbstractDiagram * | diagram | ) |

| This signal is emitted whenever the attributes of the diagram change. Referenced by slotAttributesChanged().

void KDChart::DiagramObserver::diagramDataChanged | ( | AbstractDiagram * | diagram | ) |

| This signal is emitted whenever the data of the diagram changes. Referenced by slotDataChanged(), and slotHeaderDataChanged().

void KDChart::DiagramObserver::diagramDataHidden | ( | AbstractDiagram * | diagram | ) |

| This signal is emitted whenever any of the data of the diagram was set (un)hidden. Referenced by slotDataHidden().

void DiagramObserver::slotAttributesChanged | ( | QModelIndex | ,
|  | QModelIndex |
| ) |

| Definition at line 133 of file KDChartDiagramObserver.cpp. References slotAttributesChanged().
    00134 {
    00135     slotAttributesChanged();
    00136 }

void DiagramObserver::slotAttributesChanged | ( |  | ) |

| Definition at line 138 of file KDChartDiagramObserver.cpp. References diagramAttributesChanged(). Referenced by slotAttributesChanged(), and slotModelsChanged().
    00139 {
    00140     //qDebug() << "DiagramObserver::slotAttributesChanged()";
    00141     emit diagramAttributesChanged( m_diagram );
    00142 }

void DiagramObserver::slotDataChanged | ( |  | ) |

| Definition at line 121 of file KDChartDiagramObserver.cpp. References diagramDataChanged(). Referenced by slotDataChanged(), and slotModelsChanged().
    00122 {
    00123     //qDebug() << "DiagramObserver::slotDataChanged()";
    00124     emit diagramDataChanged( m_diagram );
    00125 }

void DiagramObserver::slotDataChanged | ( | QModelIndex | ,
|  | QModelIndex |
| ) |

| Definition at line 116 of file KDChartDiagramObserver.cpp. References slotDataChanged().
    00117 {
    00118     slotDataChanged();
    00119 }

void DiagramObserver::slotDataHidden | ( |  | ) |

| Definition at line 127 of file KDChartDiagramObserver.cpp. References diagramDataHidden().
    00128 {
    00129     //qDebug() << "DiagramObserver::slotDataHidden()";
    00130     emit diagramDataHidden( m_diagram );
    00131 }

void DiagramObserver::slotHeaderDataChanged | ( | Qt::Orientation | ,
|  | int | ,
|  | int |
| ) |

| Definition at line 110 of file KDChartDiagramObserver.cpp. References diagramDataChanged().
    00111 {
    00112     //qDebug() << "DiagramObserver::slotHeaderDataChanged()";
    00113     emit diagramDataChanged( m_diagram );
    00114 }

void DiagramObserver::slotModelsChanged | ( |  | ) |

| Definition at line 103 of file KDChartDiagramObserver.cpp. References slotAttributesChanged(), and slotDataChanged(). Referenced by DiagramObserver().
    00104 {
    00105     init();
    00106     slotDataChanged();
    00107     slotAttributesChanged();
    00108 }

## Member Data Documentation

Q_SIGNALS KDChart::DiagramObserver::__pad0__

| Definition at line 60 of file KDChartDiagramObserver.h.

private KDChart::DiagramObserver::Q_SLOTS

| Definition at line 69 of file KDChartDiagramObserver.h.

The documentation for this class was generated from the following files:

- KDChartDiagramObserver.h
- KDChartDiagramObserver.cpp