diff options
| author | 2011-12-07 18:10:34 +0000 | |
|---|---|---|
| committer | 2011-12-07 18:10:34 +0000 | |
| commit | 5b04fa4457944d118cd5505ab4f89b7b9916f742 (patch) | |
| tree | b5332f4eeeb46893d366ba26c027c6234b4c87fe /src/modules/objects/KvsObject_widget.cpp | |
| parent | Code clean (diff) | |
| download | KVIrc-5b04fa4457944d118cd5505ab4f89b7b9916f742.tar.gz KVIrc-5b04fa4457944d118cd5505ab4f89b7b9916f742.tar.bz2 KVIrc-5b04fa4457944d118cd5505ab4f89b7b9916f742.zip | |
More work on webview (wip) - some fixes around widgets
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@5991 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/objects/KvsObject_widget.cpp')
| -rw-r--r-- | src/modules/objects/KvsObject_widget.cpp | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/src/modules/objects/KvsObject_widget.cpp b/src/modules/objects/KvsObject_widget.cpp index 3438cef8e..e235515e6 100644 --- a/src/modules/objects/KvsObject_widget.cpp +++ b/src/modules/objects/KvsObject_widget.cpp @@ -343,16 +343,10 @@ const char * const widgettypes_tbl[] = { and are expressed in pixels. If you call "[cmd]setreturn[/cmd] 1" you will stop the internal processing of this event. The default implementation does nothing. - !fn: $mouseMoveEvent(<button>,<x>,<y>) + !fn: $mouseMoveEvent(<x>,<y>) This function is called when the mouse cursor moves inside this widget. - <button> is 0 if the pressed button - is the left one, 1 if the button is the right one and 2 if it is the middle one. - The special value of -1 indicates that no button is being pressed. The <x> and <y> coordinates are relative to this widget upper-left corner and are expressed in pixels. - Normally you will receive this event only if a mouse button is being pressed - while moving. If you want to receive it also when the mouse buttons are not - pressed, call [classfnc]$setMouseTracking[/classfnc](). If you call "[cmd]return[/cmd]$true" you will stop the internal processing of this event. The default implementation does nothing. !fn: $focusInEvent() @@ -934,18 +928,7 @@ bool KvsObject_widget::eventFilter(QObject *o,QEvent *e) break; case QEvent::MouseMove: { - if( (((QMouseEvent *)e)->button()) & Qt::LeftButton) aparam = 0; - else - { - if(((QMouseEvent *)e)->button() & Qt::RightButton)aparam = 1; - else - { - if(((QMouseEvent *)e)->button() & Qt::MidButton)aparam = 2; - else aparam = -1; - } - } KviKvsVariantList lParams; - lParams.append(new KviKvsVariant((kvs_int_t)aparam)); lParams.append(new KviKvsVariant((kvs_int_t)((QMouseEvent *)e)->pos().x())); lParams.append(new KviKvsVariant((kvs_int_t)((QMouseEvent *)e)->pos().y())); if (!callFunction(this,"mouseMoveEvent",0,&lParams)) brokenhandler = true; // ignore results of a broken event handler |
