| Summary: | Multi Function Mouse Wheel | ||
|---|---|---|---|
| Product: | [Applications] calligrasheets | Reporter: | Brian Sanders <briansanders1979> |
| Component: | usability | Assignee: | Calligra Sheets (KSpread) Bugs <calligra-sheets-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | wishlist | CC: | sebsauer |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Debian testing | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Brian Sanders
2004-12-22 07:31:18 UTC
SVN commit 696743 by nikolaus:
UI Scrolling/Zooming.
Let the canvas controller handle the wheel events. Ctrl+wheel now zooms.
CCBUG: 95617
M +7 -4 Border.cpp
M +1 -0 Border.h
M +0 -14 Canvas.cpp
M +0 -2 Canvas.h
--- trunk/koffice/kspread/ui/Border.cpp #696742:696743
@@ -464,8 +464,7 @@
void VBorder::wheelEvent( QWheelEvent* _ev )
{
- if ( m_pCanvas->vertScrollBar() )
- QApplication::sendEvent( m_pCanvas->vertScrollBar(), _ev );
+ QApplication::sendEvent( m_pCanvas, _ev );
}
@@ -1157,8 +1156,7 @@
void HBorder::wheelEvent( QWheelEvent* _ev )
{
- if ( m_pCanvas->horzScrollBar() )
- QApplication::sendEvent( m_pCanvas->horzScrollBar(), _ev );
+ QApplication::sendEvent( m_pCanvas, _ev );
}
void HBorder::resizeEvent( QResizeEvent* _ev )
@@ -1528,4 +1526,9 @@
m_view->selectAll();
}
+void SelectAllButton::wheelEvent(QWheelEvent* event)
+{
+ QApplication::sendEvent(m_view->canvasWidget(), event);
+}
+
#include "Border.moc"
--- trunk/koffice/kspread/ui/Border.h #696742:696743
@@ -185,6 +185,7 @@
virtual void paintEvent( QPaintEvent* event );
virtual void mousePressEvent( QMouseEvent* event );
virtual void mouseReleaseEvent( QMouseEvent* event );
+ virtual void wheelEvent( QWheelEvent* );
private:
View* m_view;
--- trunk/koffice/kspread/ui/Canvas.cpp #696742:696743
@@ -71,7 +71,6 @@
#include <QTextStream>
#include <QTimer>
#include <QToolTip>
-#include <QWheelEvent>
#include <QWidget>
// KDE
@@ -783,19 +782,6 @@
setCursor( Qt::ArrowCursor );
}
-void Canvas::wheelEvent( QWheelEvent* _ev )
-{
- if ( _ev->orientation() == Qt::Vertical )
- {
- if ( vertScrollBar() )
- QApplication::sendEvent( vertScrollBar(), _ev );
- }
- else if ( horzScrollBar() )
- {
- QApplication::sendEvent( horzScrollBar(), _ev );
- }
-}
-
void Canvas::paintEvent( QPaintEvent* event )
{
if ( d->view->doc()->isLoading() || d->view->isLoading() )
--- trunk/koffice/kspread/ui/Canvas.h #696742:696743
@@ -57,7 +57,6 @@
class QPen;
class QResizeEvent;
class QScrollBar;
-class QWheelEvent;
namespace KSpread
{
@@ -411,7 +410,6 @@
virtual void mouseReleaseEvent( QMouseEvent* _ev );
virtual void mouseMoveEvent( QMouseEvent* _ev );
virtual void mouseDoubleClickEvent( QMouseEvent* );
- virtual void wheelEvent( QWheelEvent* );
virtual void focusInEvent( QFocusEvent* );
virtual void focusOutEvent( QFocusEvent* );
virtual void dragEnterEvent(QDragEnterEvent*);
Mark fixed cause the commit above solved the request and someone can now use trhe mouse-wheel scrolling or zoom in/out as described by Stefan above. Thanks for the feedback! |