Commit 8764f0b7 authored by Ivan Ilin's avatar Ivan Ilin

move event to dnd added

parent a5bdc4f5
...@@ -572,7 +572,7 @@ void UBWidgetUniboardAPI::ProcessDropEvent(QDropEvent *event) ...@@ -572,7 +572,7 @@ void UBWidgetUniboardAPI::ProcessDropEvent(QDropEvent *event)
QDropEvent readyEvent(dropPoint, dropActions, &dropMimeData, dropMouseButtons, dropModifiers); QDropEvent readyEvent(dropPoint, dropActions, &dropMimeData, dropMouseButtons, dropModifiers);
//sending event to destination either it had been downloaded or not //sending event to destination either it had been downloaded or not
QApplication::sendEvent(mGraphicsWidget->widgetWebView(),&readyEvent); QApplication::sendEvent(mGraphicsWidget->widgetWebView(),&readyEvent);
// readyEvent.acceptProposedAction(); readyEvent.acceptProposedAction();
} }
void UBWidgetUniboardAPI::onDownloadFinished(bool pSuccess, sDownloadFileDesc desc, QByteArray pData) void UBWidgetUniboardAPI::onDownloadFinished(bool pSuccess, sDownloadFileDesc desc, QByteArray pData)
...@@ -624,6 +624,10 @@ void UBWidgetUniboardAPI::onDownloadFinished(bool pSuccess, sDownloadFileDesc de ...@@ -624,6 +624,10 @@ void UBWidgetUniboardAPI::onDownloadFinished(bool pSuccess, sDownloadFileDesc de
destFile.close(); destFile.close();
//To make js interpreter accept drop event we need to generate move event first.
QDragMoveEvent readmove(dropPoint, desc.dropActions, &dropMimeData, desc.dropMouseButtons, desc.dropModifiers);
QApplication::sendEvent(mGraphicsWidget->widgetWebView(),&readmove);
QDropEvent readyEvent(dropPoint, desc.dropActions, &dropMimeData, desc.dropMouseButtons, desc.dropModifiers); QDropEvent readyEvent(dropPoint, desc.dropActions, &dropMimeData, desc.dropMouseButtons, desc.dropModifiers);
//sending event to destination either it had been downloaded or not //sending event to destination either it had been downloaded or not
QApplication::sendEvent(mGraphicsWidget->widgetWebView(),&readyEvent); QApplication::sendEvent(mGraphicsWidget->widgetWebView(),&readyEvent);
......
...@@ -60,7 +60,7 @@ UBMagnifier::UBMagnifier(QWidget *parent, bool isInteractive) ...@@ -60,7 +60,7 @@ UBMagnifier::UBMagnifier(QWidget *parent, bool isInteractive)
// standalone window // standalone window
// !!!! Should be included into Windows after QT recompilation // !!!! Should be included into Windows after QT recompilation
#ifndef Q_WS_WIN #ifndef Q_WS_WIN
setAttribute(Qt::WA_TranslucentBackground); // setAttribute(Qt::WA_TranslucentBackground);
setAttribute(Qt::WA_MacAlwaysShowToolWindow); setAttribute(Qt::WA_MacAlwaysShowToolWindow);
#endif #endif
#ifdef Q_WS_MAC #ifdef Q_WS_MAC
...@@ -97,7 +97,6 @@ UBMagnifier::~UBMagnifier() ...@@ -97,7 +97,6 @@ UBMagnifier::~UBMagnifier()
delete sDecreasePixmap; delete sDecreasePixmap;
sDecreasePixmap = NULL; sDecreasePixmap = NULL;
} }
} }
void UBMagnifier::setSize(qreal percentFromScene) void UBMagnifier::setSize(qreal percentFromScene)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment