* Added QMessageBox * Adds Qdialog * Fixes inheritance and adds pointer based event listener * Cleans up Qmessagebox so that we create all buttons * change to abstract button * fix rawData fetching from the template * formatting fixes * change to Objectwrap for better type casting * Adds Native element part in qpushbutton * Adds NapiExternal check and use ptr for initialization * Adds all button classes * fix c * fix merge conflicts * lint fix Co-authored-by: Atul R <atulanand94@gmail.com>
30 lines
828 B
C++
30 lines
828 B
C++
#pragma once
|
|
|
|
#include <napi.h>
|
|
|
|
#include <QIcon>
|
|
|
|
#include "core/Component/component_macro.h"
|
|
|
|
class QIconWrap : public Napi::ObjectWrap<QIconWrap> {
|
|
COMPONENT_WRAPPED_METHODS_DECLARATION
|
|
|
|
private:
|
|
std::unique_ptr<QIcon> instance;
|
|
|
|
public:
|
|
static Napi::FunctionReference constructor;
|
|
static Napi::Object init(Napi::Env env, Napi::Object exports);
|
|
QIconWrap(const Napi::CallbackInfo& info);
|
|
~QIconWrap();
|
|
QIcon* getInternalInstance();
|
|
// Wrapped methods
|
|
Napi::Value pixmap(const Napi::CallbackInfo& info);
|
|
Napi::Value isMask(const Napi::CallbackInfo& info);
|
|
Napi::Value setIsMask(const Napi::CallbackInfo& info);
|
|
Napi::Value cacheKey(const Napi::CallbackInfo& info);
|
|
};
|
|
|
|
namespace StaticQIconWrapMethods {
|
|
Napi::Value fromQVariant(const Napi::CallbackInfo& info);
|
|
} // namespace StaticQIconWrapMethods
|