emit selectionChanged(selection);
}
+void DolphinMainWindow::slotWheelMoved(int wheeldelta)
+{
+ if (wheeldelta > 0)
+ {
+ //Non-negative, wheel is going forwards, so the tab goes backwards (focuses left)
+ activatePrevTab();
+ } else
+ {
+ activateNextTab();
+ }
+}
+
void DolphinMainWindow::slotRequestItemInfo(const KFileItem& item)
{
emit requestItemInfo(item);
this, SLOT(openNewTab()));
connect(m_tabBar, SIGNAL(testCanDecode(const QDragMoveEvent*, bool&)),
this, SLOT(slotTestCanDecode(const QDragMoveEvent*, bool&)));
+ connect(m_tabBar, SIGNAL(wheelDelta(int)),
+ this, SLOT(slotWheelMoved(int)));
+
m_tabBar->blockSignals(true); // signals get unblocked after at least 2 tabs are open
QWidget* centralWidget = new QWidget(this);
*/
void slotSelectionChanged(const KFileItemList& selection);
+ /**
+ * Wheel event, receives it's degree of movement (int).
+ * we look to see if it's negative (backwards) or positive (forwards).
+ * Enables changing of tabs via mouse wheel.
+ */
+ void slotWheelMoved(int wheeldelta);
+
/** Emits the signal requestItemInfo(). */
void slotRequestItemInfo(const KFileItem&);
*/
void closeTab(int index);
+
/**
* Opens a context menu for the tab with the index \a index
* on the position \a pos.