nodeguy/src/cpp/include/nodegui/QtWidgets/QPainter/qpainter_wrap.h
Atul R 86c3ef089c
Integration with Qode 2.0 (#400)
* Moves qt integration solely to the nodegui core addon

* Adds lint fixes

* moved to integration core

* cleans up export snippet

* revert package.json

* Add exit if app->exec finishes.

* lint fix

* Makes QApplication custom

* adds qobject to wrap of qapp

* Adds working qt run looper

* Adds font default

* Adds qt installer

* Updates qode integration to v2.0.1

* fix cpp lints

* Fixes lint and deps

* Adds miniqt installation

* adds setup mini qt script

* skips tests due to issues with jest

* fix config and download path for linux and windows

* Adds multiple artifact downloader

* fix qt config and compilation

* Fixes qode path for windows (now it can load dll's easily)

* Add compilation

* fix windows path setup

* use scripts directly

* enabled tests back

* fix ubuntu deps

* update to alpha release

* fix workflow

* adds more artifacts and funding field

* change to alpha v2

* update prebuild yml

* revert build action

* disabling prebuild for now

* switch to stable release 5.14.1

* version bump
2020-03-07 10:28:30 +01:00

37 lines
1.2 KiB
C++

#pragma once
#include <napi.h>
#include <QPainter>
#include "Extras/Export/export.h"
#include "core/Component/component_wrap.h"
class DLL_EXPORT QPainterWrap : public Napi::ObjectWrap<QPainterWrap> {
COMPONENT_WRAPPED_METHODS_DECLARATION
private:
QPainter* instance;
public:
static Napi::Object init(Napi::Env env, Napi::Object exports);
QPainterWrap(const Napi::CallbackInfo& info);
~QPainterWrap();
QPainter* getInternalInstance();
// class constructor
static Napi::FunctionReference constructor;
// wrapped methods
Napi::Value drawText(const Napi::CallbackInfo& info);
Napi::Value begin(const Napi::CallbackInfo& info);
Napi::Value end(const Napi::CallbackInfo& info);
Napi::Value rotate(const Napi::CallbackInfo& info);
Napi::Value setPen(const Napi::CallbackInfo& info);
Napi::Value setRenderHint(const Napi::CallbackInfo& info);
Napi::Value setBrush(const Napi::CallbackInfo& info);
Napi::Value drawLine(const Napi::CallbackInfo& info);
Napi::Value scale(const Napi::CallbackInfo& info);
Napi::Value translate(const Napi::CallbackInfo& info);
Napi::Value drawConvexPolygon(const Napi::CallbackInfo& info);
Napi::Value save(const Napi::CallbackInfo& info);
Napi::Value restore(const Napi::CallbackInfo& info);
};