-void BufferModel::mapProperty(int column, int role, QObject *target, const QByteArray &property) {
- propertyMapper()->addMapping(column, role, target, property);
-}
-
-// This Slot indicates that the user has selected a different buffer in the gui
-void BufferModel::setCurrentIndex(const QModelIndex &index, QItemSelectionModel::SelectionFlags command) {
- Q_UNUSED(command)
- Buffer *newCurrentBuffer;
- NetworkModel *networkModel = qobject_cast<NetworkModel *>(parent());
- if(networkModel->isBufferIndex(mapToSource(index)) && currentBuffer != (newCurrentBuffer = networkModel->getBufferByIndex(mapToSource(index)))) {
- currentBuffer = newCurrentBuffer;
- networkModel->bufferActivity(Buffer::NoActivity, currentBuffer);
- emit bufferSelected(currentBuffer);
- emit selectionChanged(index);
- }