emit viewportEntered();
}
-void DolphinController::emitSelectionChanged()
-{
- emit selectionChanged();
-}
-
void DolphinController::updateMouseButtonState()
{
m_mouseButtons = QApplication::mouseButtons();
* - handleKeyPressEvent()
* - emitItemEntered()
* - emitViewportEntered()
- * - emitSelectionChanged()
* - replaceUrlByClipboard()
* - hideToolTip()
* - setVersionControlActions()
*/
void emitViewportEntered();
- /**
- * Emits the signal selectionChanged(). The method should be invoked by
- * the view implementation whenever the selection has been changed.
- */
- void emitSelectionChanged();
-
signals:
/**
* Is emitted if the URL for the Dolphin controller has been changed
*/
void viewportEntered();
- /**
- * Is emitted whenever the selection of the view implementation
- * has been changed (see emitSelectionChanged()). The abstract
- * Dolphin view connects to this signal.
- */
- void selectionChanged();
-
/**
* Is emitted if the view should respect the name filter \a nameFilter. The view
* implementation must connect to this signal if it supports name filters.
view->viewport()->installEventFilter(this);
m_controller->setItemView(view);
- connect(m_controller, SIGNAL(selectionChanged()),
- this, SLOT(emitDelayedSelectionChangedSignal()));
// When changing the view mode, the selection is lost due to reinstantiating
// a new item view with a custom selection model. Pass the ownership of the
m_selectionModel = view->selectionModel();
}
m_selectionModel->setParent(this);
+ connect(view->selectionModel(), SIGNAL(selectionChanged(const QItemSelection&, const QItemSelection&)),
+ this, SLOT(emitDelayedSelectionChangedSignal()));
connect(view->verticalScrollBar(), SIGNAL(valueChanged(int)),
this, SLOT(emitContentsMoved()));
} else {
// no item is hovered and no selection has been done: provide
// an item for the directory represented by m_shownUrl
- m_fileItem = KFileItem(KFileItem::Unknown, KFileItem::Unknown, m_shownUrl);
- m_fileItem.refresh();
- item = m_fileItem;
+ item = KFileItem(KFileItem::Unknown, KFileItem::Unknown, m_shownUrl);
+ item.refresh();
}
m_content->showItem(item);
connect(dolphinView, SIGNAL(sortFoldersFirstChanged(bool)),
this, SLOT(slotSortFoldersFirstChanged(bool)));
- // inform the controller about selection changes
- connect(view->selectionModel(), SIGNAL(selectionChanged(const QItemSelection&, const QItemSelection&)),
- controller, SLOT(emitSelectionChanged()));
-
// Give the view the ability to auto-expand its directories on hovering
// (the column view takes care about this itself). If the details view
// uses expandable folders, the auto-expanding should be used always.