diff --git a/src/QtGui/qmainwindow.cpp b/src/QtGui/qmainwindow.cpp index cb68478..88bae95 100644 --- a/src/QtGui/qmainwindow.cpp +++ b/src/QtGui/qmainwindow.cpp @@ -10,6 +10,8 @@ Napi::Object QMainWindowWrap::Init(Napi::Env env, Napi::Object exports) // clang-format off Napi::Function func = DefineClass(env, "QMainWindow", { InstanceMethod("getClosed", &QMainWindowWrap::getClosed), + InstanceMethod("showFullScreen", &QMainWindowWrap::showFullScreen), + InstanceMethod("showNormal", &QMainWindowWrap::showNormal), QWIDGET_JS_DEFINES(QMainWindowWrap) }); // clang-format on @@ -51,5 +53,17 @@ Napi::Value QMainWindowWrap::getClosed(const Napi::CallbackInfo &info) return Napi::Boolean::New(env, q_->closed); } +Napi::Value QMainWindowWrap::showFullScreen(const Napi::CallbackInfo &info) +{ + q_->showFullScreen(); + return Napi::Value(); +} + +Napi::Value QMainWindowWrap::showNormal(const Napi::CallbackInfo &info) +{ + q_->showNormal(); + return Napi::Value(); +} + // QWidget functions QWIDGET_BASE_FUNCS(QMainWindowWrap) \ No newline at end of file diff --git a/src/QtGui/qmainwindow.hpp b/src/QtGui/qmainwindow.hpp index 91850a6..cbb443a 100644 --- a/src/QtGui/qmainwindow.hpp +++ b/src/QtGui/qmainwindow.hpp @@ -22,6 +22,8 @@ class QMainWindowWrap : public Napi::ObjectWrap static Napi::FunctionReference constructor; Napi::Value getClosed(const Napi::CallbackInfo &info); + Napi::Value showFullScreen(const Napi::CallbackInfo &info); + Napi::Value showNormal(const Napi::CallbackInfo &info); // QWidget Funcs QWIDGET_DEFS