}
}
+void BufferView::wheelEvent(QWheelEvent* event)
+{
+ int rowDelta = ( event->delta() > 0 ) ? -1 : 1;
+ QModelIndex currentIndex = selectionModel()->currentIndex();
+ QModelIndex resultingIndex;
+ if( model()->hasIndex( currentIndex.row() + rowDelta, currentIndex.column(), currentIndex.parent() ) )
+ {
+ resultingIndex = currentIndex.sibling( currentIndex.row() + rowDelta, currentIndex.column() );
+ }
+ else //if we scroll into a the parent node...
+ {
+ QModelIndex parent = currentIndex.parent();
+ QModelIndex aunt = parent.sibling( parent.row() + rowDelta, parent.column() );
+ if( rowDelta == -1 )
+ resultingIndex = aunt.child( model()->rowCount( aunt ) - 1, 0 );
+ else
+ resultingIndex = aunt.child( 0, 0 );
+ if( !resultingIndex.isValid() )
+ return;
+ }
+ selectionModel()->setCurrentIndex( resultingIndex, QItemSelectionModel::ClearAndSelect | QItemSelectionModel::Rows );
+ selectionModel()->select( resultingIndex, QItemSelectionModel::ClearAndSelect );
+}
+
void rowsInserted (const QModelIndex & parent, int start, int end);
void toggleHeader(bool checked);
void showContextMenu(const QPoint &);
+ void wheelEvent(QWheelEvent *);
};
quasselVersion = "0.2.0-alpha1";
quasselDate = "2008-02-24";
- quasselBuild = 583;
+ quasselBuild = 584;
//! Minimum client build number the core needs
clientBuildNeeded = 563;