[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Patch for KPresenter (up&down of cursor with a mouse wheel)
From: Toshitaka Fujioka <toshitaka () kde ! gr ! jp>
Date: 2001-05-29 10:53:00
[Download RAW message or body]
Hello,
This patch lets cursor up&down with a mouse wheel during editing of
text object.
Is this feature needless?
Please review.
--
Toshitaka Fujioka
http://www.kde.org The K Desktop Environment Project
fujioka@kde.org
http://www.kde.gr.jp Japan KDE User's Group
toshitaka@kde.gr.jp
-- We offer the best Desktop Environment to you. (This is my goal. ;-)) --
["koffice-kpresenter-newfeature4-20010529.diff" (text/x-c++)]
diff -ur koffice.orig/kpresenter/ktextedit.cc koffice/kpresenter/ktextedit.cc
--- koffice.orig/kpresenter/ktextedit.cc Tue May 29 18:03:43 2001
+++ koffice/kpresenter/ktextedit.cc Tue May 29 19:21:23 2001
@@ -760,6 +760,21 @@
mousePressed = TRUE;
}
+void KTextEdit::wheelEvent( QWheelEvent *e )
+{
+ if ( e->delta() == 120 ) { // wheel up
+ drawCursor( FALSE );
+ moveCursor( MoveUp, false );
+ drawCursor( TRUE );
+ }
+ else if ( e->delta() == -120 ) { // wheel down
+ drawCursor( FALSE );
+ moveCursor( MoveDown, false );
+ drawCursor( TRUE );
+ }
+ e->accept();
+}
+
void KTextEdit::dragEnterEvent( QDragEnterEvent *e )
{
e->acceptAction();
diff -ur koffice.orig/kpresenter/ktextedit.h koffice/kpresenter/ktextedit.h
--- koffice.orig/kpresenter/ktextedit.h Tue May 29 18:03:43 2001
+++ koffice/kpresenter/ktextedit.h Tue May 29 19:09:36 2001
@@ -44,6 +44,7 @@
class QKeyEvent;
class QResizeEvent;
class QMouseEvent;
+class QWheelEvent;
class QTimer;
class QVBox;
class QListBox;
@@ -721,6 +722,7 @@
void mouseMoveEvent( QMouseEvent *e );
void mouseReleaseEvent( QMouseEvent *e );
void mouseDoubleClickEvent( QMouseEvent *e );
+ void wheelEvent( QWheelEvent *e );
void dragEnterEvent( QDragEnterEvent *e );
void dragMoveEvent( QDragMoveEvent *e );
void dragLeaveEvent( QDragLeaveEvent *e );
_______________________________________________
Koffice-devel mailing list
Koffice-devel@master.kde.org
http://master.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic