mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 04:24:09 +00:00
25 lines
617 B
C++
25 lines
617 B
C++
|
/* This file is (c) 2008-2009 Konstantin Isakov <ikm@users.berlios.de>
|
||
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||
|
|
||
|
#include "articlewebview.hh"
|
||
|
#include <QMouseEvent>
|
||
|
|
||
|
void ArticleWebView::mousePressEvent( QMouseEvent * event )
|
||
|
{
|
||
|
if ( event->buttons() & Qt::MidButton )
|
||
|
midButtonPressed = true;
|
||
|
|
||
|
QWebView::mousePressEvent( event );
|
||
|
}
|
||
|
|
||
|
void ArticleWebView::mouseReleaseEvent( QMouseEvent * event )
|
||
|
{
|
||
|
bool noMidButton = !( event->buttons() & Qt::MidButton );
|
||
|
|
||
|
QWebView::mouseReleaseEvent( event );
|
||
|
|
||
|
if ( midButtonPressed & noMidButton )
|
||
|
midButtonPressed = false;
|
||
|
}
|
||
|
|