mirror of
https://gitlab.com/Syping/luaengineapp.git
synced 2025-09-15 21:21:41 +02:00
move getParent to LuaEngine Core
This commit is contained in:
parent
8a6f7311ca
commit
44d8d73877
3 changed files with 17 additions and 18 deletions
|
@ -131,9 +131,6 @@ void LuaEngineGui::pushClass(lua_State *L_p)
|
|||
pushVariant(L_p, "SizePolicyPreferred", (int)QSizePolicy::Preferred);
|
||||
pushVariant(L_p, "SizePolicyExpanding", (int)QSizePolicy::Expanding);
|
||||
pushVariant(L_p, "SizePolicyIgnored", (int)QSizePolicy::Ignored);
|
||||
|
||||
// Object functions
|
||||
pushFunction(L_p, "getParent", getParent);
|
||||
}
|
||||
|
||||
void LuaEngineGui::pushClass(LuaEngine *luaEngine)
|
||||
|
@ -799,18 +796,6 @@ int LuaEngineGui::createTextEdit(lua_State *L_p)
|
|||
return 1;
|
||||
}
|
||||
|
||||
int LuaEngineGui::getParent(lua_State *L_p)
|
||||
{
|
||||
if (getArgumentCount(L_p) >= 1) {
|
||||
void *pointer = getPointer(L_p, 1);
|
||||
if (pointer != NULL) {
|
||||
pushPointer(L_p, ((QObject*)pointer)->parent());
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int LuaEngineGui::getWidgetText(lua_State *L_p)
|
||||
{
|
||||
if (getArgumentCount(L_p) >= 1) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue