* Added QWheelEvent * removed x y * Added QNativeGestureEvent * Changed wrong type of QNativeGestureEventWrap value * Added QTabletEvent * Fixing build error for QTabletEvent * adding dropaction * fix typos * Added more functions to QPainterPath * Added more functions to QPainterPath * Fixed multiple typos * Fixed multiple typos * Got QPainterPath additions working. * Modified QPainterPath to use qreal instead * Added QPointF, added a few missing methods to QPoint * Added QRectF * implemented QRectF * Added acceptDrops and setAcceptDrops to QWidget, will be useful for addon implementation of Drag and Drop * Added more methods to QUrl * Added QMimeData, additional methods to QUrl, and Dropping should now be supported * refactored * Fixed more merge conflicts * Is this my final merge conflict?? * All merge conflicts resolved * All merge conflicts resolved * Adds guide for drag and drop * lint fix Co-authored-by: Switt Kongdachalert <switt1995@yahoo.com> Co-authored-by: Atul R <atulanand94@gmail.com>
46 lines
1.5 KiB
C++
46 lines
1.5 KiB
C++
#include "QtGui/QEvent/QDragLeaveEvent/qdragleaveevent_wrap.h"
|
|
|
|
#include <QPoint>
|
|
|
|
#include "Extras/Utils/nutils.h"
|
|
|
|
Napi::FunctionReference QDragLeaveEventWrap::constructor;
|
|
|
|
Napi::Object QDragLeaveEventWrap::init(Napi::Env env, Napi::Object exports) {
|
|
Napi::HandleScope scope(env);
|
|
char CLASSNAME[] = "QDragLeaveEvent";
|
|
Napi::Function func = DefineClass(
|
|
env, CLASSNAME,
|
|
{// Methods inherited from QEvent
|
|
QEVENT_WRAPPED_METHODS_EXPORT_DEFINE(QDragLeaveEventWrap)
|
|
COMPONENT_WRAPPED_METHODS_EXPORT_DEFINE(QDragLeaveEventWrap)});
|
|
constructor = Napi::Persistent(func);
|
|
exports.Set(CLASSNAME, func);
|
|
return exports;
|
|
}
|
|
|
|
QDragLeaveEvent* QDragLeaveEventWrap::getInternalInstance() {
|
|
return this->instance;
|
|
}
|
|
|
|
QDragLeaveEventWrap::QDragLeaveEventWrap(const Napi::CallbackInfo& info)
|
|
: Napi::ObjectWrap<QDragLeaveEventWrap>(info) {
|
|
Napi::Env env = info.Env();
|
|
Napi::HandleScope scope(env);
|
|
if (info.Length() == 1) {
|
|
Napi::External<QDragLeaveEvent> eventObject =
|
|
info[0].As<Napi::External<QDragLeaveEvent>>();
|
|
this->instance = static_cast<QDragLeaveEvent*>(eventObject.Data());
|
|
} else {
|
|
Napi::TypeError::New(env, "Wrong number of arguments")
|
|
.ThrowAsJavaScriptException();
|
|
}
|
|
this->rawData = extrautils::configureComponent(this->getInternalInstance());
|
|
}
|
|
|
|
QDragLeaveEventWrap::~QDragLeaveEventWrap() {
|
|
// Do not destroy instance here. It will be done by Qt Event loop.
|
|
}
|
|
|
|
// Methods from QEvent defined in Macro already
|