*/
void emitViewportEntered();
- void indicateSelectionChange();
-
signals:
/**
* Is emitted if a context menu should be opened.
* the viewport. */
void viewportEntered();
- /** Is emitted if the selection has been changed by the user. */
- void selectionChanged();
-
/** Is emitted if the view should zoom in. */
void zoomIn();
void DolphinDetailsView::mousePressEvent(QMouseEvent* event)
{
- if (!indexAt(event->pos()).isValid()) {
+ QTreeView::mousePressEvent(event);
+
+ const QModelIndex index = indexAt(event->pos());
+ if (!index.isValid() || (index.column() != KDirModel::Name)) {
const Qt::KeyboardModifiers modifier = QApplication::keyboardModifiers();
if (!(modifier & Qt::ShiftModifier) && !(modifier & Qt::ControlModifier)) {
clearSelection();
}
}
- QTreeView::mousePressEvent(event);
-
if (event->button() == Qt::LeftButton) {
m_showElasticBand = true;
this, SLOT(updateSortOrder(Qt::SortOrder)));
connect(m_controller, SIGNAL(itemTriggered(const QModelIndex&)),
this, SLOT(triggerItem(const QModelIndex&)));
- connect(m_controller, SIGNAL(selectionChanged()),
- this, SLOT(emitSelectionChangedSignal()));
connect(m_controller, SIGNAL(activated()),
this, SLOT(requestActivation()));
connect(m_controller, SIGNAL(itemEntered(const QModelIndex&)),
m_topLayout->insertWidget(1, view);
connect(view->selectionModel(), SIGNAL(selectionChanged(const QItemSelection&, const QItemSelection&)),
- m_controller, SLOT(indicateSelectionChange()));
+ this, SLOT(emitSelectionChangedSignal()));
connect(view->verticalScrollBar(), SIGNAL(valueChanged(int)),
this, SLOT(emitContentsMoved()));
connect(view->horizontalScrollBar(), SIGNAL(valueChanged(int)),