-void InputWidget::setModel(BufferModel *bufferModel) {
- if(_bufferModel) {
- disconnect(_bufferModel, 0, this, 0);
- }
- _bufferModel = bufferModel;
- connect(bufferModel, SIGNAL(dataChanged(QModelIndex, QModelIndex)),
- this, SLOT(dataChanged(QModelIndex, QModelIndex)));
-}
-
-void InputWidget::setSelectionModel(QItemSelectionModel *selectionModel) {
- if(_selectionModel) {
- disconnect(_selectionModel, 0, this, 0);
- }
- _selectionModel = selectionModel;
- connect(selectionModel, SIGNAL(currentChanged(QModelIndex, QModelIndex)),
- this, SLOT(currentChanged(QModelIndex, QModelIndex)));
-}
-