You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
86 lines
1.3 KiB
86 lines
1.3 KiB
/*
|
|
* UBRoutedMouseEventWebView.cpp
|
|
*
|
|
* Created on: 6 juil. 2009
|
|
* Author: Luc
|
|
*/
|
|
|
|
#include "UBRoutedMouseEventWebView.h"
|
|
|
|
#include <QtCore>
|
|
#include <QtWebKit>
|
|
#include <QtGui>
|
|
|
|
UBRoutedMouseEventWebView::UBRoutedMouseEventWebView(QWidget * parent)
|
|
: QWebView(parent)
|
|
{
|
|
QWebView::setRenderHints(QPainter::Antialiasing | QPainter::TextAntialiasing | QPainter::SmoothPixmapTransform);
|
|
}
|
|
|
|
UBRoutedMouseEventWebView::~UBRoutedMouseEventWebView()
|
|
{
|
|
// NOOP
|
|
}
|
|
|
|
|
|
void UBRoutedMouseEventWebView::mouseMoveEvent(QMouseEvent* ev)
|
|
{
|
|
QWebPage* p = page();
|
|
|
|
if (p)
|
|
{
|
|
p->event(ev);
|
|
}
|
|
}
|
|
|
|
void UBRoutedMouseEventWebView::mousePressEvent(QMouseEvent* ev)
|
|
{
|
|
QWebPage* p = page();
|
|
|
|
if (p)
|
|
{
|
|
p->event(ev);
|
|
}
|
|
}
|
|
|
|
void UBRoutedMouseEventWebView::mouseDoubleClickEvent(QMouseEvent* ev)
|
|
{
|
|
QWebPage* p = page();
|
|
|
|
if (p)
|
|
{
|
|
p->event(ev);
|
|
}
|
|
}
|
|
|
|
void UBRoutedMouseEventWebView::mouseReleaseEvent(QMouseEvent* ev)
|
|
{
|
|
QWebPage* p = page();
|
|
|
|
if (p)
|
|
{
|
|
p->event(ev);
|
|
}
|
|
}
|
|
|
|
void UBRoutedMouseEventWebView::contextMenuEvent(QContextMenuEvent* ev)
|
|
{
|
|
QWebPage* p = page();
|
|
|
|
if (p)
|
|
{
|
|
p->event(ev);
|
|
}
|
|
}
|
|
|
|
|
|
void UBRoutedMouseEventWebView::wheelEvent(QWheelEvent* ev)
|
|
{
|
|
QWebPage* p = page();
|
|
|
|
if (p)
|
|
{
|
|
p->event(ev);
|
|
}
|
|
}
|
|
|
|
|