23 #include "KDChartModelDataCache_p.h" 29 ModelSignalMapperConnector::ModelSignalMapperConnector( ModelSignalMapper& mapper )
35 ModelSignalMapperConnector::~ModelSignalMapperConnector()
39 void ModelSignalMapperConnector::connectSignals( QAbstractItemModel* model )
41 connect( model, SIGNAL( destroyed() ),
this, SLOT( resetModel() ) );
42 connect( model, SIGNAL( columnsInserted( QModelIndex,
int,
int ) ),
this, SLOT( columnsInserted( QModelIndex,
int,
int ) ) );
43 connect( model, SIGNAL( columnsRemoved( QModelIndex,
int,
int ) ),
this, SLOT( columnsRemoved( QModelIndex,
int,
int ) ) );
44 connect( model, SIGNAL( dataChanged( QModelIndex, QModelIndex ) ),
this, SLOT( dataChanged( QModelIndex, QModelIndex ) ) );
45 connect( model, SIGNAL( layoutChanged() ),
this, SLOT( layoutChanged() ) );
46 connect( model, SIGNAL( modelReset() ),
this, SLOT( modelReset() ) );
47 connect( model, SIGNAL( rowsInserted( QModelIndex,
int,
int ) ),
this, SLOT( rowsInserted( QModelIndex,
int,
int )) );
48 connect( model, SIGNAL( rowsRemoved( QModelIndex,
int,
int ) ),
this, SLOT( rowsRemoved( QModelIndex,
int,
int ) ) );
51 void ModelSignalMapperConnector::disconnectSignals( QAbstractItemModel* model )
53 disconnect( model, SIGNAL( destroyed() ),
this, SLOT( resetModel() ) );
54 disconnect( model, SIGNAL( columnsInserted( QModelIndex,
int,
int ) ),
this, SLOT( columnsInserted( QModelIndex,
int,
int ) ) );
55 disconnect( model, SIGNAL( columnsRemoved( QModelIndex,
int,
int ) ),
this, SLOT( columnsRemoved( QModelIndex,
int,
int ) ) );
56 disconnect( model, SIGNAL( dataChanged( QModelIndex, QModelIndex ) ),
this, SLOT( dataChanged( QModelIndex, QModelIndex ) ) );
57 disconnect( model, SIGNAL( layoutChanged() ),
this, SLOT( layoutChanged() ) );
58 disconnect( model, SIGNAL( modelReset() ),
this, SLOT( modelReset() ) );
59 disconnect( model, SIGNAL( rowsInserted( QModelIndex,
int,
int ) ),
this, SLOT( rowsInserted( QModelIndex,
int,
int )) );
60 disconnect( model, SIGNAL( rowsRemoved( QModelIndex,
int,
int ) ),
this, SLOT( rowsRemoved( QModelIndex,
int,
int ) ) );
63 void ModelSignalMapperConnector::resetModel()
65 m_mapper.resetModel();
68 void ModelSignalMapperConnector::columnsInserted(
const QModelIndex& parent,
int start,
int end )
70 m_mapper.columnsInserted( parent, start, end );
73 void ModelSignalMapperConnector::columnsRemoved(
const QModelIndex& parent,
int start,
int end )
75 m_mapper.columnsRemoved( parent, start, end );
78 void ModelSignalMapperConnector::dataChanged(
const QModelIndex& topLeft,
const QModelIndex& bottomRight )
80 m_mapper.dataChanged( topLeft, bottomRight );
83 void ModelSignalMapperConnector::layoutChanged()
85 m_mapper.layoutChanged();
88 void ModelSignalMapperConnector::modelReset()
90 m_mapper.modelReset();
93 void ModelSignalMapperConnector::rowsInserted(
const QModelIndex& parent,
int start,
int end )
95 m_mapper.rowsInserted( parent, start, end );
98 void ModelSignalMapperConnector::rowsRemoved(
const QModelIndex& parent,
int start,
int end )
100 m_mapper.rowsRemoved( parent, start, end );
Class only listed here to document inheritance of some KDChart classes.