parent
2ab8484794
commit
17239ae5cf
@ -378,6 +378,15 @@
|
||||
this->instance->addAction(actionWrap->getInternalInstance()); \
|
||||
return env.Null(); \
|
||||
} \
|
||||
Napi::Value removeAction(const Napi::CallbackInfo& info) { \
|
||||
Napi::Env env = info.Env(); \
|
||||
Napi::HandleScope scope(env); \
|
||||
Napi::Object actionObject = info[0].As<Napi::Object>(); \
|
||||
QActionWrap* actionWrap = \
|
||||
Napi::ObjectWrap<QActionWrap>::Unwrap(actionObject); \
|
||||
this->instance->removeAction(actionWrap->getInternalInstance()); \
|
||||
return env.Null(); \
|
||||
} \
|
||||
Napi::Value repolish(const Napi::CallbackInfo& info) { \
|
||||
Napi::Env env = info.Env(); \
|
||||
Napi::HandleScope scope(env); \
|
||||
@ -450,6 +459,7 @@
|
||||
InstanceMethod("showMinimized", &WidgetWrapName::showMinimized), \
|
||||
InstanceMethod("showNormal", &WidgetWrapName::showNormal), \
|
||||
InstanceMethod("addAction", &WidgetWrapName::addAction), \
|
||||
InstanceMethod("removeAction", &WidgetWrapName::removeAction), \
|
||||
InstanceMethod("repolish", &WidgetWrapName::repolish), \
|
||||
InstanceMethod("setGraphicsEffect", &WidgetWrapName::setGraphicsEffect),
|
||||
|
||||
|
||||
@ -253,6 +253,10 @@ export abstract class NodeWidget<Signals extends QWidgetSignals> extends YogaWid
|
||||
this.native.addAction(action.native);
|
||||
this.actions.add(action);
|
||||
return action;
|
||||
}
|
||||
removeAction(action: QAction): void {
|
||||
this.native.removeAction(action.native);
|
||||
this.actions.delete(action);
|
||||
}
|
||||
repolish(): void {
|
||||
this.native.repolish();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user