* Wip * Improve constructor typings * Fixes types for Gui and Core * QtGui * Remove unnecessary imports and fix types on abstract classes * Adds half of qwidgets * Add all widgets * cleans up * fix failing test * lint fix * fix demo
32 lines
950 B
C++
32 lines
950 B
C++
#pragma once
|
|
|
|
#include <napi.h>
|
|
|
|
#include <QPixmap>
|
|
|
|
#include "core/Component/component_macro.h"
|
|
|
|
class QPixmapWrap : public Napi::ObjectWrap<QPixmapWrap> {
|
|
private:
|
|
std::unique_ptr<QPixmap> instance;
|
|
|
|
public:
|
|
static Napi::FunctionReference constructor;
|
|
static Napi::Object init(Napi::Env env, Napi::Object exports);
|
|
QPixmapWrap(const Napi::CallbackInfo& info);
|
|
~QPixmapWrap();
|
|
QPixmap* getInternalInstance();
|
|
// Wrapped methods
|
|
Napi::Value load(const Napi::CallbackInfo& info);
|
|
Napi::Value loadFromData(const Napi::CallbackInfo& info);
|
|
Napi::Value save(const Napi::CallbackInfo& info);
|
|
Napi::Value scaled(const Napi::CallbackInfo& info);
|
|
Napi::Value height(const Napi::CallbackInfo& info);
|
|
Napi::Value width(const Napi::CallbackInfo& info);
|
|
|
|
COMPONENT_WRAPPED_METHODS_DECLARATION
|
|
};
|
|
|
|
namespace StaticQPixmapWrapMethods {
|
|
Napi::Value fromQVariant(const Napi::CallbackInfo& info);
|
|
} // namespace StaticQPixmapWrapMethods
|