connect(this, SIGNAL(activated(const QModelIndex&)),
controller, SLOT(triggerItem(const QModelIndex&)));
connect(this, SIGNAL(entered(const QModelIndex&)),
- controller, SLOT(emitItemEntered(const QModelIndex&)));
+ this, SLOT(slotEntered(const QModelIndex&)));
connect(this, SIGNAL(viewportEntered()),
controller, SLOT(emitViewportEntered()));
connect(controller, SIGNAL(zoomIn()),
m_controller->indicateSortOrderChange(sortOrder);
}
+void DolphinDetailsView::slotEntered(const QModelIndex& index)
+{
+ const QPoint pos = viewport()->mapFromGlobal(QCursor::pos());
+ const int nameColumnWidth = header()->sectionSize(KDirModel::Name);
+ if (pos.x() < nameColumnWidth) {
+ m_controller->emitItemEntered(index);
+ }
+ else {
+ m_controller->emitViewportEntered();
+ }
+}
+
void DolphinDetailsView::zoomIn()
{
if (isZoomInPossible()) {
*/
void synchronizeSortingState(int column);
+ /**
+ * Is invoked when the mouse cursor has entered an item. The controller
+ * gets informed to emit the itemEntered() signal if the mouse cursor
+ * is above the name column. Otherwise the controller gets informed
+ * to emit the itemViewportEntered() signal (all other columns should
+ * behave as viewport area).
+ */
+ void slotEntered(const QModelIndex& index);
+
void zoomIn();
void zoomOut();