15#include <KDABLibFakes>
47void DiagramObserver::init()
55 if (m_attributesmodel)
59 this, QOverload<>::of(&DiagramObserver::slotDataChanged));
64 if (m_diagram->
model()) {
66 this, QOverload<QModelIndex, QModelIndex>::of(&DiagramObserver::slotDataChanged));
68 this, QOverload<>::of(&DiagramObserver::slotDataChanged));
70 this, QOverload<>::of(&DiagramObserver::slotDataChanged));
72 this, QOverload<>::of(&DiagramObserver::slotDataChanged));
74 this, QOverload<>::of(&DiagramObserver::slotDataChanged));
76 this, QOverload<>::of(&DiagramObserver::slotDataChanged));
78 this, &DiagramObserver::slotHeaderDataChanged);
83 this, QOverload<QModelIndex, QModelIndex>::of(&DiagramObserver::slotAttributesChanged));
84 m_model = m_diagram->
model();
88void DiagramObserver::slotDestroyed(
QObject *)
98void DiagramObserver::slotAboutToBeDestroyed()
103void DiagramObserver::slotModelsChanged()
107 slotAttributesChanged();
121void DiagramObserver::slotDataChanged()
127void DiagramObserver::slotDataHidden()
135 slotAttributesChanged();
138void DiagramObserver::slotAttributesChanged()
AbstractDiagram defines the interface for diagram classes.
virtual AttributesModel * attributesModel() const
void viewportCoordinateSystemChanged()
void aboutToBeDestroyed()
void attributesChanged(const QModelIndex &, const QModelIndex &)
const AbstractDiagram * diagram() const
void diagramDataHidden(AbstractDiagram *diagram)
void diagramAboutToBeDestroyed(AbstractDiagram *diagram)
DiagramObserver(AbstractDiagram *diagram, QObject *parent=nullptr)
void diagramDataChanged(AbstractDiagram *diagram)
void diagramDestroyed(AbstractDiagram *diagram)
void diagramAttributesChanged(AbstractDiagram *diagram)
~DiagramObserver() override
void columnsInserted(const QModelIndex &parent, int first, int last)
void columnsRemoved(const QModelIndex &parent, int first, int last)
void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector< int > &roles)
void rowsInserted(const QModelIndex &parent, int first, int last)
void rowsRemoved(const QModelIndex &parent, int first, int last)
QAbstractItemModel * model() const const
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
void destroyed(QObject *obj)
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
T qobject_cast(QObject *object)