/***************************************************************************** * luaEngine Lua Engine for Qt * Copyright (C) 2018 Syping * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *****************************************************************************/ #ifndef LUAENGINEGUI_H #define LUAENGINEGUI_H #include "LuaEngineGui_global.h" #include "LuaEngine.h" #include #include class LUAENGINEGUISHARED_EXPORT LuaEngineGui : public LuaEngine { Q_OBJECT public: LuaEngineGui(QObject *parent = nullptr, bool loadBaseLibraries = true); void pushEngine(lua_State *L_p); static void pushClass(lua_State *L_p); static void pushClass(LuaEngine *luaEngine); static int showMessageBox(lua_State *L_p); static int closeWidget(lua_State *L_p); static int showWidget(lua_State *L_p); static int layoutAddWidget(lua_State *L_p); static int createLabel(lua_State *L_p); static int createLayout(lua_State *L_p); static int createMainWindow(lua_State *L_p); static int createCentralWidget(lua_State *L_p); static int createMenu(lua_State *L_p); static int createMenuBar(lua_State *L_p); static int createMenuEntry(lua_State *L_p); static int setWidgetLayout(lua_State *L_p); static int connect_p(lua_State *L_p); public slots: void luaTriggerSlot(); private: lua_State *L; static QString nameForPointer(void *pointer); }; #endif // LUAENGINEGUI_H